From 8df9a22259c81bd4b23ab17cd3c9c6094c7b130d Mon Sep 17 00:00:00 2001 From: Tim Schendekehl Date: Sat, 23 Oct 2021 18:35:45 +0200 Subject: [PATCH] Use correct phobos when running C++ tests in GitHub action The GitHub workflow is setting LD_LIBRARY_PATH to the host dmd library folder with libphobos2.so. The tests are built using a new phobos. They select the library path using -L-rpath, which sets DT_RUNPATH on the binary, but LD_LIBRARY_PATH has priority over DT_RUNPATH. For tests/dshell/dll_cxx.d this caused a link failure, because a new symbol from phobos was not found in the older phobos. Reseting LD_LIBRARY_PATH while running the tests makes sure, that the new phobos is used. --- .github/workflows/runnable_cxx.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/runnable_cxx.yml b/.github/workflows/runnable_cxx.yml index 8a7cc2b6bc..7a619f611c 100644 --- a/.github/workflows/runnable_cxx.yml +++ b/.github/workflows/runnable_cxx.yml @@ -293,7 +293,8 @@ jobs: ######################################## - name: Run C++ test suite run: | - ./dmd/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=64 + # Reset LD_LIBRARY_PATH when running the tests, so they use the newly built libphobos2.so. + LD_LIBRARY_PATH= ./dmd/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=64 #if [ ${{ matrix.compiler }} == "g++" ]; then # ./dmd/test/run.d clean # ./dmd/test/run.d runnable_cxx MODEL=32