[uClibc 0000370]: Build fails due to symbol aliasing on undefined symbol - 'adjtimex'
bugs at busybox.net
bugs at busybox.net
Sun Sep 25 17:36:36 UTC 2005
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=370
======================================================================
Reported By: jswensen
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 370
Category: Architecture Specific
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 08-08-2005 10:57 PDT
Last Modified: 09-25-2005 10:36 PDT
======================================================================
Summary: Build fails due to symbol aliasing on undefined
symbol - 'adjtimex'
Description:
I saw this mentioned in another bug report, but they posted it as a note
after the bug was closed, so I thought I would try wake it up by posting
it as its own bug.
We are trying to build a toolchain for PowerPC under cygwin and get this
adjtimex error. We are using the GCC 4.0.1 compiler generated by
buildroot
======================================================================
----------------------------------------------------------------------
jswensen - 08-08-05 15:48
----------------------------------------------------------------------
FYI, I just tried building the toolchain with the same buildroot config
under Linux and the same error occurs.
----------------------------------------------------------------------
asierllano - 08-22-05 00:18
----------------------------------------------------------------------
This problem is gcc-4 specific because I have the same problem with
gcc-4.0.0 & gcc-4.0.1, while I successfully build with gcc-3.3 & gcc-3.4.
The problem must be related to weak references, because if you comment the
lines of the previous error, the same error seems to happen in every weak
reference of the code.
The same problem still remains in version 0.9.28.
(Maybe the summary should be updated to show that the problem is related
to:
gcc-4 + weak references).
(Maybe the version should updated to 0.9.28)
----------------------------------------------------------------------
asierllano - 08-26-05 00:06
----------------------------------------------------------------------
I've managed to build the latest version of uclibc with gcc-4.0.1.
I've developed serveral patches that I explain here:
uclibc-ppc-syscall.patch:
-------------------------
This patch modifies the syscall code for the powerpc, and leaves it like
it was previosly (older version of the uclibc repository). It uses the
syscall code from the kernel.
This way it compiles properly with gcc-4. The problem was that the
previous code defined the functions in assembly code, so that the compiler
didn't think the functions had a definition so that the next weak aliases
to those functions didn't work because they were not defined.
(Previous version of gcc compilers work when definin weak aliases to
undefined functions).
Maybe the syscall code could be reworked again, but meanwhile I left with
the kernel default syscall code, that was the original aproach of uclibc.
uclibc-ppc-ioctl-errno.patch
----------------------------
This patch solves easily an error in the ioctl code for the PPC because it
uses the "errno" variable without including "errno.h".
uclibc-ppc-uint128.patch
------------------------
The gcc compiler has deprecated the type __uint128 for 32-bits platforms.
Due to the fact that this type was introduced in gcc-3.1 it is better to
drop its use. (glibc has the same problem and uses this same solution).
----------------------------------------------------------------------
jocke - 08-27-05 03:59
----------------------------------------------------------------------
uclibc-ppc-syscall.patch:
This can't go in as is. Can you complete this patch?
Does this add to the total size of uClibc?
Maybe unified_syscall_body can be reworked instead?
uclibc-ppc-ioctl-errno.patch:
Can't find any use of errno in that file. Can you elaborate?
uclibc-ppc-uint128.patch:
Looks ok to me. Will commit.
----------------------------------------------------------------------
asierllano - 08-28-05 13:39
----------------------------------------------------------------------
uclibc-ppc-syscall.patch:
-----------------------------
What I did was reverting the file
libc/sysdeps/linux/powerpc/bits/syscalls.h
to revision 5453.
Have a look at:
http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/libc/sysdeps/linux/powerpc/bits/syscalls.h?rev=5453&view=markup
After that revision, the syscalls where done fully in assembly (without a
valid C definition) so that gcc-4 cannot make weak aliases to an undefined
function.
I don't know too much about assembly language so the only thing I could do
was use again the old code that uses the syscalls from the linux kernel.
Maybe someone like you (jocke) will be able to take another aproach. I
analized which one was the problem, but I don't know enough assembly to
solve it in a better way.
uclibc-ppc-ioctl-errno.patch:
-----------------------------
I included this patch because errno was used in the syscall of (I'm not
sure now, but I can have a look about it tomorrow) and I needed to include
the header. We can think about this patch after the previous one because I
think that it is somehow related.
Like I told to you, I'm not a good assembly programmer, but I can be a
good tester.
Thank you for your time.
----------------------------------------------------------------------
jocke - 09-17-05 05:11
----------------------------------------------------------------------
I have imported the syscall defs from glibc. Try if current SVN works
now.
The uclibc-ppc-ioctl-errno.patch has been ignored for now. Please bring it
up again if you need it and why.
----------------------------------------------------------------------
asierllano - 09-19-05 04:55
----------------------------------------------------------------------
I've obtained the following error while compiling:
make[2]: Entering directory
`/home/asier/uSEL/branch-tmp/trunk/output/board-lite5200/toolchain/uClibc-0.9.28/librt'
/home/asier/uSEL/branch-tmp/trunk/output/board-lite5200/stage/bin/powerpc-linux-uclibc-ld
-shared --warn-common --warn-once -z combreloc -z defs -s
-soname=librt.so.0 \
-o librt-0.9.28.so --whole-archive librt.a \
--no-whole-archive ../libc/misc/internals/interp.o \
-L../lib -lc
/home/asier/uSEL/branch-tmp/trunk/output/board-lite5200/stage/lib/gcc/powerpc-linux-uclibc/4.0.1/libgcc.a;
librt.a(mq_open.o): In function `mq_open':
mq_open.c:(.text+0xc8): undefined reference to `__syscall_error'
make[2]: *** [shared] Error 1
make[2]: Leaving directory
`/home/asier/uSEL/branch-tmp/trunk/output/board-lite5200/toolchain/uClibc-0.9.28/librt'
I've managed to fix it (I don't know if it is the best way).
The problem is raised because __syscall_error is a hiden function in
libuClibc. The problem is that it is used for every syscall (after the
last commit you've done) so librt needs it.
The way I've fixed:
uclibc-syscallerror.patch
----------------------------------------------------------------------
jocke - 09-19-05 05:56
----------------------------------------------------------------------
hmm, __syscall_error is supposed to be hidden because it is
internal to uClibc. Need to think a bit on what to do.
----------------------------------------------------------------------
jocke - 09-20-05 14:20
----------------------------------------------------------------------
svn up and try again, thanks
----------------------------------------------------------------------
jocke - 09-25-05 10:36
----------------------------------------------------------------------
No complaints since last fix, so I will close this one now.
Issue History
Date Modified Username Field Change
======================================================================
08-08-05 10:57 jswensen New Issue
08-08-05 10:57 jswensen Status new => assigned
08-08-05 10:57 jswensen Assigned To => uClibc
08-08-05 15:48 jswensen Note Added: 0000396
08-19-05 04:59 asierllano Issue Monitored: asierllano
08-22-05 00:18 asierllano Note Added: 0000428
08-26-05 00:06 asierllano Note Added: 0000436
08-26-05 00:06 asierllano File Added: uclibc-ppc-ioctl-errno.patch
08-26-05 00:07 asierllano File Added: uclibc-ppc-syscall.patch
08-26-05 00:07 asierllano File Added: uclibc-ppc-uint128.patch
08-27-05 03:59 jocke Note Added: 0000440
08-28-05 13:39 asierllano Note Added: 0000468
09-17-05 05:11 jocke Note Added: 0000543
09-19-05 04:55 asierllano Note Added: 0000552
09-19-05 04:56 asierllano File Added: uclibc-syscallerror.patch
09-19-05 05:56 jocke Note Added: 0000559
09-20-05 14:20 jocke Note Added: 0000563
09-25-05 10:36 jocke Status assigned => closed
09-25-05 10:36 jocke Note Added: 0000577
======================================================================
More information about the uClibc-cvs
mailing list