[debian-mysql] Bug#508406: inconsistent flags for libmysqld.a on different arches, no README.Debian

Modestas Vainius modestas at vainius.eu
Wed Dec 10 23:16:03 UTC 2008


Package: libmysqlclient-dev
Version: 5.1.30-2
Tags: patch
Severity: serious
Justification: Violation of MUST in Debian Policy section 10.2

Hello,

This bug is related to #457915.

Currently Debian Policy section 10.2 states:

"As to the static libraries, the common case is not to have relocatable code, 
since there is no benefit, unless in specific cases; therefore the static 
version must not be compiled with the -fPIC flag. Any exception to this rule 
should be discussed on the mailing list debian-devel at lists.debian.org, and the 
reasons for compiling with the -fPIC flag must be recorded in the file 
README.Debian"

libmysqld.a is a static library and it is built with -fPIC only on amd64, but 
that is not described in README.Debian. Also please do not treat a single arch 
specially since that makes absolutely no sense. You either build with -fPIC on 
all arches or none or build both PIC and nonPIC versions on all arches (which 
I'm suggesting).

Therefore this bug is also a request to provide both -fPIC and non-fPIC 
versions of libmysqld.a. I have even written a patch for this (debdiff 
attached). I need libmysqld to be linked into dynamic library [1][2], but I 
can't use it until it is built without -fPIC on other arches.

The changes make mysql build twice without and with -fPIC respectively in 
separate build directories (the 2nd time only libmysqld and its dependencies 
are built). Then both libmysqld.a (nonPIC version) and libmysqld_pic.a (PIC 
version) are installed to libmysqlclient-dev. As a side effect of using out-
of-source-tree builds, hack in clean target is no longer needed. Patch 02  
fixes FTBFS of libmysqld examples due to undefined symbol.

The only remaining part for you is to create a README.Debian. Justification is 
of -fPIC version is simple: libmysqld_pic.a is needed to be able to include it 
into shared libraries, which is a perfectly valid use case for libmysqld. 
Since you still provide nonPIC libmysqld.a, Debian Policy is not violated.

P.S. libmysqld_pic.a and libmysqld.a are around 16MB each and they increase 
package size by 4MBs each. So it makes sense to split them both into their own 
package (libmysqld).


#457915: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457915
1. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501495
2. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508399

-- 
Modestas Vainius <modestas at vainius.eu>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmysqld_nonpic_and_pic.diff
Type: text/x-patch
Size: 8331 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20081211/4d294188/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20081211/4d294188/attachment.pgp 


More information about the pkg-mysql-maint mailing list