[BusyBox 0003024]: Mistake of compilation
bugs at busybox.net
bugs at busybox.net
Wed Apr 23 18:51:33 UTC 2008
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=3024
======================================================================
Reported By: lamer
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 3024
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: reopened
Fixed in Version:
======================================================================
Date Submitted: 04-22-2008 01:15 PDT
Last Modified: 04-23-2008 11:51 PDT
======================================================================
Summary: Mistake of compilation
Description:
Mistake of compilation
======================================================================
----------------------------------------------------------------------
vda - 04-22-08 02:05
----------------------------------------------------------------------
Either install selinux headers, or unset CONFIG_SELINUX in .config.
----------------------------------------------------------------------
lamer - 04-22-08 05:08
----------------------------------------------------------------------
Thanks, I stupe, sorry ...
test:/usr/src/busybox-1.10.1# yes|apt-get install libselinux1-dev >
/dev/null
test:/usr/src/busybox-1.10.1# make clean
CLEAN applets
CLEAN .tmp_versions
CLEAN busybox_unstripped.out .kernelrelease
test:/usr/src/busybox-1.10.1# make > /dev/null
cc1: warnings being treated as errors
coreutils/who.c: In function 'who_main':
coreutils/who.c:68: warning: passing argument 1 of 'ctime' from
incompatible pointer type
make[1]: *** [coreutils/who.o] Error 1
make: *** [coreutils] Error 2
test:/usr/src/busybox-1.10.1# cat .config|sed "s/WHO=y/WHO=n/g;" >
.config.tmp;mv .config.tmp .config
test:/usr/src/busybox-1.10.1# make clean > /dev/null
test:/usr/src/busybox-1.10.1# make > /dev/null
shell/hush.c:90:2: error: #warning On NOMMU, hush command substitution is
dangerous.
shell/hush.c:91:2: error: #warning Dont use it for commands which produce
lots of output.
shell/hush.c:92:2: error: #warning For more info see shell/hush.c,
generate_stream_from_list().
make[1]: *** [shell/hush.o] Error 1
make: *** [shell] Error 2
test:/usr/src/busybox-1.10.1# make menuconfig
scripts/kconfig/mconf Config.in
#
# using defaults found in .config
#
....
*** End of busybox configuration.
*** Execute 'make' to build busybox or try 'make help'.
test:/usr/src/busybox-1.10.1# grep -i hush .config
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_JOB is not set
# CONFIG_HUSH_TICK is not set
# CONFIG_HUSH_IF is not set
# CONFIG_HUSH_LOOPS is not set
test:/usr/src/busybox-1.10.1# make clean > /dev/null
test:/usr/src/busybox-1.10.1# make | tail -n 13
make: *** [busybox_unstripped] Error 1
networking/lib.a(inetd.o): In function `reread_config_file':
/usr/src/busybox-1.10.1/networking/inetd.c:969: warning: Using
'getrpcbyname' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlerror':
(.text+0x1): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlclose':
(.text+0x11): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlsym':
(.text+0x21): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlopen':
(.text+0x36): undefined reference to `dlopen'
shell/lib.a(ash.o): In function `forkshell':
/usr/src/busybox-1.10.1/shell/ash.c:4589: undefined reference to
`BUG_fork_is_unavailable_on_nommu'
collect2: ld returned 1 exit status
----------------------------------------------------------------------
vda - 04-22-08 07:01
----------------------------------------------------------------------
cc1: warnings being treated as errors
if you don't want this, switch off CONFIG_WERROR=y.
coreutils/who.c: In function 'who_main':
coreutils/who.c:68: warning: passing argument 1 of 'ctime' from
incompatible pointer type
Your libc headers are broken. They should contain these defs:
char *ctime(const time_t *timep);
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
but obviously they have some problem there,
and thus gcc doesn't like "ctime(&(ut->ut_tv.tv_sec))" construct.
----------------------------------------------------------------------
vda - 04-22-08 07:03
----------------------------------------------------------------------
> networking/lib.a(inetd.o): In function `reread_config_file':
/usr/src/busybox-1.10.1/networking/inetd.c:969: warning: Using
'getrpcbyname' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking
Static linking against glibc is prone to errors. Static linking against
PAM is probably not going to work at all.
----------------------------------------------------------------------
vda - 04-22-08 07:04
----------------------------------------------------------------------
/usr/src/busybox-1.10.1/shell/ash.c:4589: undefined reference to
`BUG_fork_is_unavailable_on_nommu'
collect2: ld returned 1 exit status
ash can't work on NOMMU architectures. Either switch off CONFIG_ASH, or
switch off CONFIG_NOMMU.
----------------------------------------------------------------------
lamer - 04-23-08 03:53
----------------------------------------------------------------------
Debian testing version (lenny, http://www.debian.org/releases/testing/):
.....
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlerror':
(.text+0x1): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlclose':
(.text+0x11): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlsym':
(.text+0x21): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libpam.a(pam_dynamic.o):
In function `_pam_dlopen':
(.text+0x36): undefined reference to `dlopen'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
test:/usr/src/busybox-1.10.1# cat /etc/issue.net
Debian GNU/Linux lenny/sid
test:/usr/src/busybox-1.10.1# gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --disable-libmudflap --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-3)
Debian stable version (etch, http://www.debian.org/releases/stable/):
....
cc1: warnings being treated as errors
coreutils/who.c: In function 'who_main':
coreutils/who.c:68: warning: passing argument 1 of 'ctime' from
incompatible pointer type
make[1]: *** [coreutils/who.o] Error 1
make: *** [coreutils] Error 2
....
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_free_handlers':
(.text+0x17a): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_parse_conf_file':
(.text+0x885): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_parse_conf_file':
(.text+0x90e): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_parse_conf_file':
(.text+0xadd): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_parse_conf_file':
(.text+0xd56): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libpam.a(pam_handlers.o):
In function `_pam_parse_conf_file':
(.text+0xd8a): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
test1:/usr/src/busybox-1.10.1# cat /etc/issue.net
Debian GNU/Linux 4.0
test1:/usr/src/busybox-1.10.1# gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
On what version it should be compiled without mistakes?
----------------------------------------------------------------------
vda - 04-23-08 04:15
----------------------------------------------------------------------
On my desktop Linux machine with glibc 2.4 and gcc 4.2.3:
I untarred 1.10.1, did "make allyesconfig", then switched off
CONFIG_SELINUX, CONFIG_STATIC and CONFIG_NOMMU. Then ran make. Result:
...
CC util-linux/volume_id/xfs.o
AR util-linux/volume_id/lib.a
LINK busybox_unstripped
Trying libraries: crypt m pam pam_misc
Library crypt is needed
Library m is needed
Library pam is not needed
Library pam_misc is needed
Library crypt is needed
Library m is needed
Library pam_misc is needed
Final link with: crypt m pam_misc
Regarding this:
cc1: warnings being treated as errors
coreutils/who.c: In function 'who_main':
coreutils/who.c:68: warning: passing argument 1 of 'ctime' from
incompatible pointer type
make[1]: *** [coreutils/who.o] Error 1
make: *** [coreutils] Error 2
*AS I ALREADY SAID*: your libc headers are broken; but switching off
CONFIG_WERROR will let you ignore this.
As for "undefined reference to `dlopen'": *AS I ALREADY SAID*, you are
trying to link in PAM statically. Don't do that. IT WILL NOT WORK. Switch
off CONFIG_STATIC.
> On what version it should be compiled without mistakes?
As soon as some Linux distribution will hire me to ensure that busybox
builds on *their* disribution (with old libc, compilers and so on), I will
be happy to work specifically on that.
Issue History
Date Modified Username Field Change
======================================================================
04-22-08 01:15 lamer New Issue
04-22-08 01:15 lamer Status new => assigned
04-22-08 01:15 lamer Assigned To => BusyBox
04-22-08 02:05 vda Status assigned => closed
04-22-08 02:05 vda Note Added: 0006864
04-22-08 02:05 vda Resolution open => no change
required
04-22-08 05:08 lamer Status closed => feedback
04-22-08 05:08 lamer Resolution no change required =>
reopened
04-22-08 05:08 lamer Note Added: 0006894
04-22-08 07:01 vda Note Added: 0006924
04-22-08 07:03 vda Note Added: 0006934
04-22-08 07:04 vda Note Added: 0006944
04-22-08 11:28 vda Status feedback => closed
04-22-08 11:28 vda Resolution reopened => no change
required
04-23-08 03:53 lamer Status closed => feedback
04-23-08 03:53 lamer Resolution no change required =>
reopened
04-23-08 03:53 lamer Note Added: 0006984
04-23-08 04:12 vda Note Added: 0006994
04-23-08 04:13 vda Note Edited: 0006994
04-23-08 04:14 vda Note Edited: 0006994
04-23-08 04:15 vda Note Edited: 0006994
04-23-08 11:51 vda Status feedback => closed
======================================================================
More information about the busybox-cvs
mailing list