[Maria-discuss] MDB 10.4+Galera build's wsrep-lib/.../*.so libs are built, but not installed? what step's missing?
I'm building MDB 10.4/head on linux64 Galera's set up for build, following https://mariadb.com/kb/en/library/installing-galera-from-source/ The build/install has no apparent errors afterwards, checking build FAILs ./mysqld -V ./mysqld: error while loading shared libraries: libwsrep-lib.so: cannot open shared object file: No such file or directory ... To fix this here, cd <MDB SRC>/build /bin/cp -af \ ./wsrep-lib/src/libwsrep-lib.so \ ./wsrep-lib/wsrep-API/libwsrep_api_v26.so \ /usr/local/lib64/galera/ echo "/usr/local/lib64/galera" >> /etc/ld.so.conf.d/mariadb-custom.conf ldconfig now ./mysqld -V ./mysqld Ver 10.4.7-MariaDB-log for Linux on x86_64 (Source distribution) What additional 'standard build procedure' step is needed to get those "/wsrep-lib/.../*.so" correctly installed with, no manual intervention?
Hi, PGNet! On Jul 26, PGNet Dev wrote:
I'm building MDB 10.4/head on linux64
Galera's set up for build, following
https://mariadb.com/kb/en/library/installing-galera-from-source/
How did you build, I mean, exact commands? I used `cmake . && make` as the page above says, and I didn't get this error.
The build/install has no apparent errors
afterwards, checking build FAILs
./mysqld -V ./mysqld: error while loading shared libraries: libwsrep-lib.so: cannot open shared object file: No such file or directory ...
Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
hi serg On 8/1/19 12:40 AM, Sergei Golubchik wrote:
How did you build, I mean, exact commands? I used `cmake . && make` as the page above says, and I didn't get this error.
Of course you didn't! ;-) Atm, I've got a fairly 'verbose' config -- I'll try some cleanup and see if I can find any specific config item that causes the problem. fyi, a quick check in the build dir with my currently, problematic, build: ldd ./sql/mysqld | grep -i wsrep linux-vdso.so.1 (0x00007ffdfcd71000) libpcre.so.1 => /usr/local/lib64/libpcre.so.1 (0x00007f0041552000) libpcrecpp.so.0 => /usr/local/lib64/libpcrecpp.so.0 (0x00007f0041347000) libssl.so.1.1 => /usr/local/openssl11/lib64/libssl.so.1.1 (0x00007f00410ab000) libcrypto.so.1.1 => /usr/local/openssl11/lib64/libcrypto.so.1.1 (0x00007f0040bad000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f004098f000) liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f0040770000) liblzo2.so.2 => /usr/lib64/liblzo2.so.2 (0x00007f004054e000) liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f0040314000) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f00400f7000) libsnappy.so.1 => /usr/lib64/libsnappy.so.1 (0x00007f003feee000) libaio.so.1 => /lib64/libaio.so.1 (0x00007f003fcec000) libz.so.1 => /lib64/libz.so.1 (0x00007f003fad5000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f003f89a000) libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f003f605000) libwsrep-lib.so => /usr/local/src/mariadb104/build/wsrep-lib/src/libwsrep-lib.so (0x00007f003f3cf000) libwsrep_api_v26.so => /usr/local/src/mariadb104/build/wsrep-lib/wsrep-API/libwsrep_api_v26.so (0x00007f003f1ca000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f003efc6000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f003ebe6000) libm.so.6 => /lib64/libm.so.6 (0x00007f003e8ae000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f003e696000) libc.so.6 => /lib64/libc.so.6 (0x00007f003e2dc000) /lib64/ld-linux-x86-64.so.2 (0x00007f004380a000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f003e0c5000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f003de9c000) libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f003dc97000) librt.so.1 => /lib64/librt.so.1 (0x00007f003da8f000) libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007f003d772000) libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f003d551000) note the /usr/local/src/ paths for the libwsrep*. certainly doesn't look right ... I'll poke at my build; I suspect maybe rpath issue?
Hi, PGNet! On Aug 02, PGNet Dev wrote:
hi serg
On 8/1/19 12:40 AM, Sergei Golubchik wrote:
How did you build, I mean, exact commands? I used `cmake . && make` as the page above says, and I didn't get this error.
Of course you didn't! ;-)
Atm, I've got a fairly 'verbose' config -- I'll try some cleanup and see if I can find any specific config item that causes the problem. I'll poke at my build; I suspect maybe rpath issue?
No, normally libwsrep-lib and libwsrep_api_v26 are built as static libs, that's how they build for me too. Did you set, perhaps, -DBUILD_SHARED_LIBS=ON ? Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
On 8/2/19 8:21 AM, Sergei Golubchik wrote:
Did you set, perhaps, -DBUILD_SHARED_LIBS=ON ?
yep. that's been 'on' for ages here. that'd be one of the LAST options I would've thought to look at :-/ iiuc, it addresses the build/install in ls -al /usr/local/mariadb/lib64/ total 900K drwxr-xr-x 2 root root 4.0K Aug 2 07:42 ./ drwxr-xr-x 13 root root 4.0K Aug 2 07:42 ../ -rw-r--r-- 1 root root 485K Aug 2 07:16 libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmariadb.so -> libmariadb.so.3* -rwxr-xr-x 1 root root 376K Aug 2 07:16 libmariadb.so.3* lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient.a -> libmariadbclient.a lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient_r.a -> libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient_r.so -> libmariadb.so.3* lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient.so -> libmariadb.so.3* -rw-r--r-- 1 root root 25K Aug 2 07:16 libmysqlservices.a
Hi, PGNet! On Aug 02, PGNet Dev wrote:
On 8/2/19 8:21 AM, Sergei Golubchik wrote:
Did you set, perhaps, -DBUILD_SHARED_LIBS=ON ?
yep. that's been 'on' for ages here.
that'd be one of the LAST options I would've thought to look at :-/
iiuc, it addresses the build/install in
ls -al /usr/local/mariadb/lib64/ total 900K drwxr-xr-x 2 root root 4.0K Aug 2 07:42 ./ drwxr-xr-x 13 root root 4.0K Aug 2 07:42 ../ -rw-r--r-- 1 root root 485K Aug 2 07:16 libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmariadb.so -> libmariadb.so.3* -rwxr-xr-x 1 root root 376K Aug 2 07:16 libmariadb.so.3* lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient.a -> libmariadbclient.a lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient_r.a -> libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient_r.so -> libmariadb.so.3* lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient.so -> libmariadb.so.3* -rw-r--r-- 1 root root 25K Aug 2 07:16 libmysqlservices.a
Sorry, I don't understand. What happens with these libraries if you don't set BUILD_SHARED_LIBS to ON? Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
On 8/2/19 8:43 AM, Sergei Golubchik wrote:
Sorry, I don't understand. What happens with these libraries if you don't set BUILD_SHARED_LIBS to ON?
re-building to check that right now ... if libwsrep should be static to avoid this, shouldn't that be explicitly set in ./cmake/wsrep.cmake or, provided as an option, e.g., -DWITH_WSREP=static instead of simple boolean?
On 8/2/19 8:46 AM, PGNet Dev wrote:
... shouldn't that be explicitly set ...
fyi, per cmake docs, https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html "Global flag to cause add_library to create shared libraries if on. If present and true, this will cause all libraries to be built shared unless the library was explicitly added as a static library. This variable is often added to projects as an OPTION so that each user of a project can decide if they want to build the project using shared or static libraries."
What happens with these libraries if you don't set BUILD_SHARED_LIBS to ON?
re-building to check that right now ...
for the build/install itself: (1) -DBUILD_SHARED_LIBS=1 ls -al /usr/local/mariadb/lib64 total 876K drwxr-xr-x 2 root root 4.0K Aug 2 07:41 ./ drwxr-xr-x 13 root root 4.0K Aug 2 07:42 ../ -rw-r--r-- 1 root root 473K Aug 2 07:17 libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmariadb.so -> libmariadb.so.3* -rwxr-xr-x 1 root root 364K Aug 2 07:17 libmariadb.so.3* lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient.a -> libmariadbclient.a lrwxrwxrwx 1 root root 18 Aug 2 07:41 libmysqlclient_r.a -> libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient_r.so -> libmariadb.so.3* lrwxrwxrwx 1 root root 15 Aug 2 07:41 libmysqlclient.so -> libmariadb.so.3* -rw-r--r-- 1 root root 25K Aug 2 07:16 libmysqlservices.a mysqld -V mysqld: error while loading shared libraries: libwsrep-lib.so: cannot open shared object file: No such file or directory ldd /usr/local/mariadb/bin/mysqld | grep wsrep libwsrep-lib.so => not found libwsrep_api_v26.so => not found ls /usr/local/lib64/galera/* /usr/local/lib64/galera/libgalera_smm.so* cp -af \ ./wsrep-lib/src/libwsrep-lib.so \ ./wsrep-lib/wsrep-API/libwsrep_api_v26.so \ /usr/local/lib64/galera/ mysqld -V mysqld Ver 10.4.8-MariaDB-log for Linux on x86_64 (Source distribution) (2) -DBUILD_SHARED_LIBS=0 ls -al /usr/local/mariadb/lib64 total 900K drwxr-xr-x 2 root root 4.0K Aug 2 08:49 ./ drwxr-xr-x 13 root root 4.0K Aug 2 08:49 ../ -rw-r--r-- 1 root root 488K Aug 2 08:37 libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 08:49 libmariadb.so -> libmariadb.so.3* -rwxr-xr-x 1 root root 376K Aug 2 08:37 libmariadb.so.3* lrwxrwxrwx 1 root root 18 Aug 2 08:49 libmysqlclient.a -> libmariadbclient.a lrwxrwxrwx 1 root root 18 Aug 2 08:49 libmysqlclient_r.a -> libmariadbclient.a lrwxrwxrwx 1 root root 15 Aug 2 08:49 libmysqlclient_r.so -> libmariadb.so.3* lrwxrwxrwx 1 root root 15 Aug 2 08:49 libmysqlclient.so -> libmariadb.so.3* -rw-r--r-- 1 root root 25K Aug 2 08:37 libmysqlservices.a ls /usr/local/lib64/galera/* /usr/local/lib64/galera/libgalera_smm.so* ldd /usr/local/mariadb/bin/mysqld | grep wsrep (empty) mysqld -V mysqld Ver 10.4.8-MariaDB-log for Linux on x86_64 (Source distribution) Don't yet know what, if any, runtime or downstream effect this'll have. IIUC, the requirement is that libwsrep is always/only statically built? If so, set it explicitly?
Hi, PGNet! On Aug 02, PGNet Dev wrote:
On 8/2/19 8:43 AM, Sergei Golubchik wrote:
Sorry, I don't understand. What happens with these libraries if you don't set BUILD_SHARED_LIBS to ON?
re-building to check that right now ...
if libwsrep should be static to avoid this, shouldn't that be explicitly set in
./cmake/wsrep.cmake
Yes, I've just done that, in cmake/wsrep.cmake. We never in our automated or manual builds set BUILD_SHARED_LIBS, so this went unnoticed until now. Thanks! Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
On 8/2/19 9:33 AM, Sergei Golubchik wrote:
Yes, I've just done that, in cmake/wsrep.cmake.
We never in our automated or manual builds set BUILD_SHARED_LIBS, so this went unnoticed until now. Thanks!
gr8, thx! where are you 'hiding' it? I don't see it in https://github.com/MariaDB/server/tree/10.4 just need to wait a bit? or pull from elsewhere?
Hi, PGNet! On Aug 02, PGNet Dev wrote:
On 8/2/19 9:33 AM, Sergei Golubchik wrote:
Yes, I've just done that, in cmake/wsrep.cmake.
We never in our automated or manual builds set BUILD_SHARED_LIBS, so this went unnoticed until now. Thanks!
gr8, thx!
where are you 'hiding' it? I don't see it in
https://github.com/MariaDB/server/tree/10.4
just need to wait a bit? or pull from elsewhere?
Either. It's in my stage branch https://github.com/MariaDB/server/tree/bb-10.4-serg After it'll pass buildbot tests I'll push it into 10.4 You can pull from bb-10.4-serg or wait. Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
participants (2)
-
PGNet Dev
-
Sergei Golubchik