public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
* [Bug rust/113553] New: rust fails to build on spar64-linux-gnu
@ 2024-01-23  8:15 doko at gcc dot gnu.org
  2024-01-23  8:15 ` [Bug rust/113553] " doko at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: doko at gcc dot gnu.org @ 2024-01-23  8:15 UTC (permalink / raw)
  To: gcc-rust

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

            Bug ID: 113553
           Summary: rust fails to build on spar64-linux-gnu
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rust
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
                CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---

seen with trunk 20240121 on sparc64-linux-gnu:

[...]
../../../../src/libgrust/libp
roc_macro_internal/literal.cc: In static member function 'static
ProcMacro::Literal ProcMacro::
Literal::make_f32(float, bool)':
../../../../src/libgrust/libproc_macro_internal/literal.cc:155:57: error: call
of overloaded 'to_string(float&)' is ambiguous
  155 |   auto text = FFIString::make_ffistring (std::to_string (value));
      |                                          ~~~~~~~~~~~~~~~^~~~~~~
In file included from
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/string:54,
                 from
../../../../src/libgrust/libproc_macro_internal/literal.h:27,
                 from
../../../../src/libgrust/libproc_macro_internal/literal.cc:23:
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4240:3:
note: candidate: 'std::string std::__cxx11::to_string(int)'
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4259:3:
note: candidate: 'std::string std::__cxx11::to_string(unsigned int)'
 4259 |   to_string(unsigned __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4275:3:
note: candidate: 'std::string std::__cxx11::to_string(long int)'
 4275 |   to_string(long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4294:3:
note: candidate: 'std::string std::__cxx11::to_string(long unsigned int)'
 4294 |   to_string(unsigned long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4310:3:
note: candidate: 'std::string std::__cxx11::to_string(long long int)'
 4310 |   to_string(long long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4327:3:
note: candidate: 'std::string std::__cxx11::to_string(long long unsigned int)'
 4327 |   to_string(unsigned long long __val)
      |   ^~~~~~~~~
../../../../src/libgrust/libproc_macro_internal/literal.cc:157:70: error: could
not convert '{ProcMacro::LitKind::make_float(), text, suffix,
ProcMacro::Span::make_unknown()}' from '<brace-enclosed initializer list>' to
'ProcMacro::Literal'
  157 |   return {LitKind::make_float (), text, suffix, Span::make_unknown ()};
      |                                                                      ^
      |                                                                      |
      |                                                                     
<brace-enclosed initializer list>
../../../../src/libgrust/libproc_macro_internal/literal.cc: In static member
function 'static ProcMacro::Literal ProcMacro::Literal::make_f64(double,
bool)':
../../../../src/libgrust/libproc_macro_internal/literal.cc:163:57: error: call
of overloaded 'to_string(double&)' is ambiguous
  163 |   auto text = FFIString::make_ffistring (std::to_string (value));
      |                                          ~~~~~~~~~~~~~~~^~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4240:3:
note: candidate: 'std::string std::__cxx11::to_string(int)'
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
checking if /<<PKGBUILDDIR>>/build/./gcc/xgcc -B/<<PKGBUILDDIR>>/build/./gcc/
-B/usr/sparc64-linux-gnu/bin/ -B/usr/sparc64-linux-gnu/lib/ -isystem
/usr/sparc64-linux-gnu/include -isystem /usr/sparc64-linux-gnu/sys-include
-isystem /<<PKGBUILDDIR>>/build/sys-include    supports -fno-rtti
-fno-exceptions...
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4259:3:
note: candidate: 'std::string std::__cxx11::to_string(unsigned int)'
 4259 |   to_string(unsigned __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4275:3:
note: candidate: 'std::string std::__cxx11::to_string(long int)'
 4275 |   to_string(long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4294:3:
note: candidate: 'std::string std::__cxx11::to_string(long unsigned int)'
 4294 |   to_string(unsigned long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4310:3:
note: candidate: 'std::string std::__cxx11::to_string(long long int)'
 4310 |   to_string(long long __val)
      |   ^~~~~~~~~
/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:4327:3:
note: candidate: 'std::string std::__cxx11::to_string(long long unsigned int)'
 4327 |   to_string(unsigned long long __val)
      |   ^~~~~~~~~
../../../../src/libgrust/libproc_macro_internal/literal.cc:165:70: error: could
not convert '{ProcMacro::LitKind::make_float(), text, suffix,
ProcMacro::Span::make_unknown()}' from '<brace-enclosed initializer list>' to
'ProcMacro::Literal'
  165 |   return {LitKind::make_float (), text, suffix, Span::make_unknown ()};
      |                                                                      ^
      |                                                                      |
      |                                                                     
<brace-enclosed initializer list>
make[5]: *** [<builtin>: literal.o] Error 1
make[5]: Leaving directory
'/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libgrust/libproc_macro_internal'
make[4]: *** [Makefile:421: all-recursive] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build/sparc64-linux-gnu/libgrust'

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on spar64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
@ 2024-01-23  8:15 ` doko at gcc dot gnu.org
  2024-01-23  8:21 ` [Bug rust/113553] rust fails to build on sparc64-linux-gnu doko at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: doko at gcc dot gnu.org @ 2024-01-23  8:15 UTC (permalink / raw)
  To: gcc-rust

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |sparc64-linux-gnu

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
  2024-01-23  8:15 ` [Bug rust/113553] " doko at gcc dot gnu.org
