AcademySoftwareFoundation / openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
http://www.openexr.com/
BSD 3-Clause "New" or "Revised" License
1.62k stars 609 forks source link

Runpath woes #1204

Open spezialspezial opened 2 years ago

spezialspezial commented 2 years ago

libIlmImf, built out of the box, has a slightly strange runpath set, going up and then looking for a lib dir. That means the parent dir has to be called lib or it won't find it's siblings. Not a big issue as I would not want to call it not lib right now but it might cause unexpected failiure at some other time.

libIlmImf-2_5.so.25 => ./libIlmImf-2_5.so.25 libImath-2_5.so.25 => ./../lib/libImath-2_5.so.25 libIlmThread-2_5.so.25 => ./../lib/libIlmThread-2_5.so.25 libHalf-2_5.so.25 => ./libHalf-2_5.so.25 libIex-2_5.so.25 => ./libIex-2_5.so.25

readelf -d libIlmImf-2_5.so.25.0.1 | grep path (RUNPATH) Library runpath: [$ORIGIN/../lib:/DEV/LIBS/openexr-2.5.2/lib]

Is this on purpose eventually? Is there some OpenEXR CMake facility to modify the runpath or what would you recommend? If the runpath is set on the target, not globally, it's hard to modify via shell script and I would look into patching the cmake file.

spezialspezial commented 2 years ago

Just wanted to add that libOpenEXR-3_1.so looks the same