Problems compiling some programs
Hi all!
I have a rather obscure problem. I frankly understand very little of it,
and so, it is hard to ask a good question. It seems like there is
sometimes a problem compiling or linking some software.
On this box, I can compile kernels, random C programs from wherever,
CPAN modules with C code, even Debian packages. But sometimes, when I
compile certain stuff, it produces an ELF binary which looks OK, I have
even confirmed it has exactly the same file size as a working binary,
but ldd says it is not a dynamic executable.
What prompted this struggle was the need to test the CVS version of the
Perl module XML::LibXML, known to Debian as libxml-libxml-perl. I spent
the lions' share of last night chatting on IRC with the guy who created
the package currently in Sarge, he was very helpful, but we didn't get
there. His system is very similar to mine, it works for him, but not
for me.
Eventually, he sent me a tar-ball of the CVS version compiled on his
box, so that it would be just to run make test on it here. XML::LibXML
links to libxml2, and I can trivially compile it from the CPAN
packages, there is nothing that's lacking there. However, LibXML.so
binary that he compiles and that works from him, doesn't work for me:
$ ldd LibXML.so
not a dynamic executable
Also, LibXML tests the config by building a Conftest.so. That's where I
can see that the .so I build is identical in size to the one he builds.
Mine is "not a dynamic executable", though. Interestingly it knows the
other libraries it should know:
$ readelf -d Conftest.so
Dynamic segment at offset 0x100c contains 24 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libxml2.so.2]
0x00000001 (NEEDED) Shared library: [libz.so.1]
0x00000001 (NEEDED) Shared library:
[libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libc.so.6]
First, I thought it could be that my gcc was old, since my friend had
3.3.5-6, but I found that was the version in unstable, so I just
upgraded that, with no changes. Except for gcc now from unstable, my
system is a up-to-date sarge system.
Really, I don't know how to attack this, it is not the kind of stuff I
have been doing before, so any advice is very welcome!
Best,
Kjetil
--
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
kjetil@kjernsmo.net webmaster@skepsis.no editor@learn-orienteering.org
Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
Reply to: