[Clfs-support] Linkage error when making uClibc-0.9.31

Angel Ivan Castell Rovira al004140 at gmail.com
Wed Mar 30 02:28:00 PDT 2011


Hi forum!

I am trying to build a custom cross-toolchain for my ARM920T S3C2440
following step by step all the useful information explained on the book:

  ==> http://cross-lfs.org/view/clfs-embedded/arm/

I have succesfully compiled and installed on the cross-environ:
  - gmp-5.0.1
  - mpfr-3.0.0
  - mpc-0.8.2
  - binutils-2.21
  - gcc-4.5.2

but the uClibc compilation with 'make' fails at some linking stage.
All the needed information to track that isssue is attached.

* Version of the book being used: CLFS Embedded GIT-0.0.1-20110323

* Host distribution: [Ubuntu 9.04 _Jaunty Jackalope_ - Release i386
(20090420.1)]

* Host architecture:
$ cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping    : 10
cpu MHz        : 2602.168
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr
pdcm xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips    : 5204.33
clflush size    : 64
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping    : 10
cpu MHz        : 2602.168
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 1
cpu cores    : 2
apicid        : 1
initial apicid    : 1
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr
pdcm xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips    : 5204.51
clflush size    : 64
power management:


* Target architecture:
$ cat /proc/cpuinfo
Processor    : ARM920T rev 0 (v4l)
BogoMIPS    : 199.47
Features    : swp half thumb
CPU implementer    : 0x41
CPU architecture: 4T
CPU variant    : 0x1
CPU part    : 0x920
CPU revision    : 0

Hardware    : BDC2440
Revision    : 0000
Serial        : 0000000000000000


* Environ variables for the 'clfs' user:

$ env | grep CLFS
CLFS_HOST=i486-cross-linux-gnu
CLFS_TARGET=armv4-linux-uclibc
CLFS_ARM_ARCH=armv4t
CLFS_ARM_MODE=arm
CLFS=/opt/GNU-CPT/
CLFS_ARCH=arm
CLFS_ABI=apcs-gnu
CLFS_ENDIAN=little
CLFS_FLOAT=soft


* Package or section in which the problem was encountered: section 6.11.
uClibc-0.9.31

* Steps to reproduce the problem (following all the steps in the previous
book section):

$ wget http://www.uclibc.org/downloads/uClibc-0.9.31.tar.bz2
$ wget
http://patches.cross-lfs.org/embedded-dev/uClibc-0.9.31-configs-2.patch
$ tar xvfj uClibc-0.9.31.tar.bz2
$ cd uClibc-0.9.31
$ patch -Np1 -i ../uClibc-0.9.31-configs-2.patch
$ cp -v clfs/config.${CLFS_ARCH}.${CLFS_ENDIAN} .config
$ if [ "${CLFS_ABI}" == "aapcs" ] || [ "${CLFS_ABI}" == "aapcs-linux" ];
then
      sed -i s/CONFIG_ARM_OABI/CONFIG_ARM_EABI/g .config;
fi
$ make oldconfig
$ make

[...]
In file included from ./ldso/include/dl-string.h:11:0,
                 from ./ldso/include/ldso.h:40,
                 from libc/misc/elf/dl-iterate-phdr.c:16:
./ldso/ldso/arm/dl-sysdep.h: In function 'elf_machine_load_address':
./ldso/ldso/arm/dl-sysdep.h:119:37: warning: taking address of expression of
type 'void'
  CC libc/misc/internals/__uClibc_main.os
  CC libc/inet/rpc/rpc_thread.os
  CC libc/stdlib/atexit.os
  AR cr lib/libc.a
  STRIP -x -R .note -R .comment lib/libc.a
  AR cr lib/uclibc_nonshared.a
  STRIP -x -R .note -R .comment lib/uclibc_nonshared.a
  AR cr libc/libc_so.a
  STRIP -x -R .note -R .comment libc/libc_so.a
  LD libuClibc-0.9.31.so
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
_fpmaxtostr.c:(.text+0xbc): undefined reference to `__nedf2'
_fpmaxtostr.c:(.text+0xe0): undefined reference to `__eqdf2'
_fpmaxtostr.c:(.text+0xfc): undefined reference to `__divdf3'
_fpmaxtostr.c:(.text+0x108): undefined reference to `__ltdf2'
_fpmaxtostr.c:(.text+0x17c): undefined reference to `__muldf3'
_fpmaxtostr.c:(.text+0x348): undefined reference to `__gedf2'
_fpmaxtostr.c:(.text+0x40c): undefined reference to `__fixunsdfsi'
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
__psfs_do_numeric.c:(.text+0x53c): undefined reference to `__truncdfsf2'
collect2: ld returned 1 exit status
make: *** [lib/libc.so] Error 1

Googling for that error, I found some post to fix a similar issue here:

  ==> http://www.mail-archive.com/uclibc@uclibc.org/msg02438.html

But that does not fix the problem for me (still the same problem).

Hope you can help me with that.

Thank you very much for the time spent in writing that USEFUL book!!

Best regards,
  -- Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20110330/eb3e0de2/attachment.html>


More information about the Clfs-support mailing list