I'm attempting to build udhcp and haserl and having 
some...complications...that may be beyond me.

When I attempt to make udhcp, I can tell that it's using the host gcc 
instead of the target gcc ($CLFS/cross-tools/<target arch>-gcc).

****output of error start********
[root /mnt/vj/sources/udhcp-0.9.8]# make PREFIX=$CLFS/usr
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer dhcpd.c
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer arpping.c
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer files.c
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer leases.c
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer serverpacket.c
serverpacket.c: In function 'add_bootp_options':
serverpacket.c:101: warning: pointer targets in passing argument 1 of 
'strncpy' differ in signedness
serverpacket.c:103: warning: pointer targets in passing argument 1 of 
'strncpy' differ in signedness
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer options.c
options.c: In function 'add_simple_option':
options.c:160: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer socket.c
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer packet.c
packet.c: In function 'get_packet':
packet.c:73: warning: pointer targets in passing argument 1 of 'strncmp' 
differ in signedness
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer pidfile.c
gcc  dhcpd.o arpping.o files.o leases.o serverpacket.o options.o 
socket.o packet.o pidfile.o -o udhcpd
gcc -c -DSYSLOG -W -Wall -Wstrict-prototypes -DVERSION='"0.9.8"' -Os 
-fomit-frame-pointer dhcpc.c
dhcpc.c: In function 'perform_renew':
dhcpc.c:135: error: label at end of compound statement
dhcpc.c: In function 'main':
dhcpc.c:254: warning: pointer targets in passing argument 1 of 'strncpy' 
differ in signedness
dhcpc.c:269: warning: pointer targets in passing argument 1 of 'strncpy' 
differ in signedness
make: *** [dhcpc.o] Error 1
************end of output****************

I looked at the Makefile and noticed that just about everything is 
defined--prefix, CC, LD, STRIP--thus not using the environment variables 
passed from the shell (right?).

I commented out all of the lines that specify anything already defined 
in the environment (CC, LD, STRIP). When I tried to make it again, I get 
a metric ton of undefined references to regular functions like socket 
and printf.

When I attempt to make haserl, this is the output:

[root /mnt/vj/sources/haserl-0.9.16]# ./configure --prefix=$CLFS/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... missing
checking for working autoconf... found
checking for working automake-1.4... missing
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... i486-pc-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C 
compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
[root /mnt/vj/sources/haserl-0.9.16]#

If I create a dummy.c file with something like "int main(){return 0};" 
in it and compile it, it works fine, but obviously I can't run it 
because my host environment is different (host is i686 glibc, target is 
i486 uclibc).

Relevant lines from config.log:

configure:2357: i486-pc-linux-uclibc-gcc -V >&5
i486-pc-linux-uclibc-gcc: '-V' option must have argument
configure:2360: $? = 1
configure:2383: checking for C compiler default output file name
configure:2410: i486-pc-linux-uclibc-gcc    conftest.c  >&5
configure:2413: $? = 0
configure:2451: result: a.out
configure:2468: checking whether the C compiler works
configure:2478: ./a.out
./configure: line 2479: ./a.out: No such file or directory
configure:2481: $? = 127
configure:2490: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

I know that there is probably not anything wrong with my build 
environment variables or permissions or the like, because I built 
dnsmasq just fine just now.

Ideas?
_______________________________________________
Clfs-support mailing list
Clfs-support@lists.cross-lfs.org
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support

Reply via email to