Skip to content

Commit

Permalink
libidn2.sh: add workaround for -fPIC static build bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Aug 29, 2023
1 parent 4c9ac3b commit 656d90c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libidn2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ _VER="$1"
--enable-static \
--disable-shared \
--disable-doc --silent

if [ "${_OS}" = 'linux' ]; then
# Workaround for -fPIC static builds failing when linking:
# ld.lld-16: error: ./libidn2/x64-gnu/usr/lib/libidn2.a(puny_encode.o): symbol _idn2_punycode_encode@IDN2_0.0.0 has undefined version IDN2_0.0.0
# https://gitlab.com/libidn/libidn2/-/issues/80
sed -i.bak 's/#define HAVE_SYMVER_ALIAS_SUPPORT 1//g' config.h
fi
)

make --directory="${_BLDDIR}" --jobs="${_JOBS}" install "DESTDIR=$(pwd)/${_PKGDIR}" # >/dev/null # V=1
Expand Down

0 comments on commit 656d90c

Please sign in to comment.