Skip to content

tools: Find the NetworkManager-all-sym binary location.

orbea requested to merge orbea/NetworkManager:libtool into master

When building NetworkManager with slibtool (https://dev.midipix.org/cross/slibtool) it will compile, but then it will fail to correctly work during runtime. For example it does not find my wifi device.

This is because the create-exports-NetworkManager.sh script hardcodes the of the build binary.

https://gitlab.freedesktop.org/orbea/NetworkManager/-/blob/6af73f9d172d6ba11a1b865f9a19881373cf8666/tools/create-exports-NetworkManager.sh#L43

With slibtool this is instead a libtool wrapper script and not the actual binary.

$ find ./src/ -type f -name NetworkManager-all-sym -exec file {} \;
./src/.libs/NetworkManager-all-sym: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
./src/NetworkManager-all-sym: POSIX shell script, ASCII text executable

This MR attempts to automatically find the correct NetworkManager-all-sym binary without depending on it being in a specific location which is enough to fix NetworkManager when built with slibtool.

Merge request reports

Loading