strongswan-5.9.1-r0 won't start on alpine:edge
Since: !14529 (merged)
I'm not sure if I am missing some dependencies or if it is an issue in strongswan.
Tobias (stronswan developer) suggests:
Hi Christian,
I'm not sure if I am missing some dependencies/capabilities or if this is an issue in strongswan.
Possible, but it seems a bit strange. There have been no changes in regards to the use of gettid() since 4.6.2. It's used to print the native thread ID in a log message when threads are started (since 5.4.0 it can be used also as internal thread IDs, but that configure option does not seem to be enabled for the alpine package).
The configure script searches for gettid() and, if not found, also checks if the SYS_gettid syscall can be used (the latter then causes the definition of a static inline implementation of gettid() directly in thread.c).
Error relocating /usr/lib/ipsec/libstrongswan.so.0: gettid: symbol not found
So if you get this error, my guess is that gettid() was found on the system on which the package was built, but not on the image you installed it now. Whether gettid() is actually available (and does not have to be replicated via syscall) depends on the libc that's in use (e.g. glibc does not provide a wrapper around the syscall, Android's bionic, however, does).
Maybe contact the package maintainer and ask whether the build environment has changed when the latest package was built.
Regards, Tobias
Steps to reproduce:
# docker pull alpine:edge
# docker run -itd --name strongswan --privileged alpine:edge
# docker exec -it strongswan /bin/sh
/ # apk add strongswan
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/19) Installing iproute2 (5.9.0-r0)
Executing iproute2-5.9.0-r0.post-install
(2/19) Installing libbz2 (1.0.8-r1)
(3/19) Installing fts (1.2.7-r1)
(4/19) Installing xz-libs (5.2.5-r0)
(5/19) Installing libelf (0.182-r0)
(6/19) Installing libmnl (1.0.4-r1)
(7/19) Installing libnftnl-libs (1.1.8-r0)
(8/19) Installing iptables (1.8.6-r0)
(9/19) Installing iproute2-tc (5.9.0-r0)
(10/19) Installing iproute2-minimal (5.9.0-r0)
(11/19) Installing iproute2-ss (5.9.0-r0)
(12/19) Installing libcap (2.45-r0)
(13/19) Installing ca-certificates (20191127-r5)
(14/19) Installing brotli-libs (1.0.9-r2)
(15/19) Installing nghttp2-libs (1.41.0-r0)
(16/19) Installing libcurl (7.73.0-r0)
(17/19) Installing gmp (6.2.0-r1)
(18/19) Installing sqlite-libs (3.33.0-r0)
(19/19) Installing strongswan (5.9.1-r0)
Executing strongswan-5.9.1-r0.pre-install
Executing busybox-1.32.0-r3.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 18 MiB in 33 packages
/ # ipsec start
Error relocating /usr/lib/ipsec/libstrongswan.so.0: gettid: symbol not found
/ #