Commit 6bd74a6
committed
PS-10166 [8.0]: Improve stability of
On some platforms we see the following issue:
```
CURRENT_TEST: component_keyring_file.dynamic_loading /usr/bin/ld: /tmp/ccg7pao0.o: in function main::{lambda(void*)#1}::operator()(void*) const': dlopen_checker.cpp:(.text+0x1f): undefined reference to dlclose' /usr/bin/ld: /tmp/ccg7pao0.o: in function main': dlopen_checker.cpp:(.text+0xa9): undefined reference to dlopen' /usr/bin/ld: dlopen_checker.cpp:(.text+0xf8): undefined reference to dlerror' collect2: error: ld returned 1 exit status mysqltest: At line 20: Command "g++ -std=c++17 -ldl -o $dlopen_checker_binary $dlopen_checker_source" failed.
```
This error occurs because the linker flag -ldl (for linking against the dynamic loading library, libdl) is placed before the source file instead of after it in your g++ command.
In GCC and Clang, order matters — libraries must come after the objects or source files that reference them.component_keyring_file.dynamic_loading
1 parent 82a1d2e commit 6bd74a6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments