Commit 3d12ddae authored by Julien Muchembled's avatar Julien Muchembled

gcc: make the ld wrapper add paths via -rpath if there's already an -rpath arg

We'd prefer ld to always take LD_RUN_PATH into account, even if any
rpath is specified in the command-line. We could actually change the
wrapper this way but it would not be consistent with the case where
the SR is built with system gcc.
parent 3f4c2101
Pipeline #11826 failed with stage
in 0 seconds
......@@ -42,13 +42,11 @@ post-install =
done
cat <<EOF >ld
#!/bin/sh -e
case \$#:\$1 in 0:|1:-*) ;; *)
if [ "\$LD_RUN_PATH" ]
then LD_RUN_PATH=\$LD_RUN_PATH$1
else set -- "\$@" $2
fi
for x; do case \$x in -rpath=*)
set -- "\$@" $2
! break
;;
esac
esac; done && export LD_RUN_PATH=\$${LD_RUN_PATH:+\$LD_RUN_PATH:}$${1#:}
exec ${binutils:location}/bin/ld "\$@"
EOF
chmod +x ld
......
  • Seems that this change results on Debian 9 with such error after building:

    Traceback (most recent call last):
      File "/srv/slapgrid/slappart13/srv/testnode/dfg/soft/e2d325c0fcfb592bc760fe363ac5b17a/parts/slapos.core-repository/slapos/testing/testcase.py", line 168, in setUpModule
        installSoftwareUrlList(cls, [software_url], debug=debug)
      File "/srv/slapgrid/slappart13/srv/testnode/dfg/soft/e2d325c0fcfb592bc760fe363ac5b17a/parts/slapos.core-repository/slapos/testing/testcase.py", line 378, in installSoftwareUrlList
        checkSoftware(cls.slap, software_url)
      File "/srv/slapgrid/slappart13/srv/testnode/dfg/soft/e2d325c0fcfb592bc760fe363ac5b17a/parts/slapos.core-repository/slapos/testing/testcase.py", line 336, in checkSoftware
        raise RuntimeError('\n'.join(error_list))
    RuntimeError: /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/mysql_ldb has some not found libraries:
    /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/mysql_ldb: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/mysql_ldb)
    /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/sst_dump has some not found libraries:
    /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/sst_dump: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /srv/slapgrid/slappart13/srv/testnode/dfg/inst/test0-0/tmp/shared/mariadb/46cf3950f79675ddccafc1c99a13e734/bin/sst_dump)

    One of example is test result.

  • I can confirm it breaks cmake compilation on Debian 8:

    2020-10-12 12:12:47 slapos[11209] INFO [ 99%] Built target CTestLib
    2020-10-12 12:12:47 slapos[11209] INFO [100%] Built target ctest
    2020-10-12 12:12:47 slapos[11209] INFO Install the project...
    2020-10-12 12:12:47 slapos[11209] INFO bin/cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: vers
    ion `GLIBCXX_3.4.21' not found (required by bin/cmake)                                          
    2020-10-12 12:12:47 slapos[11209] INFO bin/cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: vers
    ion `CXXABI_1.3.9' not found (required by bin/cmake)                                            
    2020-10-12 12:12:47 slapos[11209] INFO Makefile:72: recipe for target 'install' failed
    2020-10-12 12:12:47 slapos[11209] INFO make: *** [install] Error 1
    2020-10-12 12:12:47 slapos[11209] INFO cmake: Command 'set -e;make  install' returned non-zero e
    xit status 2                                                                                    
    2020-10-12 12:12:47 slapos[11209] INFO cmake: Compilation error. The package is left as is at /s
    rv/slapgrid/slappart61/srv/runner/shared/cmake/9fc4b0e8f4f03ce17eb7ef43525d2238__compile__/cmake
    -3.7.2 where you can inspect what went wrong.                                                   
    2020-10-12 12:12:47 slapos[11209] INFO A shell script slapos.recipe.build.env.sh has been genera
    ted. You can source it in your shell to reproduce build environment.                            
    2020-10-12 12:12:47 slapos[11209] INFO While:
    2020-10-12 12:12:47 slapos[11209] INFO   Installing cmake.
    2020-10-12 12:12:47 slapos[11209] INFO Error: System error
    2020-10-12 12:12:47 slapos[11209] ERROR Failed to run buildout profile in directory '/srv/slapgr
    id/slappart61/srv/runner/software/1dc912312557bed156a353ea948435ea'
    2020-10-12 12:12:47 slapos[11209] INFO Finished software releases.
  • I will revert this commit for now as we can't work and it is a small commit anyway.

  • mentioned in commit 9a7c08e0

    Toggle commit list
  • I had already noticed slapos-sr-testing errors and I had already started to investigate. I didn't know that it fails during build on Debian 8.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment