gcc-4.1.0, glibc-2.3.2 : can't compile either busybox-1.11.1or busybox-1.11.3

Denys Vlasenko vda.linux at googlemail.com
Mon Oct 20 08:29:53 UTC 2008


On Monday 20 October 2008 09:44:16 am stanliao wrote:
> > On Fri, Oct 17, 2008 at 11:38:46AM +0800, stanliao wrote:
> > >While "networking/interface.c" is compiled, the error message looks like:
> > >
> > >----- below : compilation & error message -----
> >
> >/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/bin/arm-unknown-
> l
> > >inux-gnu-gcc -Wp,-MD,networking/.interface.o.d   -std=gnu99 -Iinclude
> > >-Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG
> > >-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> > -D_FILE_OFFSET_BITS=64
> > >-D"BB_VER=KBUILD_STR(1.11.1)" -DBB_BT=AUTOCONF_TIMESTAMP  -Wall
> > -Wshadow
> > >-Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter
> > >-Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement
> > >-Wold-style-definition -fno-builtin-strlen -finline-limit=0
> > >-fomit-frame-pointer -ffunction-sections -fdata-sections
> > >-fno-guess-branch-probability -funsigned-char -static-libgcc
> > >-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
> > >-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(interface)"
> > >-D"KBUILD_MODNAME=KBUILD_STR(interface)" -c -o networking/interface.o
> > >networking/interface.c
> > >networking/interface.c:818: error: 'ARPHRD_INFINIBAND' undeclared here
> (not
> > >in a function)
> > >make[3]: *** [networking/interface.o] Error 1
> > >----- above : compilation & error message -----
> > >
> > >ARPHRD_INFINIBAND is defined in <linux/if_arp.h> in my tool, and here
> comes
> > >my questions:
> > >Q1: networking/interface.c includes <net/if_arp.h>. However, there is no
> > >".../net/if_arp.h" exists in
> > >/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/
> > >arm-unknown-linux-gnu/include/ or busybox's header file directories. Why
> the
> > >compiler didn't compile for this file's not existence? Please note that
> > >ARPHRD_INFINIBAND is defined in <linux/if_arp.h> in this tool.
> > 
> > your kernel headers are too old.
> > The "linux/" is obviously linux specific, the "net/" include is the
> > proper one.
> You mean my tool's glibc version, 2.3.2, is too old?

Yes, it has a slight error in the placement of ARPHRD_INFINIBAND define.
However, if you unselect FEATURE_HWIB ("Support infiniband HW")
in bbox config (which you most likely don't need anyway), build will work.

> How to know that my 
> tool versions (gcc version and glibc/uclibc version) are new enough to
> busybox?

By analyzing error messages you've got.

> I get the following information from busybox's FAQ: 
> "On Linux, BusyBox releases are tested against uClibc (0.9.27 or later) and
> glibc (2.2 or later)."

Sorry, we forgot to update it when we added FEATURE_HWIB. Up to today,
we did not even know there is a problems with FEATURE_HWIB + glibc 2.3.2.
--
vda



More information about the busybox mailing list