[MXS-4771] Problem while linking libnosqlprotocol.so Created: 2023-09-21 Updated: 2023-09-25 Resolved: 2023-09-22 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | build |
| Affects Version/s: | 23.02 |
| Fix Version/s: | 6.4.11, 22.08.9, 23.02.5, 23.08.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Xiaotong Niu | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 20.04.6 LTS |
||
| Description |
|
I hit a problem while building current MaxScale 23.02 from GitHub source on Ubuntu 20.04. Every time I get linking error like this:
I followed the steps in Quickstart from Building MariaDB MaxScale from Source Code to install it.
Some details about the environment:
|
| Comments |
| Comment by markus makela [ 2023-09-21 ] |
|
Managed to reproduce this. There's some auto-detection of libraries going on that aren't linked to MaxScale but are linked to the nosqlprotocol. |
| Comment by markus makela [ 2023-09-21 ] |
|
This can be fixed by adding -DENABLE_SNAPPY=OFF to the CMAKE_ARGS in cmake/BuildMongoCDriver.cmake. |
| Comment by Xiaotong Niu [ 2023-09-25 ] |
|
I found another way to fix the problem: Add "snappy" in the target_link_libraries of the MaxScale/server/modules/protocol/NoSQL/CMakeLists.txt and the MaxScale/server/modules/protocol/NoSQL/test/CMakeLists.txt. I would like to ask why we don’t use this method to make the link successful, but add -DENABLE_SNAPPY=OFF? I'm new to this, looking forward to your reply. |
| Comment by markus makela [ 2023-09-25 ] |
|
The snappy dependency isn't needed which is why it's better to disable the linking instead of adding an unnecessary dependency to MaxScale. |
| Comment by Xiaotong Niu [ 2023-09-25 ] |
|
Thank you very much~ |