From: Beso <givemesugarr@gmail.com>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] I was wrong Was: dev-util/devhelp-0.21 emerge fails
Date: Sat, 13 Dec 2008 17:13:31 +0000 [thread overview]
Message-ID: <d257c3560812130913rdfdda50rafad3134f264f721@mail.gmail.com> (raw)
In-Reply-To: <pan.2008.12.13.15.55.23@cox.net>
2008/12/13 Duncan <1i5t5.duncan@cox.net>:
> Duncan <1i5t5.duncan@cox.net> posted pan.2008.12.04.00.02.27@cox.net,
> excerpted below, on Thu, 04 Dec 2008 00:02:27 +0000:
>
>>> .libs/libdevhelp_1_la-Yelper.o: relocation R_X86_64_PC32 against symbol
>>> `gtk_moz_embed_get_nsIWebBrowser' can not be used when making a shared
>>> object; recompile with -fPIC
>>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/
>> bin/ld:
>>> final link failed: Bad value collect2: ld returned 1 exit status
>>
>> Well, that seems to have gotten you further, and the error is clearer
>> now.
>>
>>> relocation R_X86_64_PC32
>>
>> An error of that nature shows it's trying to link 32-bit code into a 64-
>> bit binary. That's not going to work. Somehow, you need to get it to
>> see the 64-bit version and use it instead of the 32-bit version, but
>> that's beyond my ability to solve.
>
> I thought I better get this right up there in the subject, in case
> anybody had depended on what I said. So as it says, I was wrong.
>
> The relocation R_X86_64_PC32 error is not 32-bit related as I stated, but
> rather shared-lib/static-lib related. On amd64 in 64-bit mode, shared
> libs (*.so*) must be relocatable code, while executables and the static
> libs (*.a) linked into them may remain fixed address. (But, and this is
> how I discovered my error, static libs linked into shared objects must be
> relocatable as well. I ran into this with the new amarok-2.0 ebuild,
> which has a *.so plugin linked against a static lib *.a from mysql...
> doesn't work under normal conditions, the reason amarok-2 isn't keyworded
> ~amd64 yet.)
>
> As the error states, the object being linked into the shared-object must
> be compiled with -fPIC. Normally, the make files should take care of
> this, but occasionally they fail, or as in my problem above, there's an
> attempt made to link normal static libs into shared objects.
>
> I had the wrong impression as I'd not run into the error since I had
> switched to no-multilib, and with the 32 in there, I (wrongly) assumed it
> was tied into 32-bit. Oops!
>
> But, I was still right on the above my ability to solve bit, at least
> unless you want to compile the offending bit with -fPIC, but adding it
> just to that bit requires intimate knowledge of make and etc, and adding
> it to other code in the same ebuild will slow any code in static
> libraries and executables (as opposed to the shared objects that require
> it) down, so while a quick recompile with -fPIC can help temporarily,
> getting the devs to look at it and fix it properly is the correct
> solution.
>
for mysql the fix is quite simple: add -fPIC to the cflags in the
portage mysql.eclass.
this would force -fPIC for it. if you want to do things better you
could add a simple
case probing for the compiler and forcing the -fPIC for mysql only on amd64.
this -fPIC issue of amarok has been pointed out when amarok 2 has gone
to the first
alpha release, if i recall well. the strange thing is that mysql
makefile doesn't really
seem to intend to use -fPIC. i don't really know why this issue with a
so widely
spread package.
--
dott. ing. beso
next prev parent reply other threads:[~2008-12-13 17:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 13:23 [gentoo-amd64] dev-util/devhelp-0.21 emerge fails Thanasis
2008-12-03 15:56 ` [gentoo-amd64] " Duncan
2008-12-03 18:57 ` Thanasis
2008-12-03 19:07 ` Thanasis
2008-12-04 0:02 ` Duncan
2008-12-08 17:39 ` Bryan Green
2008-12-09 6:52 ` Thanasis
2008-12-09 7:10 ` Duncan
2008-12-13 15:55 ` [gentoo-amd64] I was wrong Was: " Duncan
2008-12-13 17:13 ` Beso [this message]
2008-12-13 17:43 ` [gentoo-amd64] I switching on gtk-1.x themes brigante
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d257c3560812130913rdfdda50rafad3134f264f721@mail.gmail.com \
--to=givemesugarr@gmail.com \
--cc=gentoo-amd64@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox