[ELDK] Problems using libxml2
Michael Steiger
mslists at infoworks.at
Wed Nov 11 22:58:34 CET 2009
Hello Wolfgang!
On 11.11.2009 22:20 Wolfgang Denk said the following:
> Dear Michael Steiger,
>
> In message<4AFAC010.9080904 at infoworks.at> you wrote:
>>
>> I am new to cross-compiling so maybe my questions are not really new but
>> I googled for hours and looked through the mailing list archive with no
>> solution for my problem.
>>
>> I'm using ELDK 4.2 with CentOS 5 and the target platform is ppc_85xx.
>> In general everything is working but I had to add xml support and found
>> that libxml2 is one of the supplied packages. And then the problems started.
>>
>> First I tried to install the libxml2-devel rpm using
>> ${CROSS_COMPILE}rpm -i
>
> Here I'm missing a step in your desription: as you noted,
> /usr/lib/libxml2.so* is part of the ELDK, so what do you need
> libxml2-devel for?
AFAIK I need to link libxml2.a to my application and on my CentOS this
is available by default in /usr/lib. But with ELDK I only found it in
the -devel package
xml2-config --libs
results in
-L/usr/lib -lxml2 -lz -lm
libz.a can be found in ppc_85xx/usr/lib
libm.a can be found in ppc_85xx/lib
But libxml2.a is not there?!
>> This failed with
>> Failed dependencies: pkgconfig-ppc_85xx is needed
>>
>> But I could not find pkgconfig in the eldk tree.
>
> So just ignore the dependency - try "${CROSS_COMPILE}rpm --nodeps -i ..."
Thanks, will try that.
>> Then I unpacked the rpm manually and copied the files to the
>> /opt/eldk/ppc_85xx/usr tree.
>>
>> Compilation worked but while linking the libxml2.a file could not be
>> found. So I specified it using the full qualified filename.
>>
>> Then the next link error followed.
>>
>> /opt/eldk/usr/../ppc_85xx/lib/libc.a(s_isinfl.o): In function `__isinfl:
>> (.text+0x0): multiple definition of `___isinfl'
>> /opt/eldk/usr/../ppc_85xx/lib/libm.a(m_isinfl.o):(.text+0x0): first
>> defined here
>> /opt/eldk/usr/../ppc_85xx/lib/libc.a(s_isnanl.o): In function `__isnanl:
>> (.text+0x0): multiple definition of `___isnanl'
>> /opt/eldk/usr/../ppc_85xx/lib/libm.a(m_isnanl.o):(.text+0x0): first
>> defined here
>
> Are you sure that you used sane compiler options? Keep in mind that
> the 85xx don't have a FPU, and that the SPE is used for floating point
> calculations.
I'm using the compiler options from an existing makefile (which we
received from our board supplier) and until now I had no problems using
them:
-pthread -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
And as linker flags:
-Wl,-whole-archive $(LIBS) -Wl,-no-whole-archive -lpthread -static
But while looking through the makefile I think that the -whole-archive
option is the problem. I have just recompiled (or better relinked) and
after adding -lpthread (xml-config2 is not reporting this dependency) it
is working now.
Many thanks for having me look through this stuff ;-)
Best regards from chilly Vienna
Michael
More information about the eldk
mailing list