[uClibc] i386 bulidroot toolchain failures at gcc

Jeremy Jones jeremy at samnjack.com
Mon Oct 20 15:38:26 UTC 2003


Hi folks,

I've been trying to get together a system using uClibc-0.9.21 w/the
latest CVS buildroot system.  I've tried this on my distro of choice,
Crux 1.2, from within the downloadable root_fs_i386 w/added gettext
(needed for the binutils build, apparently) and proper (i.e. non-busybox
versions) of wget, gzip, bzip2, and tar, as well as on (as what I hoped
would be a last resort) RedHat 9.  

Here's what the errors look like, during the gcc compile for the
toolchain:

which: no mkfs.jffs2 in
(/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/opt/bin)
PATH=/usr/src/buildroot/build_i386/staging_dir/bin:/bin:/sbin:/usr/bin:/
usr/sbin
 make  -C /usr/src/buildroot/toolchain_build_i386/gcc-3.3-initial \
 
AR_FOR_TARGET=/usr/src/buildroot/build_i386/staging_dir/bin/i386-uclibc-
ar \
 
RANLIB_FOR_TARGET=/usr/src/buildroot/build_i386/staging_dir/bin/i386-ucl
ibc-
ranlib
make[1]: Entering directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-ini
tial'
make[2]: Entering directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-ini
tial/libiberty'
make[3]: Entering directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-ini
tial/libiberty/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-init
ial/libiberty/testsuite'
make[2]: Leaving directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-init
ial/libiberty'
make[2]: Entering directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-ini
tial/gcc'
(cd intl && make all)
make[3]: Entering directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-ini
tial/gcc/intl'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-init
ial/gcc/intl'
/usr/src/buildroot/toolchain_build_i386/gcc-3.3-initial/gcc/xgcc
-B/usr/src/buil
droot/toolchain_build_i386/gcc-3.3-initial/gcc/
-B/usr/src/buildroot/build_i386/
staging_dir/i386-linux/bin/
-B/usr/src/buildroot/build_i386/staging_dir/i386-lin
ux/lib/ -isystem
/usr/src/buildroot/build_i386/staging_dir/i386-linux/include -O
2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes
-isystem ./include  -I. -I.
-I/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/
gcc -I/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/.
-I/usr/src/buildro
ot/toolchain_build_i386/gcc-3.3.2/gcc/config
-I/usr/src/buildroot/toolchain_buil
d_i386/gcc-3.3.2/gcc/../include  -g0 -finhibit-size-directive
-fno-inline-functi
ons -fno-exceptions -fno-zero-initialized-in-bss -fno-omit-frame-pointer
\
   -c /usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crtstuff.c
-DCRT_BEG
IN \
  -o crtbegin.o
In file included from
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crts
tuff.c:62:
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:72:19:
stdio.h:
No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:75:23:
sys/types
.h: No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:78:19:
errno.h:
No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:85:20:
string.h:
 No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:89:20:
stdlib.h:
 No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:90:20:
unistd.h:
 No such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/tsystem.h:96:18:
time.h: N
o such file or directory
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crtstuff.c: In
function `_
_do_global_dtors_aux':
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crtstuff.c:277:
warning: p
assing arg 1 of `__deregister_frame_info_bases' discards qualifiers from
pointer
 target type
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crtstuff.c: In
function `f
rame_dummy':
/usr/src/buildroot/toolchain_build_i386/gcc-3.3.2/gcc/crtstuff.c:313:
warning: p
assing arg 1 of `__register_frame_info_bases' discards qualifiers from
pointer t
arget type
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-init
ial/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/usr/src/buildroot/toolchain_build_i386/gcc-3.3-init
ial'
make: ***
[/usr/src/buildroot/toolchain_build_i386/gcc-3.3-initial/.compiled] Er
ror 2

Here's what my toplevel Makefile looks like:

