[MDEV-19603] MariaDB 10.4 does not build on OpenBSD due to the use of libdl Created: 2019-05-26 Updated: 2020-07-31 Resolved: 2020-07-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, Galera |
| Affects Version/s: | 10.4.5, 10.5.0, 10.5.4 |
| Fix Version/s: | 10.4.14, 10.5.5 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Brad Smith | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Environment: |
OpenBSD |
||
| Attachments: |
|
| Description |
|
MariaDB 10.4 does not build on OpenBSD due to the use of libdl
|
| Comments |
| Comment by Brad Smith [ 2019-06-15 ] |
|
There were 3 spots I saw linking fail due to the use of libdl. unittest/sql/explain_filename-t |
| Comment by Brad Smith [ 2019-08-03 ] |
|
Still affects 10.4.7. |
| Comment by Laurent Frigault [ 2019-08-06 ] |
|
I successfully work around this bug and compile mariadb 10.4.6 in a jail running freebsd 10.4 . 1/ I'm not a cmake specialist, but any portable code should use CMAKE_DL_LIBS instead of LIBDL find ${WRKSRC} -type f -name CMakeLists.txt | fgrep -l ' {LIBDL}' | xargs -n 1 sed -i .orig -e 's|{LIBDL}| {CMAKE_DL_LIBS}|' 2/ — plugin/auth_pam/CMakeLists.txt.orig 2019-06-18 00:00:32.000000000 +0200
— wsrep-lib/src/CMakeLists.txt.orig 2019-06-18 00:00:31.000000000 +0200 After this, mariadb 10.4.6 build successfully and starts. |
| Comment by Brad Smith [ 2019-08-10 ] |
|
Comparing the CMake files between 10.3 and 10.4 they both have the same use of ${LIBDL}. So something must have changed elsewhere in the MariaDB codebase. All releases prior to 10.4 have always built Ok. |
| Comment by Brad Smith [ 2019-12-19 ] |
|
This is (not surprisingly) an issue with 10.5 as well. |
| Comment by Brad Smith [ 2019-12-28 ] |
|
So doing a bit more testing, if I patch just wsrep-lib/src/CMakeLists.txt, which seems to be the root of where this bogus libdl is being added, then MariaDB 10.4 and 10.5 build Ok. |
| Comment by Brad Smith [ 2019-12-30 ] |
|
It looks as if substituting dl for ${LIBDL} should work in wsrep-lib/src/CMakeLists.txt, but I don't know CMake well. |
| Comment by Brad Smith [ 2020-01-02 ] |
|
I have used just the wsrep-lib/src/CMakeLists.txt modification to use ${LIBDL} for the 10.4.11 update I have commited to the OpenBSD port / package. |
| Comment by Brad Smith [ 2020-01-28 ] |
|
We're using 10.4.11 in our MariaDB port /package. Could this one patch please go in for 10.4.12 and 10.5.1 to fix the build? |
| Comment by Brad Smith [ 2020-06-28 ] |
|
So we've upgraded from 10.4 to 10.5 and this is still a build issue with 10.4 / 10.5. |
| Comment by Brad Smith [ 2020-07-04 ] |
|
Our current patch from our ports tree. |
| Comment by Sergei Golubchik [ 2020-07-31 ] |