[Bug rust/113553] rust fails to build on sparc64-linux-gnu

glaubitz at physik dot fu-berlin.de gcc-bugzilla@gcc.gnu.org
Thu Feb 1 19:10:50 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113553

--- Comment #5 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Rainer Orth from comment #1)
> The build works for me just fine on sparc-sun-solaris2.11.
> 
> I've also fired one off on sparc64-unknown-linux-gnu which worked just as
> well.
> It was a rough ride, however, with the build aborting with
> 
> xgcc: fatal error: cannot execute
> '/var/gcc/regression/master/6.4.0-gcc-gas-gld/build/./gcc/cc1plus':
> posix_spawn: Bad address
> 
> several times.  When I ran make under strace -f, however, the build worked
> just
> fine.  Quite ugly, actually.

It seems that this can be avoided by building with one job, i.e. with "make
-j1".

Some playing around showed that this fixes the problem for me:

diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index af98062a94c..a1d35820181 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -574,8 +574,8 @@ pex_unix_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED,
 {
   int ret;
   pid_t pid = -1;
-  posix_spawnattr_t attr;
-  posix_spawn_file_actions_t actions;
+  static posix_spawnattr_t attr;
+  static posix_spawn_file_actions_t actions;
   int attr_initialized = 0, actions_initialized = 0;

   *err = 0;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gcc-rust mailing list