MySQLe link issue
Ian Monroe
ian at monroe.nu
Tue Sep 23 20:27:00 CEST 2008
On Tue, Sep 23, 2008 at 1:15 PM, Soren Harward <stharward at gmail.com> wrote:
> On Tuesday 23 September 2008 13:50:18 Jeff Mitchell wrote:
>> I'm on *32-bit* Gentoo, and I'm getting the following. Note that this
>> is all the output with make VERBOSE=1, even though it only really shows
>> a warning and then errors out
> ...
>> warning: creating a DT_TEXTREL in object.
>
> Same here. The problem is that on Gentoo, libmysqld.a contains non-PIC code,
> but Amarok tries to include it in a shared library, which has to be built
> entirely with PIC code. As of right now, there is no fix for this problem; I've
> had to revert my SVN to r863918. I've already added a note to Mikko's Gentoo
> bug about this:
>
> http://bugs.gentoo.org/show_bug.cgi?id=238487
>
> Hopefully, the Gentoo guys will add the ability to force the static library
> (ie, libmysqld.a) to have PIC code.
>
> But on the other hand, there are good arguments for *not* putting PIC code into
> a static library, because there's the assumption that most static libraries get
> linked into executables and not shared libraries, and that part of the reason
> you have a static lib in the first place is to avoid the overhead that shared
> code (and thus PIC code) entails. I could easily see the Gentoo guys arguing
> that they don't want to make a major change just to accommodate one
> application.
Given that Amarok is about the only application to use libmysqld.a,
its not not that major of a change.
> So my question is this: how badly broken is the current MySqlCollection (ie,
> non-embedded) in Amarok2, and is it worth reviving? If it were revived, we
> could link it against the libmysqlclient shared library and avoid the PIC
> issue altogether -- and on x86 Gentoo, we could use regular MySQL instead of
> MySQLe. I can see that the MySqlCollection code hasn't been significantly
> altered for many months, and I'm not sure if that's because nobody's gotten
> around to it, or because it's been slated for removal.
Its not a question of it being broken, we just need a configuration
free MySQL. This could be done via libmysqlclient, it would just take
more work.
In my opinion, the long-term solution is to turn libmysqld.a into a
libmysqld.so (eg dynamically linked). Given that Windows has
libmysqld.dll I don't get why this doesn't exist already. I might have
to write another email to internals and hope I get a response this
time...
Ian
More information about the Amarok-devel
mailing list