bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreutils 4.5.2 fail to build on Solaris 2.6


From: Petter Reinholdtsen
Subject: coreutils 4.5.2 fail to build on Solaris 2.6
Date: Sat, 12 Oct 2002 14:15:19 +0200

These are some quotes from trying to compile coreutils 4.5.2 on
Solaris 2.6.  As you can se, the fesetround() function is required by
sleep, but missing in the build

  checking for fesetround... no
  checking for fesetround in -lm... no
  [...]
  cc-wrapper -DLOCALEDIR=\"/local/share/locale\"
    -DSHAREDIR=\"/local/share\" -DHAV
  E_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -c `test -f
    'tail.c' || echo './'`tail.c
  cc-wrapper -g -o tail tail.o ../lib/libfetish.a ../lib/libfetish.a
    -lposix4 -lposix4 -lgen -lnsl
  ild: (undefined symbol) fesetround -- referenced in the text segment
    of ../lib/libfetish.a(xnanosleep.o)
  make[3]: *** [tail] Error 5
  make[3]: Leaving directory
    `/usit/slytherin/local/store/slytherin/coreutils-c/src-4.5.2-sun4os56/src'

I sugguest adding a simple replacement function always returning
error:

  int fesetround(int rounding_mode)
  {
    return -1;
  }

Or perhaps the code should be rewritten to only use fesetround() if it
is available:

diff -ur src-4.5.2/lib/xnanosleep.c src-4.5.2-local/lib/xnanosleep.c
--- src-4.5.2/lib/xnanosleep.c  2002-09-15 08:52:29.000000000 +0200
+++ src-4.5.2-local/lib/xnanosleep.c    2002-10-12 14:01:20.000000000 +0200
@@ -138,7 +138,7 @@
 
   assert (0 <= seconds);
 
-#ifdef FE_UPWARD
+#if defined(FE_UPWARD) && defined(HAVE_FESETROUND)
   if (! initialized)
     {
       /* Always round up, since we must sleep for at least the specified

This patch fixed the compile problem on Solaris at least.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]