[uClibc] Recompiling buildroot + Linux kernel

George Joseph gtj.member at peakin.com
Mon Jan 17 18:29:29 UTC 2005


Try it this way...  (you may have to unwrap the patch)

diff -urN buildroot/package/procps/procps.mk
br_gtwx/package/procps/procps.mk
--- buildroot/package/procps/procps.mk  2004-10-14 23:03:35.000000000 -0600
+++ br_gtwx/package/procps/procps.mk    2005-01-11 14:57:04.000000000 -0700
@@ -20,7 +20,7 @@
        touch $(PROCPS_DIR)/.source

 $(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source
-       $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(PROCPS_DIR)
+       $(TARGET_CONFIGURE_OPTS) $(MAKE) CPPFLAGS=-I$(STAGING_DIR)/include
CC=$(TARGET_CC) -C $(PROCPS_DIR)

 $(TARGET_DIR)/$(PROCPS_TARGET_BINARY): $(PROCPS_DIR)/$(PROCPS_BINARY)
        $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) \

-----Original Message-----
From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org] On Behalf
Of Riccardo Battistini
Sent: Monday, January 17, 2005 8:30 AM
To: uclibc at uclibc.org
Subject: [uClibc] Recompiling buildroot + Linux kernel


Hello everybody!!
I am trying to recompile buildroot 0.9.27 as downloaded plus the linux
kernel, in order to get a bootable uclibc linux system..
The compilation goes fine until props..

This is the error
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin-ccache/../l
ib/gcc/i386-linux-uclibc/3.4.3/../../../../i386-linux-uclibc/sys-include
/bits/getopt.h:47: warning: previous declaration of 'optarg' was here
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common
-ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s          -c w.c
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc
-I/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin-ccache/..
/lib/gcc/i386-linux-uclibc/3.4.3/../../../../i386-linux-uclibc/sys-inclu
de/bits/getopt.h:47: warning: previous declaration of 'optarg' was here
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common
-ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s          -c w.c
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common
-ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s         -c -o
top.o top.c
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common
-ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s         -c -o
vmstat.o vmstat.c
In file included from top.c:28:
/usr/include/ncurses/curses.h:58:33: ncurses/ncurses_dll.h: No such file
or directory
/usr/include/ncurses/curses.h:102:28: ncurses/unctrl.h: No such file or
directory
In file included from top.c:28: -fno-common -ffast-math -W -Wall
-Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual
-Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Os -pipe  -s         -c -o top.o top.c
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common
-ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s         -c -o
vmstat.o vmstat.c
In file included from top.c:28:
/usr/include/ncurses/curses.h:58:33: ncurses/ncurses_dll.h: No such file
or directory
/usr/include/ncurses/curses.h:102:28: ncurses/unctrl.h: No such file or
directory
In file included from top.c:28:
Many other and similar errors follows..

In my opinion it is something related to the -I/usr/include/ncurses
directive... Shouldn't point to the uclibc environment
./staging_dir/include or at least -/root/usr/include ?
This little patch modifi the Makefile..
-----------------------------
--- procps.mk.original	2005-01-17 16:20:21.000000000 +0100
+++ procps.mk	2005-01-17 16:11:20.000000000 +0100
@@ -17,6 +17,7 @@
 	zcat $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR)
$(TAR_OPTIONS) -
 	toolchain/patch-kernel.sh $(PROCPS_DIR) package/procps/
procps*.patch
 	$(SED) '/^CFLAGS/s:-O2:$(TARGET_CFLAGS):' $(PROCPS_DIR)/Makefile
+	$(SED)
'/^CPPFLAGS/s:-I/usr/include/ncurses:$(STAGING_DIR)/include:'
$(PROCPS_DIR)/Makefile
 	touch $(PROCPS_DIR)/.source
 
 $(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source
-----------------------------

However this patch (maybe wrong..) leads to an another error:

/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include -MM -MG
proc/alloc.c proc/devname.c proc/escape.c proc/ksym.c proc/pwcache.c
proc/readproc.c proc/sig.c proc/slab.c proc/status.c proc/sysinfo.c
proc/version.c proc/whattime.c > proc/.depend
i386-linux-uclibc-gcc:
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include: linker
input file unused because linking not done
make[1]: Leaving directory
`/usr/src/u-linux/0.9.27/buildroot/build_i386/procps-3.2.3'
make[1]: Entering directory
`/usr/src/u-linux/0.9.27/buildroot/build_i386/procps-3.2.3'
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -D_GNU_SOURCE -I proc
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include
-fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s         -c -o
uptime.o uptime.c
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -c -D_GNU_SOURCE -I proc
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include
-fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s
-DSHARED=1 -fpic proc/alloc.c -o proc/alloc.o
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/bin/i386-linux-
uclibc-gcc -c -D_GNU_SOURCE -I proc
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include
-fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Os -pipe  -s
-DSHARED=1 -fpic proc/devname.c -o proc/devname.o
i386-linux-uclibc-gcc:
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include: linker
input file unused because linking not done
i386-linux-uclibc-gcc:
/usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include: linker
input file unused because linking not done
cc1: /usr/src/u-linux/0.9.27/buildroot/build_i386/staging_dir/include:
No such file or directory
cc1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Some other orrible error follows..

Host O.S. is FC1 + updates, buildroot 0.9.27, default config plus linux
kernel

Any hints?
Ciao
Ric





More information about the uClibc mailing list