icecc / icecream

Distributed compiler with a central scheduler to share build load
GNU General Public License v2.0
1.58k stars 248 forks source link

`icecc-create-env` breaks GCC/binutils installations with absolute RPATHs #605

Open timschumi opened 2 years ago

timschumi commented 2 years ago

If GCC and binutils are installed to a non-standard location (probably everything except for /usr and /usr/local), they utilize absolute RPATHs to find the library dependencies that are otherwise stored in /usr/<host triple>/<target triple>/lib.

Since icecc-create-env doesn't check for an RPATH in the copied ELF files, it just copies those libraries to the "standard" location mentioned above. This results in remote compile jobs failing due to issues like the following:

[249] 2022-09-03 10:15:13: compiler produced stderr output:
as: error while loading shared libraries: libopcodes-2.39.so: cannot open shared object file: No such file or directory
[249] 2022-09-03 10:15:13: Remote compilation exited with exit code 1