ARCH:=i386
USE_UCLIBC_TOOLCHAIN:=true
GCC_2_95_TOOLCHAIN:=false
USE_UCLIBC_SNAPSHOT:=false
USE_BUSYBOX_SNAPSHOT:=false
BUILD_WITH_LARGEFILE:=true
WGET:=wget --passive-ftp
OPTIMIZE_FOR_CPU=$(ARCH)
EXTRA_GCC_CONFIG_OPTIONS=
ENABLE_LOCALE:=true
MULTILIB:=--enable-multilib
INSTALL_LIBSTDCPP=true
ifeq ($(USE_UCLIBC_TOOLCHAIN),true)
ifeq ($(GCC_2_95_TOOLCHAIN),true)
TARGETS+=binutils uclibc-configured gcc2_95
else
TARGETS+=binutils uclibc-configured gcc3_3
endif
else
TARGETS+=uclibc
endif
TARGETS+=kernel-headers
TARGETS+=busybox tinylogin
TARGETS+=coreutils findutils bash make diffutils patch sed
TARGETS+=ed flex bison file gawk tar grep
TARGETS+=gcc3_3_target
TARGETS+=ncurses-headers zlib-headers openssl-headers
TARGETS+=m4 autoconf automake libtool
TARGETS+=perl
TARGETS+=ext2root
HOSTCC:=gcc
BASE_DIR:=${shell pwd}
SOURCE_DIR:=$(BASE_DIR)/sources
DL_DIR:=$(SOURCE_DIR)/dl
PATCH_DIR=$(SOURCE_DIR)/patches
BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)
TARGET_DIR:=$(BUILD_DIR)/root
STAGING_DIR=$(BUILD_DIR)/staging_dir
TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)
TARGET_PATH=$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin
TARGET_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
TARGET_CC=$(TARGET_CROSS)gcc
STRIP=$(TARGET_CROSS)strip --remove-section=.comment
--remove-section=.note
IMAGE:=$(BASE_DIR)/root_fs_$(ARCH)
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
KERNEL_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
        -e 's/sparc.*/sparc/' \
        -e 's/arm.*/arm/g' \
        -e 's/m68k.*/m68k/' \
        -e 's/ppc/powerpc/g' \
        -e 's/v850.*/v850/g' \
        -e 's/sh[234]/sh/' \
        -e 's/mips-.*/mips/' \
        -e 's/mipsel-.*/mipsel/' \
        -e 's/cris.*/cris/' \
        -e 's/i[3-9]86/i386/' \
        )
GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
                AR=$(TARGET_CROSS)ar \
                AS=$(TARGET_CROSS)as \
                LD=$(TARGET_CROSS)ld \
                NM=$(TARGET_CROSS)nm \
                CC=$(TARGET_CROSS)gcc \
                GCC=$(TARGET_CROSS)gcc \
                CXX=$(TARGET_CROSS)g++ \
                RANLIB=$(TARGET_CROSS)ranlib
TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)
ifeq ($(ENABLE_LOCALE),true)
DISABLE_NLS:=
else
DISABLE_NLS:=--disable-nls
endif
all:   world
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
.PHONY: all world clean dirclean distclean source $(TARGETS) \
        $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE)
include make/*.mk
$(DL_DIR):
        mkdir $(DL_DIR)
$(BUILD_DIR):
        mkdir $(BUILD_DIR)
$(STAGING_DIR):
        rm -rf $(STAGING_DIR)
        mkdir -p $(STAGING_DIR)/lib
        mkdir -p $(STAGING_DIR)/usr/lib
        mkdir -p $(STAGING_DIR)/include
$(TARGET_DIR):
        rm -rf $(TARGET_DIR)
        zcat $(SOURCE_DIR)/skel.tar.gz | tar -C $(BUILD_DIR) -xf -
        cp -a $(SOURCE_DIR)/target_skeleton/* $(TARGET_DIR)/
        -find $(TARGET_DIR) -type d -name CVS -exec rm -rf {} \; >
/dev/null 2>&1
source: $(TARGETS_SOURCE)
clean: $(TARGETS_CLEAN)
        rm -rf $(TARGET_DIR) $(STAGING_DIR) $(IMAGE)
dirclean: $(TARGETS_DIRCLEAN)
        rm -rf $(TARGET_DIR) $(STAGING_DIR) $(IMAGE)
distclean:
        rm -rf $(DL_DIR) $(BUILD_DIR) $(LINUX_KERNEL) $(IMAGE)
sourceball:
        rm -rf $(BUILD_DIR)
        set -e; \
        cd ..; \
        rm -f buildroot.tar.bz2; \
        tar -cvf buildroot.tar buildroot; \
        bzip2 -9 buildroot.tar; \

Pretty much vanilla, just not using snapshot uClibc/busybox (though this
is irrelevant, since I've tried snapshot versions as well), adding
development software to the targets, & trying to use locale support.
I've also tried using gcc-3.3.1 instead of 3.3.2, but it makes no
difference.  Has anyone seen these errors lately?  

Or, if nobody has seen these errors AND they've been successful building
the latest buildroot, PLEASE let me know what platform you're using for
this.  

On a side note, for Erik or anyone maintaining the buildroot/root_fs
stuff: ideally, IMHO, the developemnt system should be able to build
itself, right?  Or is this not particularly important?

Thanks,
Jeremy





More information about the uClibc mailing list