GNU bug report logs - #72725
[core-updates] [i686-linux] guile-static fails to build

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Tue, 20 Aug 2024 07:36:02 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 72725 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 72725 <at> debbugs.gnu.org
Subject: Re: bug#72725: [core-updates] [i686-linux] guile-static fails to build
Date: Thu, 22 Aug 2024 00:34:28 +0200
Hi,

Ricardo Wurmus <rekado <at> 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:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix shell --pure -s x86_64-linux gcc-toolchain <at> 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 <at> 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]));
}
--8<---------------cut here---------------end--------------->8---

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

Ludo’.




This bug report was last modified 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.