Build failure on Ubuntu 20.04

The upgrade to MDL SDK 2023.1/2023.1.2 causes following build errors with g++ 9.3.0 on Ubuntu 20.04 due to the new missing-symbol-check:

[ 98%] Linking CXX shared library Release/libmdl_core.so
[ 98%] Linking CXX shared library Release/libmdl_sdk.so
undefined symbol: dlclose	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_core/Release/libmdl_core.so)
undefined symbol: dlsym	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_core/Release/libmdl_core.so)
undefined symbol: dlopen	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_core/Release/libmdl_core.so)
undefined symbol: dlerror	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_core/Release/libmdl_core.so)
make[2]: *** [src/prod/lib/mdl_core/CMakeFiles/prod-lib-mdl_core.dir/build.make:164: src/prod/lib/mdl_core/Release/libmdl_core.so] Error 1
make[2]: *** Deleting file 'src/prod/lib/mdl_core/Release/libmdl_core.so'
make[1]: *** [CMakeFiles/Makefile2:8527: src/prod/lib/mdl_core/CMakeFiles/prod-lib-mdl_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
undefined symbol: dlclose	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_sdk/Release/libmdl_sdk.so)
undefined symbol: dlsym	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_sdk/Release/libmdl_sdk.so)
undefined symbol: dlopen	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_sdk/Release/libmdl_sdk.so)
undefined symbol: dlerror	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_sdk/Release/libmdl_sdk.so)
undefined symbol: dladdr	(/home/runner/work/gatling/gatling/BUILD/src/prod/lib/mdl_sdk/Release/libmdl_sdk.so)
make[2]: *** [src/prod/lib/mdl_sdk/CMakeFiles/prod-lib-mdl_sdk.dir/build.make:235: src/prod/lib/mdl_sdk/Release/libmdl_sdk.so] Error 1
make[2]: *** Deleting file 'src/prod/lib/mdl_sdk/Release/libmdl_sdk.so'
make[1]: *** [CMakeFiles/Makefile2:8602: src/prod/lib/mdl_sdk/CMakeFiles/prod-lib-mdl_sdk.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Error: Process completed with exit code 2.

I was able to fix the problem by setting the “-Wl,--no-as-needed” linker flag before -ldl.

Hi,
thanks for the report. Could you try the attached fix (without your workaround)?
Best regards,
Joachim
dlopen.diff.txt (879 Bytes)

Thanks for looking into this - I can confirm that the patch fixes the issue.

Ok, thanks. This fix will be included in the next bug fix release.