[42620] trunk/dports/databases/mysql5-devel/Portfile

Big O illogical1 at gmail.com
Fri Nov 28 11:57:18 PST 2008


On Fri, Nov 28, 2008 at 2:27 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Nov 28, 2008, at 10:33, Big O wrote:
>
>>> How did you know to use the --with-pic option, and what is the symptom of
>>> not using it?
>>
>> Discussion of this took place around september on the amarok-devel
>> mailing list. here's an excerpt
>> "By the way, forgot to mention that the "-fPIC or not -fPIC" debate is
>> irrelevant. Mysql's configure script has a --with-pic flag, so
>> packaging a PIC-enabled libmysqld is not screwing with the package
>> everyone uses, but adding a flexibility, suggested by mysql itself. On
>> the other hand, this flag is borked and does nothing for libmysqld,
>> but upstream agreed that it's their fault (see relevant mysql bug), so
>> it's package maintainers' responsibility to fix it downstream."
>> For any code going into a shared library -fPIC is required. Basically
>> libmysqld.a (static lib) is being linked to libamarok-sqlcollection.so
>>  (dynamic lib) and that's why we need -fPIC when creating libmysqld.a.
>> One downside of this is that the resulting shared lib is rather large
>> (especially when doing a universal build). Using -fpic instead might
>> solve this but I haven't tried and don't intend to.
>> The mailing list is private so I can't link to it here, but this
>> gentoo bug report provides more info as well, including how to build a
>> shared library which I tried and didn't get to work properly.
>> http://bugs.gentoo.org/show_bug.cgi?id=238487
>
> In that bug the Gentoo MySQL maintainer says that adding -fPIC is not a good
> idea:
>
> http://bugs.gentoo.org/show_bug.cgi?id=238487#c34
>
> He says building a shared library would be better, and I know shared
> libraries are greatly preferred over static ones on Mac OS X. So we should
> do that, if we can figure out how, or convince MySQL AB to do so in a future
> version of MySQL.
>
>
Yes building a shared lib would be better but this is what we have to
work with.
I tried creating a shared lib from the static one and failed. Please
feel free to try the fedora link in the BR. that links to a rpm spec
file where they build a shared lib from the static lib.
Mysql knows about the issue and scheduled the fix for 6.0. It was in
the first mysql bug report link.
The gentoo doesn't apply here since a) -fPIC is only turned in the
variant, b) the only people so far using it is me for amarok.
-- 
All your gmail are belong to us.


More information about the macports-dev mailing list