Debian Bug report logs - #1098956
cmake: FTBFS on hppa - /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions

version graph

Package: src:binutils; Maintainer for src:binutils is Matthias Klose <[email protected]>;

Affects: src:cmake

Reported by: John David Anglin <[email protected]>

Date: Wed, 26 Feb 2025 16:39:01 UTC

Severity: normal

Fixed in version binutils/2.44-3

Done: Matthias Klose <[email protected]>

Forwarded to https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10398

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian CMake Team <[email protected]>:
Bug#1098956; Package src:cmake. (Wed, 26 Feb 2025 16:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to John David Anglin <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian CMake Team <[email protected]>. (Wed, 26 Feb 2025 16:39:02 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: John David Anglin <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: cmake: FTBFS on hppa - /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions
Date: Wed, 26 Feb 2025 11:34:49 -0500
Source: cmake
Version: 3.31.5-2
Severity: normal

Dear Maintainer,

Binutils ld has a new warning.  It is causing builds for a number of
packages to fail.  For cmake, it causes the following tests to fail
on hppa and sparc:

The following tests FAILED:
	365 - RunCMake.CMP0119 (Failed)
	384 - RunCMake.Make (Failed)
	390 - RunCMake.Autogen_Qt6_1 (Failed)
	391 - RunCMake.Autogen_Qt6_2 (Failed)
	392 - RunCMake.Autogen_Qt6_3 (Failed)
	393 - RunCMake.Autogen_Qt6_4 (Failed)
	394 - RunCMake.Autogen_Qt6_5 (Failed)
	395 - RunCMake.Autogen_Qt6_6 (Failed)
	396 - RunCMake.BuildDepends (Failed)                    Fortran
	398 - RunCMake.Byproducts (Failed)
	410 - RunCMake.ExcludeFromAll (Failed)
	411 - RunCMake.ExportImport (Failed)
	446 - RunCMake.GoogleTest (Failed)
	452 - RunCMake.ObjectLibrary (Failed)
	455 - RunCMake.RuntimePath (Failed)
	460 - RunCMake.TargetObjects (Failed)
	478 - RunCMake.add_custom_command (Failed)
	483 - RunCMake.add_subdirectory (Failed)                Fortran
	544 - RunCMake.test_include_dirs (Failed)
	554 - RunCMake.InterfaceLibrary (Failed)
	559 - RunCMake.DependencyGraph (Failed)                 Fortran
	566 - RunCMake.LinkLibrariesStrategy (Failed)
	576 - RunCMake.target_link_libraries-LINK_LIBRARY (Failed)
	577 - RunCMake.target_link_libraries-LINK_GROUP (Failed)
	578 - RunCMake.add_link_options (Failed)
	579 - RunCMake.target_link_options (Failed)             CUDA
	585 - RunCMake.target_sources (Failed)
	595 - RunCMake.file-GET_RUNTIME_DEPENDENCIES (Failed)
	607 - RunCMake.CrosscompilingEmulator (Failed)
	616 - RunCMake.CompilerArgs (Failed)
	620 - RunCMake.CPack_DEB.DEBUGINFO (Failed)
	622 - RunCMake.CPack_DEB.DEPENDENCIES (Failed)
	626 - RunCMake.CPack_DEB.GENERATE_SHLIBS (Failed)
	627 - RunCMake.CPack_DEB.GENERATE_SHLIBS_LDCONFIG (Failed)
	650 - RunCMake.PrecompileHeaders (Failed)
	651 - RunCMake.UnityBuild (Failed)                      CUDA
	657 - RunCMake.VerifyHeaderSets (Failed)
	659 - RunCMake.Codegen (Failed)
Errors while running CTest

For example,

CMake Error at /build/reproducible-path/cmake-3.31.6/Tests/RunCMake/RunCMake.cmake:286 (message):
  PchLibObjLibExe-build - FAILED:

  stderr does not match that expected.

  Command was:

   command> "/build/reproducible-path/cmake-3.31.6/Build/bin/cmake" "--build" "." "--config" "Debug"

  Actual stdout:

   actual-stdout> gmake[3]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[4]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 11%] Building CXX object CMakeFiles/base_lib_static.dir/cmake_pch.hxx.gch
   actual-stdout> [ 22%] Building CXX object CMakeFiles/base_lib_static.dir/empty1.cpp.o
   actual-stdout> [ 33%] Linking CXX static library libbase_lib_static.a
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 33%] Built target base_lib_static
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 44%] Building CXX object CMakeFiles/object_lib.dir/empty2.cpp.o
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 44%] Built target object_lib
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 55%] Building CXX object CMakeFiles/mid_lib_static.dir/empty3.cpp.o
   actual-stdout> [ 66%] Linking CXX static library libmid_lib_static.a
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 66%] Built target mid_lib_static
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[5]: Entering directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [ 77%] Building CXX object CMakeFiles/exec.dir/cmake_pch.hxx.gch
   actual-stdout> [ 88%] Building CXX object CMakeFiles/exec.dir/main.cpp.o
   actual-stdout> [100%] Linking CXX executable exec
   actual-stdout> gmake[5]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> [100%] Built target exec
   actual-stdout> gmake[4]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'
   actual-stdout> gmake[3]: Leaving directory '/build/reproducible-path/cmake-3.31.6/Build/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe-build'

  Expected stderr to match:

   expect-stderr> ^$

  Actual stderr:

   actual-stderr> /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions

Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=hppa&ver=3.31.6-1&stamp=1740586340&raw=0