@ 2024-01-23  8:21 ` doko at gcc dot gnu.org
  2024-01-24 14:33 ` ro at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: doko at gcc dot gnu.org @ 2024-01-23  8:21 UTC (permalink / raw)
  To: gcc-rust

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|rust fails to build on      |rust fails to build on
                   |spar64-linux-gnu            |sparc64-linux-gnu

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
  2024-01-23  8:15 ` [Bug rust/113553] " doko at gcc dot gnu.org
  2024-01-23  8:21 ` [Bug rust/113553] rust fails to build on sparc64-linux-gnu doko at gcc dot gnu.org
@ 2024-01-24 14:33 ` ro at gcc dot gnu.org
  2024-02-01  6:26 ` pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-24 14:33 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
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.

That said, those specializations of std::to_string live in
libstdc++-v3/include/bits/basic_string.h.
The floating point ones are guarded by _GLIBCXX_USE_C99_STDIO.  In my build,
sparc64-unknown-linux-gnu/libstdc++-v3/config.h has

#define _GLIBCXX11_USE_C99_STDIO 1
#define _GLIBCXX98_USE_C99_STDIO 1

If yours does not, you need to check config.log to find out what's wrong.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-24 14:33 ` ro at gcc dot gnu.org
@ 2024-02-01  6:26 ` pinskia at gcc dot gnu.org
  2024-02-01 11:40 ` doko at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-01  6:26 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Which glibc are you using?

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82346 and maybe
https://sourceware.org/bugzilla/show_bug.cgi?id=22146

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-01  6:26 ` pinskia at gcc dot gnu.org
@ 2024-02-01 11:40 ` doko at gcc dot gnu.org
  2024-02-01 17:39 ` sjames at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-01 11:40 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
glibc 2.37 from the branch

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-01 11:40 ` doko at gcc dot gnu.org
@ 2024-02-01 17:39 ` sjames at gcc dot gnu.org
  2024-02-01 19:10 ` glaubitz at physik dot fu-berlin.de
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-01 17:39 UTC (permalink / raw)
  To: gcc-rust

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=112836

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
Adding PR112836 to See Also because (part of this) involves posix_spawn on
sparc.

Wonder if Rainer's issue - which I've hit too - is the same as the one I'm
seeing on glibc too.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-02-01 17:39 ` sjames at gcc dot gnu.org
@ 2024-02-01 19:10 ` glaubitz at physik dot fu-berlin.de
  2024-02-01 19:16 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-02-01 19:10 UTC (permalink / raw)
  To: gcc-rust

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.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-02-01 19:10 ` glaubitz at physik dot fu-berlin.de
@ 2024-02-01 19:16 ` pinskia at gcc dot gnu.org
  2024-02-01 19:18 ` sjames at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-01 19:16 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #5)
> (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;

Let me look that seems like an unitialized variable. If it is obvious one, I
will apply a patch.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-02-01 19:16 ` pinskia at gcc dot gnu.org
@ 2024-02-01 19:18 ` sjames at gcc dot gnu.org
  2024-02-01 19:54 ` glaubitz at physik dot fu-berlin.de
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-01 19:18 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Sam James from comment #4)
(sorry, I misread Rainer's comment - he was talking about glibc too.)

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-02-01 19:18 ` sjames at gcc dot gnu.org
@ 2024-02-01 19:54 ` glaubitz at physik dot fu-berlin.de
  2024-02-01 20:03 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-02-01 19:54 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #8 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Andrew Pinski from comment #6)
> Let me look that seems like an unitialized variable. If it is obvious one, I
> will apply a patch.

Thanks. I was actually researching the above error message and one explanation
was that variables passed to the posix_spawn() API might uninitialized when
triggering this error message.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-02-01 19:54 ` glaubitz at physik dot fu-berlin.de
@ 2024-02-01 20:03 ` pinskia at gcc dot gnu.org
  2024-02-01 20:09 ` glaubitz at physik dot fu-berlin.de
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-01 20:03 UTC (permalink / raw)
  To: gcc-rust

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31068

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #6)
> > 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;
> 
> Let me look that seems like an unitialized variable. If it is obvious one, I
> will apply a patch.

So I looked into pex-unix.c and the code does the right thing:
  ret = posix_spawnattr_init (&attr);
...
  ret = posix_spawn_file_actions_init (&actions);


And looking into glibc we have just basically:
  memset (attr, '\0', sizeof (*attr)); //__posix_spawnattr_init 
  memset (file_actions, '\0', sizeof (*file_actions)); //
__posix_spawn_file_actions_init

And that code has not changed in glibc for years (over 10) either.
So maybe memset is not working correctly. 

oh look at this a memset issue on sparc glibc:
https://sourceware.org/bugzilla/show_bug.cgi?id=31068 .

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-02-01 20:03 ` pinskia at gcc dot gnu.org
@ 2024-02-01 20:09 ` glaubitz at physik dot fu-berlin.de
  2024-02-01 20:16 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-02-01 20:09 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #10 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Andrew Pinski from comment #9)
> oh look at this a memset issue on sparc glibc:
> https://sourceware.org/bugzilla/show_bug.cgi?id=31068 .

Hmm, but this would be sparc32. Are you sure that this applies here?

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-02-01 20:09 ` glaubitz at physik dot fu-berlin.de
@ 2024-02-01 20:16 ` pinskia at gcc dot gnu.org
  2024-02-02  8:39 ` bruno at clisp dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-01 20:16 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #10)
> (In reply to Andrew Pinski from comment #9)
> > oh look at this a memset issue on sparc glibc:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=31068 .
> 
> Hmm, but this would be sparc32. Are you sure that this applies here?

Hmm, that is true. Still that does seem like memset is not working correctly.
Someone will need to debug memset because this code looks correct otherwise.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2024-02-01 20:16 ` pinskia at gcc dot gnu.org
@ 2024-02-02  8:39 ` bruno at clisp dot org
  2024-02-02  8:43 ` pinskia at gcc dot gnu.org
  2024-02-12 23:40 ` glaubitz at physik dot fu-berlin.de
  15 siblings, 0 replies; 17+ messages in thread
From: bruno at clisp dot org @ 2024-02-02  8:39 UTC (permalink / raw)
  To: gcc-rust

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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno at clisp dot org

--- Comment #12 from Bruno Haible <bruno at clisp dot org> ---
For reference: The Gnulib unit tests for posix_spawn* pass on sparc-linux-gnu
(both in 32-bit mode and in 64-bit mode).

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2024-02-02  8:39 ` bruno at clisp dot org
@ 2024-02-02  8:43 ` pinskia at gcc dot gnu.org
  2024-02-12 23:40 ` glaubitz at physik dot fu-berlin.de
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  8:43 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Bruno Haible from comment #12)
> For reference: The Gnulib unit tests for posix_spawn* pass on
> sparc-linux-gnu (both in 32-bit mode and in 64-bit mode).

But the issue sounds very intermittent which makes it sound like memset might
not always work. Even if the GNUlib unit test works, it might be different
alignment of the variables on the stack or something like that is causing the
failures there ...

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rust/113553] rust fails to build on sparc64-linux-gnu
  2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2024-02-02  8:43 ` pinskia at gcc dot gnu.org
@ 2024-02-12 23:40 ` glaubitz at physik dot fu-berlin.de
  15 siblings, 0 replies; 17+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-02-12 23:40 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #14 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
The posix_spawn() issue on sparc64 is explained in more detail, including a
reproducer, here:
https://lore.kernel.org/sparclinux/3ae4130c-c5aa-428e-b819-44cf2daf2af1@mkarcher.dialup.fu-berlin.de/

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-02-12 23:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23  8:15 [Bug rust/113553] New: rust fails to build on spar64-linux-gnu doko at gcc dot gnu.org
2024-01-23  8:15 ` [Bug rust/113553] " doko at gcc dot gnu.org
2024-01-23  8:21 ` [Bug rust/113553] rust fails to build on sparc64-linux-gnu doko at gcc dot gnu.org
2024-01-24 14:33 ` ro at gcc dot gnu.org
2024-02-01  6:26 ` pinskia at gcc dot gnu.org
2024-02-01 11:40 ` doko at gcc dot gnu.org
2024-02-01 17:39 ` sjames at gcc dot gnu.org
2024-02-01 19:10 ` glaubitz at physik dot fu-berlin.de
2024-02-01 19:16 ` pinskia at gcc dot gnu.org
2024-02-01 19:18 ` sjames at gcc dot gnu.org
2024-02-01 19:54 ` glaubitz at physik dot fu-berlin.de
2024-02-01 20:03 ` pinskia at gcc dot gnu.org
2024-02-01 20:09 ` glaubitz at physik dot fu-berlin.de
2024-02-01 20:16 ` pinskia at gcc dot gnu.org
2024-02-02  8:39 ` bruno at clisp dot org
2024-02-02  8:43 ` pinskia at gcc dot gnu.org
2024-02-12 23:40 ` glaubitz at physik dot fu-berlin.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).