[uClibc]Compile fileutils against uClibc

Martin Sieper msi at ngi-box.de
Mon Feb 4 16:57:49 UTC 2002


Hi,

just in time I have compiled fileutils-4.1 with configure options 
like this:
		--prefix=/usr
		--sysconfdir=/etc
		--localstatedir=/var
		--infodir=/usr/share/info
		--mandir=/usr/share/man
		--libexecdir=/usr/lib
		--host=i486-pc-linux-gnu
		--target=i486-pc-linux-gnu
		--build=i486-pc-linux-gnu
		--without-included-gettext
		--disable-nls

and this little patch:

--- lib/human.c.orig	Fri Jun 16 14:51:28 2000
+++ lib/human.c	Tue Jan  1 23:40:28 2002
@@ -59,6 +59,7 @@
 
 #include <argmatch.h>
 #include <error.h>
+#include <stdint.h>
 #include <xstrtol.h>
 
 #include "human.h"



It compiles now without errors but some executables have a problem. 
dir(1), ls(1), shred(1) and vdir(1) gives me a segmentation fault.

I've found what is wrong. The apps needs the function clock_gettime() 
but uClibc hasn't it, so ld link this apps against the system 
installed librt and this library comes with the glibc. The script
configure test if clock_gettime() in the librt availiable and found 
this. For workaround I remove the library name in the script 
configure before I let run it.

	mv configure configure.orig
	sed -e 's/rt posix4/posix4/' \
	configure.orig >configure
	chmod +x configure

After this the compile fails in lib/libfetish.a because the linker 
can't find a symbol in dependency of weak_alias. For workaround 
I've made this patch:

--- lib/strverscmp.c.orig	Thu Nov 16 10:08:53 2000
+++ lib/strverscmp.c	Mon Feb  4 17:40:47 2002
@@ -50,9 +50,7 @@
 #undef __strverscmp
 #undef strverscmp
 
-#ifndef weak_alias
 # define __strverscmp strverscmp
-#endif
 
 /* Compare S1 and S2 as strings holding indices/version numbers,
    returning less than, equal to or greater than zero if S1 is less than,



Yeah, that's it! Yet fileutils compiles and working fine.

  -Martin



More information about the uClibc mailing list