I believe this problem will eventually affect all arches, so maybe this
bug should be serious.

Regards,
Dave Anglin

-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 6.12.16-dirty (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)



Information forwarded to [email protected], Debian CMake Team <[email protected]>:
Bug#1098956; Package src:cmake. (Wed, 26 Feb 2025 18:57:01 GMT) (full text, mbox, link).


Acknowledgement sent to Brad King <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian CMake Team <[email protected]>. (Wed, 26 Feb 2025 18:57:02 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Brad King <[email protected]>
To: Timo Röhling <[email protected]>
Cc: [email protected], John David Anglin <[email protected]>
Subject: Re: Bug#1098956: cmake: FTBFS on hppa - /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions
Date: Wed, 26 Feb 2025 13:54:24 -0500
On Wed, Feb 26, 2025 at 11:39 AM John David Anglin wrote:
> Binutils ld has a new warning...it causes the following tests to fail
> ...
>    actual-stderr> /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions

CMake's tests fail due to this unexpected incidental output from the toolchain.
I don't think the warning itself is a problem for binaries inside the
test suite.
I've opened an upstream CMake merge request to filter out that output:

* https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10398

-Brad



Information forwarded to [email protected], Debian CMake Team <[email protected]>:
Bug#1098956; Package src:cmake. (Wed, 26 Feb 2025 21:27:01 GMT) (full text, mbox, link).


Acknowledgement sent to Dave Anglin <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian CMake Team <[email protected]>. (Wed, 26 Feb 2025 21:27:01 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Dave Anglin <[email protected]>
To: [email protected]
Subject: Re: Bug#1098956: Acknowledgement (cmake: FTBFS on hppa - /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions)
Date: Wed, 26 Feb 2025 16:25:54 -0500
See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098970

The PLT section on hppa needs to be RWX.

Binutils is now configured with --enable-warn-rwx-segments.

-- 
John David Anglin  [email protected]



Information forwarded to [email protected], Debian CMake Team <[email protected]>:
Bug#1098956; Package src:cmake. (Sat, 01 Mar 2025 16:39:01 GMT) (full text, mbox, link).


Acknowledgement sent to Dave Anglin <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian CMake Team <[email protected]>. (Sat, 01 Mar 2025 16:39:01 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Dave Anglin <[email protected]>
To: [email protected]
Subject: Re: Bug#1098956: Info received (Bug#1098956: Acknowledgement (cmake: FTBFS on hppa - /usr/bin/ld: warning: exec has a LOAD segment with RWX permissions))
Date: Sat, 1 Mar 2025 11:35:16 -0500
It is not clear why the warning was forced on all architectures.  We have the following
code in ld/configure.tgt:

# By default the linker will generate warnings if it is creating an
# executable stack or a segment with all three of read, write and
# execute permissions.  These settings are not appropriate for all
# targets however, so we can change them here:

if test "${ac_default_ld_warn_rwx_segments}" = unset; then
  case "${targ}" in
      # The CRIS and V850 default linker scripts yields just one segment
      # as intended, so a rwx segment warning is not helpful.
      # The HPPA's and SPARC's PLT sections use a constructed trampoline
      # hence it needs to have a RWX segment.
      # Many MIPS targets use executable segments.
    cris-*-* | crisv32-*-* | \
    hppa*-*-* | \
    mips*-*-* | \
    microblaze*-*-* | \
    sparc*-*-* | \
    v850*-*-*)
      ac_default_ld_warn_rwx_segments=0
      ;;
    *)
      ;;
  esac
fi

Dave
-- 
John David Anglin  [email protected]



Set Bug forwarded-to-address to 'https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10398'. Request was from Timo Röhling <[email protected]> to [email protected]. (Sun, 02 Mar 2025 21:18:01 GMT) (full text, mbox, link).


Reply sent to Matthias Klose <[email protected]>:
You have taken responsibility. (Tue, 04 Mar 2025 06:51:02 GMT) (full text, mbox, link).


Notification sent to John David Anglin <[email protected]>:
Bug acknowledged by developer. (Tue, 04 Mar 2025 06:51:02 GMT) (full text, mbox, link).


Message #27 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: [email protected]
Subject: fixed in unstable
Date: Tue, 4 Mar 2025 07:49:16 +0100
Version: 2.44-3

fixed in unstable




Bug reassigned from package 'src:cmake' to 'src:binutils'. Request was from Andreas Beckmann <[email protected]> to [email protected]. (Thu, 24 Apr 2025 21:21:29 GMT) (full text, mbox, link).


No longer marked as found in versions cmake/3.31.5-2. Request was from Andreas Beckmann <[email protected]> to [email protected]. (Thu, 24 Apr 2025 21:21:29 GMT) (full text, mbox, link).


No longer marked as fixed in versions 2.44-3. Request was from Andreas Beckmann <[email protected]> to [email protected]. (Thu, 24 Apr 2025 21:21:29 GMT) (full text, mbox, link).


Marked as fixed in versions binutils/2.44-3. Request was from Andreas Beckmann <[email protected]> to [email protected]. (Thu, 24 Apr 2025 21:21:30 GMT) (full text, mbox, link).


Added indication that 1098956 affects src:cmake Request was from Andreas Beckmann <[email protected]> to [email protected]. (Thu, 24 Apr 2025 21:21:30 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:51:28 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.