AntaresSimulatorTeam / Antares_Simulator

Antares-Simulator is an Open Source power system simulator to quantify the adequacy or the economic performance of interconnected energy systems, at short or remote time horizons.
https://antares-simulator.org
Other
58 stars 24 forks source link

error while loading shared libraries: libsirius_solver.so: cannot open shared object file: No such file or directory #1082

Closed flomnes closed 1 year ago

flomnes commented 1 year ago

Version

v8.4.2, only solver-only assets.

omnesflo@gm0winl370:~/Téléchargements$ ./solver/antares-8.4-solver 
./solver/antares-8.4-solver: error while loading shared libraries: libsirius_solver.so: cannot open shared object file: No such file or directory
omnesflo@gm0winl370:~/Téléchargements$ ldd ./solver/antares-8.4-solver 
    linux-vdso.so.1 (0x00007fff669fb000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6efd504000)
    libsirius_solver.so => not found
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f6efd4fb000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6efd4d8000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6efd2f6000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6efd1a5000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6efd18a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6efcf98000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f6eff0be000)
omnesflo@gm0winl370:~/Téléchargements$ cd solver
omnesflo@gm0winl370:~/Téléchargements/solver$ ./antares-8.4-solver 

Surprisingly, assets in solver-only archives are different from those produced by CMake's CPACK utility. libsirius_solver.so's path is relative in the solver-only asset. In the full asset, it looks different.

omnesflo@gm0winl370:~/Téléchargements$ md5sum solver/antares-8.4-solver antares-8.4.2-Ubuntu-20.04/bin/antares-8.4-solver 
d506b7b49cda8e9c8fc4f73e94512b9d  solver/antares-8.4-solver
8308cd3a1d50ca1a2ac73dfbcb7dd595  antares-8.4.2-Ubuntu-20.04/bin/antares-8.4-solver

Difference in hex format

omnesflo@gm0winl370:~/Téléchargements$ hexdump solver/antares-8.4-solver > solver.hex
omnesflo@gm0winl370:~/Téléchargements$ hexdump  antares-8.4.2-Ubuntu-20.04/bin/antares-8.4-solver > solver_u.hex
omnesflo@gm0winl370:~/Téléchargements$ colordiff solver.hex solver_u.hex 
1720,1725c1720,1723
< 0006b70 682f 6d6f 2f65 7572 6e6e 7265 772f 726f
< 0006b80 2f6b 6e41 6174 6572 5f73 6953 756d 616c
< 0006b90 6f74 2f72 6e41 6174 6572 5f73 6953 756d
< 0006ba0 616c 6f74 2f72 7472 2d65 6e61 6174 6572
< 0006bb0 2d73 6564 7370 522d 6c65 6165 6573 6c2f
< 0006bc0 6269 003a 5a5f 4854 344e 6261 6c73 3231
---
> 0006b70 4f24 4952 4947 004e 0000 0000 0000 0000
> 0006b80 0000 0000 0000 0000 0000 0000 0000 0000
> *
> 0006bc0 0000 0000 5a5f 4854 344e 6261 6c73 3231
sylvlecl commented 1 year ago

I think that it's the install step which modifies the "rpath" used for library resolution (defined through variable CMAKE_INSTALL_RPATH), but in the workflow we only perform the build step (cmake --build).