Created attachment 1351 [details] uClibc .config file When trying to build busybox for mips64el, against git HEAD, I had the following build error: ========== archival/lib.a(bbunzip.o): In function `bbunpack': bbunzip.c:(.text.bbunpack+0x1f8): warning: the use of OBSOLESCENT `utime' is discouraged, use `utimes' networking/lib.a(ipcalc.o): In function `ipcalc_main': ipcalc.c:(.text.ipcalc_main+0x350): warning: gethostbyaddr is obsolescent, use getaddrinfo() instead. libbb/lib.a(inet_common.o): In function `INET_resolve': inet_common.c:(.text.INET_resolve+0x70): warning: gethostbyname is obsolescent, use getnameinfo() instead. libbb/lib.a(xfuncs.o): In function `close_on_exec_on': xfuncs.c:(.text.close_on_exec_on+0xc): undefined reference to `fcntl64' libbb/lib.a(xfuncs.o): In function `ndelay_off': xfuncs.c:(.text.ndelay_off+0x14): undefined reference to `fcntl64' xfuncs.c:(.text.ndelay_off+0x34): undefined reference to `fcntl64' libbb/lib.a(xfuncs.o): In function `ndelay_on': xfuncs.c:(.text.ndelay_on+0x14): undefined reference to `fcntl64' xfuncs.c:(.text.ndelay_on+0x2c): undefined reference to `fcntl64' loginutils/lib.a(getty.o):getty.c:(.text.getty_main+0x2f8): more undefined references to `fcntl64' follow collect2: ld returned 1 exit status make[3]: *** [busybox_unstripped] Error 1 This seems to be same error as Rob Landley[1], but against nptl. See attachment for uClibc .config [1] http://www.mail-archive.com/uclibc@uclibc.org/msg04792.html Thanks,
can you also attach preprocessed output of libbb/xfuncs.c please ? It seems fcntl is defined to fcntl64 for some reason but the syscall is missing hence uclibc does not have the function for it. it will help if you can attach the preprocessed file.
Khem, preprocessed output of libbb/xfuncs.c sent directly to you, beacuse buzilla (due to its size) and uclibc ML moderator reject it.
The x86_64 headers for uClibc have include/fcntl.h as: #ifndef __USE_FILE_OFFSET64 extern int fcntl (int __fd, int __cmd, ...); libc_hidden_proto(fcntl) #else # ifdef __REDIRECT extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); # else # define fcntl fcntl64 # endif #endif #ifdef __USE_LARGEFILE64 extern int fcntl64 (int __fd, int __cmd, ...); libc_hidden_proto(fcntl64) #endif Either the REDIRECT or the #define fcntl fcntl64 might have something to do with it. Just a thought.
And while we're at it, libc/sysdeps/linux/common/__syscall_fcntl.c: #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__ strong_alias(fcntl,fcntl64) #endif Which direction should that go in? Is the new symlink the first or the second argument? I'll try swapping 'em... CC libc/sysdeps/linux/common/__syscall_fcntl64.os libc/sysdeps/linux/common/__syscall_fcntl.c:49: error: redefinition of 'fcntl' libc/sysdeps/linux/common/__syscall_fcntl.c:20: error: previous definition of 'fcntl' was here Ok, that wasn't it. I have no idea how this build system works. It's far more complicated than it has any obvious reason to be.
This works fine with 0.9.33.1 or later.