Thanks for additional details, Thomas. I'm sending this to the bug-gnulib list, because test-localename.c is from gnulib. I do not have time to work on this problem further at the moment, but hopefully someone on bug-gnulib is able to help. In essense, it seems test-localename does not build on newer NetBSD that have newlocale() but not uselocale().
/Simon Thomas Klausner <[email protected]> writes: > Hi Simon! > > On Wed, Jul 08, 2015 at 10:24:22PM +0200, Simon Josefsson wrote: >> Thomas Klausner <[email protected]> writes: >> >> > Hi! >> > >> > lib/gltests/test-localename.c from libidn-1.30 fails to build on NetBSD: >> > >> > CCLD test-localename >> > test-localename.o: In function `test_locale_name_thread': >> > test-localename.c:(.text+0x23): undefined reference to `uselocale' >> > test-localename.c:(.text+0x73): undefined reference to `uselocale' >> > test-localename.c:(.text+0x109): undefined reference to `uselocale' >> > test-localename.c:(.text+0x191): undefined reference to `uselocale' >> > test-localename.c:(.text+0x1ce): undefined reference to `uselocale' >> > test-localename.o:test-localename.c:(.text+0x27c): more undefined >> > references to `uselocale' follow >> > *** Error code 1 >> > >> > The configure script already checks for this function, but the result >> > is ignored (from config.h): >> > >> > /* Define to 1 if you have the `uselocale' function. */ >> > /* #undef HAVE_USELOCALE */ >> > >> > Please do not reference uselocale() on systems where it doesn't exist. >> >> Hello Thomas. Thanks for the report. >> >> I cannot reproduce this. On my NetBSD 6.1.4 (a virtual machine >> downloaded from http://pretest.nongnu.org/), which doesn't have >> uselocale either, it builds fine. > > Thanks for installing NetBSD and trying this yourself! > However, you'll need a newer version of NetBSD to reproduce this problem. > > I'm running NetBSD 7.99.19/amd64, but newlocale() was added already in > 2013, so you can also try it in a NetBSD 7 release candidate. > > A snapshot of that is available at > http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-7/201507072130Z/amd64/installation/cdrom/ > but they only last a couple of days, then you'll have to look in > http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-7/ > for a newer one. > >> The lib/gltests/test-localename.c code should use the HAVE_NEWLOCALE >> #define to check whether it should call uselocale or not, and on my >> NetBSD system config.h correctly have this: >> >> /* #undef HAVE_NEWLOCALE */ > > I think that is exactly the problem -- it shouldn't check > HAVE_NEWLOCALE to decide if it uses uselocale(), but HAVE_USELOCALE > instead. > >> You will have to debug a bit more, or give me some way of reproducing >> it. Also, I'm currently in the process of releasing 1.31 so please try >> that version before debugging anything. > > Do you need more information or is this enough? > If not, please let me know what else. > > Thanks, > Thomas >
signature.asc
Description: PGP signature
