trouble linking iconvconfig while building glibc (was: Re: Crosstool building using Dan's Script)
Dan Kegel
dank@kegel.com
Mon Nov 3 16:38:00 GMT 2003
Manoj Verma, Noida wrote:
> Andreas Schwab [mailto:schwab@suse.de] wrote:
>> You need to find a working awk.
>
> Thanks, that worked..
Which version of awk were you using that was broken,
and which good version of awk did you switch to?
Hopefully cygwin ships with a good awk...
> I am following the Dan's cross tool script step by step, I have:
> 1) Built Binutils-2.13.2 successfully
> 2) Installed GLIBC headers
> 3) Built the core GCC successfully.
> 4) Configured GLIBC successfully.
> 5) But while doing 'make' I get the errors as shown in the attached
> 'partial' make log file.(I also got same errors on MinGW).
>
> Has anyone done arm-linux cross tool build on host Cygwin/MinGW before with
> glibc-2.3.1 and gcc-3.2.2? I am asking this because inspite of following the
> standard cross tool chain build steps, I am encountering these errors on
> both Cygwin and MinGW.
Your log says:
arm-linux-gcc -nostdlib -nostartfiles \
-o /home/build_glibc/iconv/iconvconfig \
-Wl,-dynamic-linker=/cygdrive/d/cygwin/home/myheaders/lib/ld-linux.so.2 \
-Wl,-z,combreloc /home/build_glibc/csu/crt1.o \
/home/build_glibc/csu/crti.o `arm-linux-gcc --print-file-name=crtbegin.o` \
/home/build_glibc/iconv/iconvconfig.o \
/home/build_glibc/iconv/strtab.o /home/build_glibc/iconv/xmalloc.o \
-Wl,-rpath-link=/home/build_glibc:/home/build_glibc/math:/home/build_glibc/elf:/home/build_glibc/dlfcn:/home/build_glibc/nss:/home/build_glibc/nis:/home/build_glibc/rt:/home/build_glibc/resolv:/home/build_glibc/crypt:/home/build_glibc/linuxthreads
\
/home/build_glibc/libc.so.6 /home/build_glibc/libc_nonshared.a \
-lgcc `arm-linux-gcc --print-file-name=crtend.o` \
/home/build_glibc/csu/crtn.o
/home/build_glibc/csu/crt1.o: In function `_start':
/home/build_glibc/csu/crt1.o(.text+0x24): undefined reference to `abort'
/home/build_glibc/iconv/iconvconfig.o: In function `add_module':
/home/build_glibc/iconv/iconvconfig.o(.text+0x860): undefined reference to `__strtol_internal'
...
Hmm. You'd expect abort() and __strtol_internal()
to be defined by /home/build_glibc/libc.so.6,
which is very nicely included in that link line.
What does nm on your libc.so.6 say? On my Linux workstation's copy, I see
$ nm /lib/libc.so.6 | egrep '__strtol_internal|abort' | grep T
000296c0 T abort
0002bc80 T __strtol_internal
> The linux kernel I have used to get the /linux, /asm and /asm-generic
> headers is "linux-2.4.19.tar" with the patch "patch-2.4.19-rmk4" applied on
> it for 'arm' target. To do "menuconfig" and "make dependencies" of this
> Linux kernel, I have used arm-linux prebuilt tool chain
> (arm-linux-toolchain-post-2.2.13.tar.gz) on host=Linux from
> http://handhelds.org/download/linux/arm/toolchain/ .
>
> Could this be the problem with incompatible Linux headers and Glibc?
I doubt it. The kernel headers aren't usually terribly version-specific
for basic stuff like this.
- Dan
More information about the Libc-alpha
mailing list