Discussion:
Unsupported relocation type 10 in non-PLT relocations
ian
2005-06-29 09:52:55 UTC
Permalink
Hi,

I'm getting problems with ClamAV (0.85, 0.85.1 and 0.86.1) as well as
Pango (as part of an Ethereal build). This is on a 3.0 BETA macppc
system (2005-06-18 snapshot) with the 25jun05 pkgsrc.tar.gz file (the
ClamAV versions before 0.86.1 were with an older pkgsrc.tar.gz)

With ClamAV the build works fine but trying to run freshclam results in:

# freshclam
/usr/pkg/lib/libclamav.so.1: Unsupported relocation type 10 in non-
PLT relocations

and during the build of the Ethereal dependancies I see:

Writing a pango.modules file to use when running examples before
installing Pango.
/usr/pkgsrc/devel/pango/work/.buildlink/lib/libfontconfig.so.1:
Unsupported relocation type 10 in non-PLT relocations

I've Googled enough to know it has to do with -fPIC/-FPIC and trying
to link non-relocatable objects into relocatable ones, but that's
pretty much all I've found on the subject: unless there's some simple
thing I've missed, this does require a decent knowledge of the inner
workings of {g}cc/ld and the structure of libraries (which I don't
currently possess).

I'm (very) willing to learn in order to help solve this one, but I
haven't got very far by myself and would welcome all suggestions
(apart from changing the architecture :) I can probably provide SSH
access to someone who knows what they're doing and doesn't have a 3.0
BETA macppc machine if this gets very tough.

Any starting points would be great.

Thanks in advance,
--
Ian Spray.
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
Bruce O'Neel
2005-06-29 11:42:11 UTC
Permalink
Hi,

The problem is that when libclamav.so was built .o files were put in that
were not built -FPIC.

You could try rebuilding ClamAV making sure that -fpic is specified.
Maybe the simpliest (though probably wrong :) would be

setenv CC "cc -fpic"

make clean
make update

cheers

bruce
Post by ian
Hi,
I'm getting problems with ClamAV (0.85, 0.85.1 and 0.86.1) as well as
Pango (as part of an Ethereal build). This is on a 3.0 BETA macppc
system (2005-06-18 snapshot) with the 25jun05 pkgsrc.tar.gz file (the
ClamAV versions before 0.86.1 were with an older pkgsrc.tar.gz)
# freshclam
/usr/pkg/lib/libclamav.so.1: Unsupported relocation type 10 in non-
PLT relocations
Writing a pango.modules file to use when running examples before
installing Pango.
Unsupported relocation type 10 in non-PLT relocations
I've Googled enough to know it has to do with -fPIC/-FPIC and trying
to link non-relocatable objects into relocatable ones, but that's
pretty much all I've found on the subject: unless there's some simple
thing I've missed, this does require a decent knowledge of the inner
workings of {g}cc/ld and the structure of libraries (which I don't
currently possess).
I'm (very) willing to learn in order to help solve this one, but I
haven't got very far by myself and would welcome all suggestions
(apart from changing the architecture :) I can probably provide SSH
access to someone who knows what they're doing and doesn't have a 3.0
BETA macppc machine if this gets very tough.
Any starting points would be great.
Thanks in advance,
--
Ian Spray.
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
--
***@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
ian
2005-06-29 12:24:51 UTC
Permalink
Post by Bruce O'Neel
Hi,
Hello Bruce,
Post by Bruce O'Neel
The problem is that when libclamav.so was built .o files were put in that
were not built -FPIC.
Ok.
Post by Bruce O'Neel
You could try rebuilding ClamAV making sure that -fpic is specified.
Maybe the simpliest (though probably wrong :) would be
setenv CC "cc -fpic"
Right, I tried the following:

pkg-delete clamav
export CC="cc -fpic"
make clean
make install

Then running freshclam gives me the same error as before :( I'll
take a more detailed look at trying to override the CC flags and see
what I can come up with.

TTFN,
--
Ian Spray
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
Bruce O'Neel
2005-06-29 13:06:44 UTC
Permalink
Sadly it's likely some dependency that clamav needs.

You can try

setenv LD_DEBUG 1

and see if this gives you more information. On my system it doesn't but the
man says that this is verbose only if ld.so was built with debugging...

cheers

bruce
Post by ian
Post by Bruce O'Neel
Hi,
Hello Bruce,
Post by Bruce O'Neel
The problem is that when libclamav.so was built .o files were put in that
were not built -FPIC.
Ok.
Post by Bruce O'Neel
You could try rebuilding ClamAV making sure that -fpic is specified.
Maybe the simpliest (though probably wrong :) would be
setenv CC "cc -fpic"
pkg-delete clamav
export CC="cc -fpic"
make clean
make install
Then running freshclam gives me the same error as before :( I'll
take a more detailed look at trying to override the CC flags and see
what I can come up with.
TTFN,
--
Ian Spray
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
--
***@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
ian
2005-06-29 21:07:34 UTC
Permalink
Post by Bruce O'Neel
Sadly it's likely some dependency that clamav needs.
Ok, I'll try going through those next.
Post by Bruce O'Neel
You can try
setenv LD_DEBUG 1
and see if this gives you more information. On my system it
doesn't but the
man says that this is verbose only if ld.so was built with
debugging...
Thanks for all the suggestions, but I've not got anywhere yet (I'm
not sure the LD_DEBUG did anything, but I have a few more files to
check).

TTFN,
--
ian.
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
Christos Zoulas
2005-06-30 03:07:23 UTC
Permalink
Post by ian
Post by Bruce O'Neel
Sadly it's likely some dependency that clamav needs.
Ok, I'll try going through those next.
Post by Bruce O'Neel
You can try
setenv LD_DEBUG 1
and see if this gives you more information. On my system it
doesn't but the
man says that this is verbose only if ld.so was built with
debugging...
Thanks for all the suggestions, but I've not got anywhere yet (I'm
not sure the LD_DEBUG did anything, but I have a few more files to
check).
Make sure that all the object files you are linking together are really
compiled with -fpic or -fPIC. Save the build record and take a look at
it line by line.

christos
David Laight
2005-06-30 06:35:42 UTC
Permalink
Post by ian
Thanks for all the suggestions, but I've not got anywhere yet (I'm
not sure the LD_DEBUG did anything,
Make sure that ld.elf_so is compiled with the debug support.

David
--
David Laight: ***@l8s.co.uk
ian
2005-06-30 09:00:05 UTC
Permalink
Hi all,

Thanks very much to Bruce, Christos and David for their advice: it
prompted me to try more drastic measures and it appears that one of
the included packages that ClamAV required was broken in an earlier
pkgsrc.tar.gz and is now fixed in the one from the 25jun05.

I removed all packages and the source tree and unpacked the
pkgsrc.tar.gz file afresh, letting it build its way up as required.
I tried this with both CC="cc -fpic" and it worked, and then without,
which also worked: it looks like I need to examine how I upgrade from
one pkgsrc.tar.gz to another as something didn't get rebuilt properly.

TTFN,
--
ian.
GPG Fingerprint: D170 35A3 C858 6E85 9B5B 1557 4CD5 6F6F E176 2D0A
Loading...