[MDEV-12423] install fails to create/install symlinks to mysqlclient compat libs Created: 2017-04-02  Updated: 2017-07-13  Resolved: 2017-07-13

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Server
Affects Version/s: 10.2.5, 10.2
Fix Version/s: 10.2.7

Type: Bug Priority: Major
Reporter: pgnd Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

git log | head
commit 6315426565590982b096344df61cae4b64ab2eb0
Author: Sergei Golubchik <serg@mariadb.org>
Date: Fri Mar 31 19:56:15 2017 +0200

restore libmariadb state

that was destroyed in a previous commit

commit 124bae082bf17e9af1fc77f78bbebd019635be5c
Author: Marko Mäkelä <marko.makela@mariadb.com>



 Description   

mkdir build
cd build
cmake .. -LAH
	...
	// creates libmysql* symbolic links
	CONC_WITH_MYSQLCOMPAT:BOOL=ON
	...
rm -f CMakeCache.txt
cmake .. -DCONC_WITH_MYSQLCOMPAT=1 ...
make -j4 V=1
rm -rf /usr/local/mariadb/
make install

note, NO SYMLINKS

ls -al /usr/local/mariadb/lib64/
	total 840K
	drwxrwxr-x+  2 root root 4.0K Apr  1 17:49 ./
	drwxrwxr-x+ 13 root root 4.0K Apr  1 17:47 ../
	-rw-r--r--+  1 root root 445K Apr  1 17:39 libmariadbclient.a
	lrwxrwxrwx   1 root root   15 Apr  1 17:47 libmariadb.so -> libmariadb.so.3*
	-rwxr-xr-x+  1 root root 335K Apr  1 17:39 libmariadb.so.3*
	-rw-r--r--+  1 root root  22K Apr  1 17:39 libmysqlservices.a

checking sources

cd ../
rm -rf build
grep MYSQLCOMPAT `grep -rln MYSQLCOMPAT .`
	./cmake/mariadb_connector_c.cmake:SET(CONC_WITH_MYSQLCOMPAT ON)
	./libmariadb/CMakeLists.txt:FOREACH(V WITH_MYSQLCOMPAT WITH_MSI WITH_SIGNCODE WITH_RTC WITH_UNITTEST
??	./libmariadb/CMakeLists.txt:  ADD_OPTION(WITH_MYSQLCOMPAT "creates libmysql* symbolic links" ON)

trying instead

-	cmake .. -DCONC_WITH_MYSQLCOMPAT=1 ...
+	cmake .. -DWITH_MYSQLCOMPAT=1 ...
 
	make -j4 V=1
	rm -rf /usr/local/mariadb/
	make install

note, still NO SYMLINKS

ls -al /usr/local/mariadb/lib64/
	total 816K
	drwxrwxr-x+  2 root root 4.0K Apr  1 19:14 ./
	drwxrwxr-x+ 13 root root 4.0K Apr  1 19:14 ../
	-rw-r--r--+  1 root root 445K Apr  1 19:08 libmariadbclient.a
	lrwxrwxrwx   1 root root   15 Apr  1 19:14 libmariadb.so -> libmariadb.so.3*
	-rwxr-xr-x+  1 root root 335K Apr  1 19:08 libmariadb.so.3*
	-rw-r--r--+  1 root root  22K Apr  1 19:08 libmysqlservices.a



 Comments   
Comment by pgnd [ 2017-05-23 ]

I see 10.2.6 has been released. As configured above, installs from 10.2-branch still do not create the compat symlinks.

As that's changed behavior from earlier releases,

(1) is that the intention/plan going forward?
(2) should packagers accommodate locally?

Comment by Sergei Golubchik [ 2017-05-23 ]

A preliminary answer — no, this is not the intention, it's a bug that didn't make the deadline. Hopefully, it'll be fixed in the next release.

A proper bug resolution should come in a few of weeks, closer to the 10.2.7 release date.

Comment by pgnd [ 2017-05-23 ]

fyi, then:

for those building/installing mariadb locally – 'above' a distro installed, earlier/different release of MDB – and your build's installed lib paths are modified at any point to precede distro-installed paths (e.g., /usr/local/lib64 preceding /usr/lib64), the presence of the distro's libmysqlclient.so – in the absence of these^ symlinks from your build – will be used by (the many) apps that (still) search for & link against libmysqlclient.so.

That can/will cause some ... interesting ... run-time issues.

For now, a DIY symlink is needed.

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