help-libidn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _idn2_punycode_decode undefined for static linkage


From: Alexey Rochev
Subject: Re: _idn2_punycode_decode undefined for static linkage
Date: Mon, 20 Feb 2023 14:04:16 +0300

I also have similar issue with minimal example that links static libidn2 into shared library, using Fedora's GCC 12 toolchain:

[1/2 76.7/sec] Building C object CMakeFiles/untitled2.dir/Release/main.c.o
[2/2 84.8/sec] Linking C shared library Release/libuntitled2.so
FAILED: Release/libuntitled2.so
: && /usr/bin/gcc -fPIC -O3 -DNDEBUG   -shared -Wl,-soname,libuntitled2.so -o Release/libuntitled2.so CMakeFiles/untitled2.dir/Release/main.c.o  /home/alexey/projects/libidn2-2.3.4/install/lib/libidn2.a && :
/usr/bin/ld: Release/libuntitled2.so: version node not found for symbol _idn2_punycode_encode@IDN2_0.0.0
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
14:01:29: The process "/usr/bin/cmake" exited with code 1.

main.c only uses idn2_lookup_u8.

пн, 20 февр. 2023 г. в 00:47, Alexey Rochev <equeim@gmail.com>:
FYI I have the same issue when building using Android NDK and linking shared library against static libidn2:
C/C++: ld: error: /home/alexey/projects/tremotesf-android/libtremotesf/.vcpkg_installed_arm64-android/arm64-android/lib/libidn2.a(puny_decode.o): symbol _idn2_punycode_decode@IDN2_0.0.0 has undefined version IDN2_0.0.0

Android NDK is based on LLVM 14 and uses lld for linking.

Patching config.h is not convenient since it would mean copying vcpkg buildscript for libidn2 and maintaining the modified version manually (unless it can be done via some special ./configure option or adding something to CFLAGS).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]