CTSRD-CHERI / cheribsd-ports

FreeBSD ports tree adapted for CheriBSD.
https://CheriBSD.org
Other
5 stars 11 forks source link

www/serf hardcodes /usr/lib in --rpath breaking hybrid subversion #44

Open bsdjhb opened 2 years ago

bsdjhb commented 2 years ago

Not sure if we want to fix this vs try to get purecap subversion working instead?

Symptom is that pkg64 svn doesn't work out of the box.

> svn info
ld-elf64.so.1: /usr/local64/bin/svn: cannot load /usr/lib/libssl.so.111 since it is CheriABI

I debugged this to libserf.so.1 having /usr/lib in its rpath:

> readelf -d /usr/local64/lib/libserf-1.so

Dynamic section at offset 0x19538 contains 37 entries:
  Tag                Type                  Name/Value
 0x000000000000001d RUNPATH              Library runpath: [/usr/local64/lib:/usr/local64/lib:/usr/lib:/usr/local64/lib/db5:/usr/lib]
...

This ends up in RPATH in serf's SConstruct file via $OPENSSL/lib so it's not a LOCALBASE issue, but instead things assuming base system libraries are in /usr/lib. Workaround is to use env LD_64_LIBRARY_PATH=/usr/lib64 svn ...