[MDEV-5725] libmysqld* is not packaged in debs Created: 2014-02-24  Updated: 2016-11-20  Resolved: 2016-11-20

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 5.5.36, 10.0.26, 10.1.16
Fix Version/s: 10.2.3

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Otto Kekäläinen
Resolution: Fixed Votes: 2
Labels: contribution, debian, foundation, packaging

Issue Links:
Blocks
is blocked by MDEV-6284 Merge downstream Debian/Ubuntu packag... Closed
Duplicate
duplicates MDEV-6413 libmariadbd-dev DEB package is empty Closed
Relates
relates to MXS-808 CMake mysql_version check using mysql... Closed

 Description   

Neither libmysqld.so* nor libmysqld.a are present in 5.5 debian packages. Apparently, they never were (not even in the very first 5.5.20-alpha).



 Comments   
Comment by Otto Kekäläinen [ 2014-07-04 ]

As part of the fixes in MDEV-6284 there is a package called libmysqld-dev that contains the files libmysqld.so and libmysql.a.

In a comment to MDEV-6284 tturenko commented that he thinks that the libmysqld.so file should not be inside a -dev package. In comparison to RPM packages the libmysqld.so file is inside the mariadb-server package. Debian might require that shared libs are in separate packages, but then again it does depend on the mariadb-server package to function (because it needs errmsg.sys files, reads my.cnf, and can use all the server tools, like myisamchk). I'll look into this.

I cannot copy a solution from the MySQL packaging side, as to my knowledge MySQL in Debian does not have any libmysqld.so (https://packages.debian.org/search?searchon=contents&keywords=libmysqld.so&mode=filename&suite=unstable&arch=any) though the embedded lib is described in the MySQL.com docs (https://dev.mysql.com/doc/refman/5.5/en/libmysqld.html).

Comment by Otto Kekäläinen [ 2014-12-21 ]

tturenko Do you think the best solution would be to move the libmysqld.so file into the mariadb-server-core-10.0 package? There the libmysqld would have access to the errmsg.sys files etc for sure. See file listing at http://labs.seravo.fi/~otto/mariadb-repo/mariadb-10.0-sid-amd64/filelist-ec07593.log

If so, then the libmariadbd-dev package would contain only the libmysqld.a file.

What about other development files, should a libmsqld.h file exist somewhere?

Comment by Timofey Turenko [ 2015-01-13 ]

I guess libmariadbd-dev should contain only .a file, but I'm not sure regarding proper location for libmysqld.so
It also have to be fixed in 5.5

Comment by Daniel Black [ 2016-07-20 ]

To be consistent with ubuntu yes libmariadbd-dev should contain the .a file. The .so file could go in a libmariadbd package maybe but otherwise libmariadbd-dev - I'm not too fussy.

There also needs to be header files that define the API in libmariadb-dev (which is also an upstream problem). A pkg-config file would be really nice too to avoid hacks like https://github.com/mariadb-corporation/MaxScale/blob/develop/cmake/FindMySQL.cmake#L42 .

Ubuntu file list: http://packages.ubuntu.com/xenial/amd64/libmariadbd-dev/filelist

Attempting to build maxscale appears to need the ubuntu libmariadbd-dev for these shared libraries and the mariadb packaged libmariadbclient-dev for the headers which all would agree is kinda daft.

Comment by Andrii Nikitin (Inactive) [ 2016-11-03 ]

The original problem doesn't occur in latest internal release 10.2.3 http://buildbot.askmonty.org/buildbot/builders/kvm-deb-trusty-amd64/builds/3854
revision c6713f651f5a50709273d14ce5732f7ef3409737 :

(after installing libmariadbd-dev_10.2.3+maria~trusty_amd64.deb ):
% find / | grep libmysqld
/usr/lib/x86_64-linux-gnu/libmysqld.a
/usr/lib/x86_64-linux-gnu/libmysqld.so

Comment by Daniel Black [ 2016-11-03 ]

Good start on getting a .a file there.

From http://hasky.askmonty.org/archive/10.2/build-11869/kvm-deb-xenial-amd64/debs/binary/

$  dpkg-deb -c libmariadbd-dev_10.2.3+maria~xenial_amd64.deb
drwxr-xr-x root/root         0 2016-11-04 05:20 ./
drwxr-xr-x root/root         0 2016-11-04 05:19 ./usr/
drwxr-xr-x root/root         0 2016-11-04 05:19 ./usr/lib/
drwxr-xr-x root/root         0 2016-11-04 05:20 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root  35674278 2016-11-04 05:20 ./usr/lib/x86_64-linux-gnu/libmysqld.a
drwxr-xr-x root/root         0 2016-11-04 05:19 ./usr/share/
drwxr-xr-x root/root         0 2016-11-04 05:19 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-11-04 05:20 ./usr/share/doc/libmariadbd-dev/
-rw-r--r-- root/root       466 2016-11-04 04:38 ./usr/share/doc/libmariadbd-dev/changelog.gz
-rw-r--r-- root/root      2501 2016-11-04 03:49 ./usr/share/doc/libmariadbd-dev/copyright
lrwxrwxrwx root/root         0 2016-11-04 05:20 ./usr/lib/x86_64-linux-gnu/libmysqld.so -> libmysqld.so.19

So the .so is a symlink to a libmysqld.so.19 which isn't in this package? Wrong. The libmysqld.so.19 needs to be in the package too. shared library appeared to be for libmariadbd18 however this package wasn't created.

Like otto and I have said, all we also need the header include files. They are in the libmariadbclient-dev pkg which is a dependency

Added mariadb_config to dev package. Check that mariadb_config output the right library name - I suspect -lmariadb will be used despite mysqld being installed.

Unfixed: /usr/bin/mysql_config --port is 0 (this is client side config). Couldn't work out why.

Fixes in:
https://github.com/MariaDB/server/pull/254

Comment by Otto Kekäläinen [ 2016-11-04 ]

Please keep in mind that most of these Debian packaging issues are already fixed in Debian.org repositories. MDEV-6284 was a big step in upstreaming them, but not the last step, and the rest of the steps (and fixes) will follow.

To avoid duplicate work, please check if the change is already in http://git.debian.org/?p=pkg-mysql/mariadb-10.0.git

Generated at Thu Feb 08 07:06:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.