You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System (please complete the following information):
OS: OpenWRT 23.04
Kernel version (if applicable): 5.15
strongSwan version(s): 5.9.8
Tested/confirmed with the latest version: yes
Describe the bug
When building OpenWRT image the patchelf is executed to fix RPATHs, which ends up with appending XXX to the library making the library not usable:
$ swanctl --load-all
swanctl: symbol lookup error: /usr/lib/ipsec/libstrongswan.so.0: undefined symbol: XXX
To Reproduce
Steps to reproduce the behavior:
Build the OpenWRT 22.03 with strongswan enabled
Use: objdump -s -j .dynstr libstrongswan.so.0 on packaged library
Yes, that's a known issue that should be fixed in patchelf.
They stated that the problem may be caused by the use of global variable named "lib"
which has the same name as the basename of the directory where the library is installed
Yes, you can find my detailed analysis in the issue you referenced.
I patched strongswan to rename "lib" variable to "swlibrary" but the result is the same.
What do you mean "the same"? Are you sure you're not mixing binaries from different builds?
System (please complete the following information):
Describe the bug
When building OpenWRT image the patchelf is executed to fix RPATHs, which ends up with appending XXX to the library making the library not usable:
$ swanctl --load-all
swanctl: symbol lookup error: /usr/lib/ipsec/libstrongswan.so.0: undefined symbol: XXX
To Reproduce
Steps to reproduce the behavior:
...
56b8 35002f75 73722f6c 69622f69 70736563 5./usr/lib/ipsec
56c8 00585858 58585858 58585858 58585858 .XXXXXXXXXXXXXXX
56d8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
56e8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
56f8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5708 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5718 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5728 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5738 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5748 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5758 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5768 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5778 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5788 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
5798 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
57a8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
57b8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
57c8 58585858 58585858 58585858 58585858 XXXXXXXXXXXXXXXX
57d8 58585858 58585858 58585858 585800 XXXXXXXXXXXXXX.
Expected behavior
A proper library patching
Additional context
The problem reported to patchelf project:
NixOS/patchelf#315
Unfortunately not fixed.
They stated that the problem may be caused by the use of global variable named "lib":
https://github.com/strongswan/strongswan/blob/master/src/libstrongswan/library.h#L285
which has the same name as the basename of the directory where the library is installed
I patched strongswan to rename "lib" variable to "swlibrary" but the result is the same. So I think the patchelf guys assumption could be wrong.
The text was updated successfully, but these errors were encountered: