[core-updates] [i686-linux] guile-static fails to build

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
important
R
R
Ricardo Wurmus wrote on 20 Aug 09:34 +0200
(address . bug-guix@gnu.org)
87o75n8x6p.fsf@elephly.net
I'm attempting to use "guix deploy" to deploy to a i686-linux system.
The build of /gnu/store/c9ivpr5g7arp67kgfhnp37z22gadg6zp-guile-static-3.0.9.drv fails. This is needed
for the initrd derivations /gnu/store/nqrfgnq84i8qrabzf2022rhw926i70ab-guile-static-initrd-3.0.9.drv
and /gnu/store/gz0p3q9zvqyvlbpsqaqy1842vjjn66xm-raw-initrd.drv.

Here is how guile-static fails:

Toggle snippet (20 lines)
CCLD guile
lto-wrapper: warning: using serial compilation of 22 LTRANS jobs
ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_dlopen':
/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/<artificial>:78:(.text+0x2d): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_tmpnam':
/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/posix.c:1757:(.text+0x1f62): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_odd_p':
/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:490:(.text+0x4a02): undefined reference to `fmod'
ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_even_p':
/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:517:(.text+0x4af2): undefined reference to `fmod'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2866: guile] Error 1
make[3]: Leaving directory '/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile'
make[2]: *** [Makefile:2725: all] Error 2
make[2]: Leaving directory '/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile'
make[1]: *** [Makefile:2152: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9'
make: *** [Makefile:2038: all] Error 2

This result was obtained on core-updates commit aab1fe98574e1cd4c7911c1e5571b3733fb71d67.

--
Ricardo
L
L
Ludovic Courtès wrote on 20 Aug 17:18 +0200
control message for bug #72725
(address . control@debbugs.gnu.org)
87wmkbrznt.fsf@gnu.org
severity 72725 important
quit
L
L
Ludovic Courtès wrote on 22 Aug 00:34 +0200
Re: bug#72725: [core-updates] [i686-linux] guile-static fails to build
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 72725@debbugs.gnu.org)
87r0aho68b.fsf@gnu.org
Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

Toggle quote (13 lines)
> Here is how guile-static fails:
>
> CCLD guile
> lto-wrapper: warning: using serial compilation of 22 LTRANS jobs
> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_dlopen':
> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/<artificial>:78:(.text+0x2d): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_tmpnam':
> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/posix.c:1757:(.text+0x1f62): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_odd_p':
> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:490:(.text+0x4a02): undefined reference to `fmod'
> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_even_p':
> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:517:(.text+0x4af2): undefined reference to `fmod'

The ‘fmod’ symbol is missing from the i686-linux libm.a, but it’s
available in the x86_64 libm-2.39.a:

Toggle snippet (18 lines)
$ ./pre-inst-env guix shell --pure -s x86_64-linux gcc-toolchain@11{,:static} -- gcc -Wall -O2 fmod.c -lm -static
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, not stripped

$ ./pre-inst-env guix shell --pure -s i686-linux gcc-toolchain@11{,:static} -- gcc -Wall -O2 fmod.c -lm -static
ld: /tmp/ccvt0V2Q.o: in function `main':
fmod.c:(.text.startup+0x3c): undefined reference to `fmod'
collect2: error: ld returned 1 exit status
$ cat fmod.c
#include <math.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
return fmod (atof (argv[1]), atof (argv[2]));
}

I’m not sure why that is the case; i686 seems to be the only one with
that problem.

Ludo’.
L
L
Ludovic Courtès wrote on 22 Aug 13:59 +0200
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 72725-done@debbugs.gnu.org)
87ed6gn4yn.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (18 lines)
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Here is how guile-static fails:
>>
>> CCLD guile
>> lto-wrapper: warning: using serial compilation of 22 LTRANS jobs
>> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_dlopen':
>> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/<artificial>:78:(.text+0x2d): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
>> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans14.ltrans.o: in function `scm_tmpnam':
>> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/posix.c:1757:(.text+0x1f62): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
>> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_odd_p':
>> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:490:(.text+0x4a02): undefined reference to `fmod'
>> ld: /tmp/guix-build-guile-static-3.0.9.drv-0/ccfveS8L.ltrans3.ltrans.o: in function `scm_even_p':
>> /tmp/guix-build-guile-static-3.0.9.drv-0/guile-3.0.9/libguile/numbers.c:517:(.text+0x4af2): undefined reference to `fmod'
>
> The ‘fmod’ symbol is missing from the i686-linux libm.a, but it’s
> available in the x86_64 libm-2.39.a:

This is an upstream bug, fixed in glibc 2.40 (glibc commit
0b716305dfb48c2d13ed4f7d06c082b90c1d226f):


Fixed in commit 87cc46aefce0072dc83e667d85a59a34eecfd89f.

Thanks,
Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72725@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72725
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch