help-libidn
[Top][All Lists]
Advanced

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

Re: thank you for libidn 1.34 however ...


From: Dennis Clarke
Subject: Re: thank you for libidn 1.34 however ...
Date: Sat, 31 Mar 2018 22:55:27 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0


Looks like you have a different source code than me... there is no Line
1120 in nfkc.c.
And L798 looks different here. Also, it is not possible for 'str' to
NULL (nil) when called from stringprep_ucs4_nfkc_normalize().
The code is
   if (!p)
     return NULL;
   result_wc = _g_utf8_normalize_wc (p, -1, G_NORMALIZE_NFKC);

Could you please check your source code version...

I know .. I was looking at that and thinking .. hold on .. no way can p be NULL on that call.

n0$ openssl dgst -sha256 ../src/libidn-1.34.tar.gz
SHA256(../src/libidn-1.34.tar.gz)= 3719e2975f2fb28605df3479c380af2cf4ab4e919e1506527e4c7670afff6e3c

n0$ cd libidn-1.34_SunOS5.10_sparcv9.003
n0$ wc -l lib/nfkc.c
    1112 lib/nfkc.c

Guess what ... a previous version is getting dragged into the mix here :

n0$ wc -l ../libidn-1.33_SunOS5.10_sparcv9.001/lib/nfkc.c
    1124 ../libidn-1.33_SunOS5.10_sparcv9.001/lib/nfkc.c
n0$

n0$ tail -20 ../libidn-1.33_SunOS5.10_sparcv9.001/lib/nfkc.c
 * @len: length of @str array, or -1 if @str is nul-terminated.
 *
 * Converts a UCS4 string into canonical form, see
 * stringprep_utf8_nfkc_normalize() for more information.
 *
 * Return value: a newly allocated Unicode string, that is the NFKC
 *   normalized form of @str.
 **/
uint32_t *
stringprep_ucs4_nfkc_normalize (const uint32_t * str, ssize_t len)
{
  char *p;
  uint32_t *result_wc;

  p = stringprep_ucs4_to_utf8 (str, len, 0, 0);
  result_wc = _g_utf8_normalize_wc (p, -1, G_NORMALIZE_NFKC);
  free (p);

  return result_wc;
}
n0$

ah ha !

No check for p being NULL there.

I have previous libidn 1.33 in /usr/local/lib and that must be getting caught up in this mess.

Oh .. this is loads of fun to unravel.

I will set aside libidn.so.11.6.16 in /usr/local/lib and start over.

Gets even better .. there are system libs in the way :

n0$ ldd ./lib/.libs/libidn.so.11.6.18
        libintl.so.8 =>  /usr/local/lib/libintl.so.8
        libc.so.1 =>     /lib/64/libc.so.1
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
n0$ ldd ./examples/.libs/example
        libidn.so.11 =>  /usr/lib/64/libidn.so.11
        libintl.so.8 =>  /usr/local/lib/libintl.so.8
        libc.so.1 =>     /lib/64/libc.so.1
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
n0$

However maybe I need to set LD_LIBRARY_PATH ?

n0$ LD_LIBRARY_PATH=`pwd`/lib/.libs ldd ./src/.libs/idn
libidn.so.11 => /usr/local/build/libidn-1.34_SunOS5.10_sparcv9.003/lib/.libs/libidn.so.11
        libintl.so.8 =>  /usr/local/lib/libintl.so.8
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
n0$

OKay if I hide the previously installed libidn-1.33 and also set LD_LIBRARY_PATH to point to the build dir and then ./lib/.libs well gee I finally get :

Undefined                       first referenced
 symbol                             in file
alloca                              main.o

So this is progress I think.

Loads of fun.

Dennis







reply via email to

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