Eric Blake <[EMAIL PROTECTED]> writes: >> I found this while linking against gnutls, which uses the string >> module, which then uses '#define strerror rpl_strerror' in its lgpl >> library when strerror is not found. That, in turn, leads to an >> undefined rpl_strerror symbol in libgnutls.so. > > That might be a bug - if the gnulib strerror module is not in use, then > the #define strerror rpl_strerror should not be in place. But since it > looks like gnutls has been subsequently fixed to avoid strerror > altogether, I'm not sure if this still indicates any problems.
The problem is gone, but if anyone is interested, the reason the problem occurred was that gnutls has several gnulib directories, one for LGPL files that can be used by the library, and other gnulib directories for GPL stuff. The string.h module is added in the LGPL directory. The strerror module is added in the GPL directory. So the strerror re-declaration is visible even for the gnutls library that include string.h. For this reason, the gnutls library must be careful to avoid ever calling strerror. (Another reason is that strerror is thread-unsafe so a library shouldn't use it anyway..) /Simon