Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549860 - dev-scheme/guile should fall back to a link-time test for csqrt when cross-compiling
Summary: dev-scheme/guile should fall back to a link-time test for csqrt when cross-co...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Scheme Project
Depends on:
Reported: 2015-05-18 22:17 UTC by ytrezq
Modified: 2015-05-19 05:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description ytrezq 2015-05-18 22:17:08 UTC
dev-scheme/guile rely on csqrt() which is not provided in any version/configuration of uClibc.

The source code of uClibc source code contains test and the functions definition inside .h files but is implementation free.

So when emerging, you end up with
./.libs/ undefined reference to `csqrt'
collect2: error: ld returned 1 exit status
make[3]: *** [guile] Erreur 1
Comment 1 ytrezq 2015-05-18 22:34:40 UTC
dependencies include autogen on which depend gnutls which is used by many packages
Comment 2 ytrezq 2015-05-19 00:28:50 UTC
Update from configure in guile : line 834
# glibc 2.3.6 (circa 2006) and various prior versions had a bug where
# csqrt(-i) returned a negative real part, when it should be positive
# for the principal root.
if test "$ac_cv_type_complex_double" = yes; then
  AC_CACHE_CHECK([whether csqrt is usable],
#include <complex.h>
/* "volatile" is meant to prevent gcc from calculating the sqrt as a
   constant, we want to test libc. */
volatile complex double z = - _Complex_I;
main (void)
  z = csqrt (z);	
  if (creal (z) > 0.0)
    return 0;  /* good */
    return 1;  /* bad */
    [guile_cv_use_csqrt="no, glibc 2.3 bug"],
    [guile_cv_use_csqrt="yes, hopefully (cross-compiling)"])])

It seems the configure script tries to compile and run a program for testing the support. But in the case of cross compiling configure assume csqrt is supported by default.

You might say this is upstream but autogen depends on guile shared libraries and gnutls depends on the shared libraries of autogen. This is not compile time. It really breaks many packages.