Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-compile problem (continued)



Hi Gero,

Gero Kuhlmann wrote:

> Hello,
>
> Ross Golder <rossg@cpd.co.uk> wrote:
> > In file included from main.c:22:
> > ../common.h:190: warning: redefinition of `__u8'
> > /usr/include/asm/types.h:12: warning: `__u8' previously declared
> here
>
> This is obviously a problem. I'm personally using glibc-2.0 which
> doesn't
> give any errors here, but it looks like different versions of the C
> library
> include the kernel files differently. When you run configure, it
> should
> give you lines telling:
>
> checking for definition of __uxx in types.h
> checking for definition of u_intxx_t in types.h
>
> Could you please let me know what the answers are to both checks (i.e.
>
> yes or no). Because you got the errors, I guess that you got a 'no' on
>
> both checks. If at all possible, I would greatly appreciate if you
> could
> then tell me, what main include file is necessary on your system in
> order
> to get /usr/include/asm/types.h included, and what preprocessor
> defines
> are necessary to get the __u8 etc. typedefs included. For example, on
> SCO ODT these definitions are in the file sys/bitypes.h, and on my
> system (with glibc-2.0) they don't exist at all, but are rather named
> u_intxx_t and defined in sys/types.h. This seems to vary widely.
>

I seem to be making a bit of a mess of this installation. I'd hacked
about with the code trying to get it to compile, and everyone was saying
that I shouldn't have needed to, so I decided to remove the source tree
and re-install it from the 'netboot.tar.gz' file.

Now, the problems to do with integer typedefs have disappeared. This is
probably because I didn't run another ./configure after I'd re-made the
links to the linux kernel include files.

Anyway, I seem to have come up against another compile problem. I wonder
if you could furnish me with some of your experience.

The output of my configure script :-

loading cache ./config.cache
checking whether cross-compiling... no
checking for gcc... gcc
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for as86... /usr/bin/as86
checking for correct version of as86... no
checking for a BSD compatible install... /usr/bin/install -c
checking for ANSI C header files... yes
checking for string.h... yes
checking for memory.h... yes
checking for unistd.h... yes
checking for getopt.h... yes
checking for malloc.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for sys/time.h... yes
checking for sys/param.h... yes
checking for sys/bitypes.h... yes
checking for arpa/inet.h... yes
checking for linux/config.h... yes
checking for dirent.h that defines DIR... yes
checking for -ldir... no
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for -lsocket... no
checking whether char is unsigned... no
checking for packed attribute... yes
checking for definition of __uxx in types.h... yes
checking for inline... inline
checking whether system allows accessing misaligned data... yes
checking whether byte ordering is bigendian... no
updating cache ./config.cache
creating ./config.status
creating Makefile
creating mknbi-dos/Makefile
creating mknbi-linux/Makefile
creating makerom/Makefile
creating bootrom/make.defs
creating config.h

And the output of the 'make' :-

making all in makerom
make[1]: Entering directory `/usr/src/netboot/makerom'
gcc -O  -DHAVE_CONFIG_H -DDEFAULT_DIR=\"/usr/local/lib/netboot\" -I.
-I.. -I../bootrom/headers   -c main.c -o main.o
gcc -O  -DHAVE_CONFIG_H -DDEFAULT_DIR=\"/usr/local/lib/netboot\" -I.
-I.. -I../bootrom/headers   -c config.c -o config.o
gcc -O  -DHAVE_CONFIG_H -DDEFAULT_DIR=\"/usr/local/lib/netboot\" -I.
-I.. -I../bootrom/headers   -c user.c -o user.o
gcc -O  -DHAVE_CONFIG_H -DDEFAULT_DIR=\"/usr/local/lib/netboot\" -I.
-I.. -I../bootrom/headers   -c passes.c -o passes.o
gcc -O  -DHAVE_CONFIG_H -DDEFAULT_DIR=\"/usr/local/lib/netboot\" -I.
-I.. -I../bootrom/headers   -c freeze.c -o freeze.o
gcc -o makerom -s main.o config.o user.o passes.o freeze.o
make[1]: Leaving directory `/usr/src/netboot/makerom'
making all in mknbi-dos
make[1]: Entering directory `/usr/src/netboot/mknbi-dos'
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c mknbi.c -o mknbi.o
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c openrd.c -o openrd.o
gcc -o makec makec.c
touch first_c.c
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c first_c.c -o first_c.o
touch boot_c.c
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c boot_c.c -o boot_c.o
gcc -o mknbi -s mknbi.o openrd.o first_c.o boot_c.o
make[1]: Leaving directory `/usr/src/netboot/mknbi-dos'
making all in mknbi-linux
make[1]: Entering directory `/usr/src/netboot/mknbi-linux'
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c mknbi.c -o mknbi.o
gcc -o makec makec.c
touch first_c.c
gcc -O  -DHAVE_CONFIG_H -I. -I..   -c first_c.c -o first_c.o
gcc -o mknbi -s mknbi.o first_c.o
make[1]: Leaving directory `/usr/src/netboot/mknbi-linux'
mknbi.o: In function 'main':
mknbi.o(.text+0xe13): undefined reference to '__inet_ntoa'
make[1]: *** [mknbi] Error 1
make: *** [all] Error 1

I've had this error somewhere before, and resolved it, but I can't think
how. Excuse my novice status, but am I correct in assuming that the
linker is attempting to link in '__inet_ntoa' from an external library,
but not finding it. What library does this function usually reside in?

Thanks in advance,

--
Ross Golder
Technical Dept
CPD Ltd, Whetstone, London, N20 9LD.
Tel: +44 (0) 973 897671
mailto:rossg@cpd.co.uk (Work)
http://www.cpd.co.uk/~rossg




For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.