Linux build failing during compiling
I need to build locally OpenSlide 4.0.0.6 and all of its dependencies and I am using the following commands:
docker run -ti --rm -v ${PWD}:/work -w /work ghcr.io/openslide/linux-builder bash./bintool bdistmeson setup build -Ddefault_library=shared --cross-file machines/native-linux-x86_64.inimeson compile -C build
During the last command I am getting the following build error:
And this is the end of the build logs:
Is there anything I am missing or have not done properly?
It turns out that -Wl,--exclude-libs,ALL in native-linux-x86_64.ini, which is necessary to prevent re-exporting of dependencies' symbols from the unified libopenslide.so, also prevents the jpeg12_* and jpeg16_* symbols from being re-exported from their static libraries when linked into libjpeg.so. OpenSlide currently doesn't use 12- and 16-bit JPEG functionality, but the libtiff wrap doesn't have a user-facing option to avoid it.
The cleanest workaround is to remove -Wl,--exclude-libs,ALL from native-linux-x86_64.ini. This will also prevent similar issues with any other dependencies that build their shared libraries from separate static libraries.
(Unrelated: you don't need to run bintool bdist. The manual meson invocations replace the bintool run.)