On Tue, Feb 14, 2017 at 10:07 AM, Tim Ruehsen <tim.rueh...@gmx.de> wrote: >> > Interesting, that would affect gnutls as well since it is also using >> > libunistring that way. >> >> Actually it doesn't. I had made a separate library with unistring >> which was only being included if libunistring was not available. I >> attempted to do something similar for libidn2 at: >> https://gitlab.com/jas/libidn2/merge_requests >> >> Note however that in libidn2 you had two states. Have libunistring >> available with uc_joining_type imported from a local copy from >> unistring (latest), and have libunistring containing everything. For >> the simplicity of the fix above, I've switched to have a sufficiently >> new libunistring, vs have no libunistring. That means of course that >> the newer (and bigger) libunistring will enter on systems without >> 0.9.6. > > Libidn2 is built with libtool which uses the linker flag --whole-archive for > libgnu.a: > > libtool: link: gcc -shared -fPIC -DPIC .libs/idna.o .libs/decode.o .libs/ > lookup.o .libs/register.o .libs/bidi.o .libs/version.o .libs/error.o .libs/ > punycode.o .libs/free.o .libs/data.o .libs/tr46map.o .libs/tables.o .libs/ > context.o -Wl,--whole-archive lib/.libs/libgnu.a -Wl,--no-whole-archive - > lunistring -g -Wl,--version-script=./idn2.map -Wl,-soname -Wl,libidn2.so.0 > -o .libs/libidn2.so.0.1.5 > > This adds everything from libgnu.a to libidn2.so.0.1.5, if needed or not.
That's right, but there is little gnulib can help here. Imagine a libunistring on the system supporting unicode 6, while the gnulib supporting unicode 7. It would really take a complex algorithm to decide which functions can get in and which not. I think it makes sense to keep things simple and require the latest libunistring, or use the included otherwise. > The issue is gone when removing --whole-archive. Everything links fine and the > tests work. But I have no clue how to tell libtool that it should not use -- > whole-archive. Any idea ? No idea. regards, Nikos PS. I've split the patches on the previous request to split lib from unistring and move the main library to idn2/ _______________________________________________ Help-libidn mailing list Help-libidn@gnu.org https://lists.gnu.org/mailman/listinfo/help-libidn