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.

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to