Re: [xslt] Build error on Solaris w/o snprintf



On Fri, May 11, 2007 at 10:01:49AM -0400, Nick Deubert wrote:
> Hello,
> Recently I tried to build libxslt on Solaris (SunOS 5.5.1) and got the
> following warning and link error. I made the change below (not sure if
> it's even ok to do this) and it seemed to fix it for me.
> Thanks,
> Nick
> 
> namespaces.c: In function `xsltGetSpecialNamespace':
> namespaces.c:585: warning: implicit declaration of function `snprintf'
> ...
> ../libxslt/.libs/libxslt.so: undefined reference to `snprintf'
> collect2: ld returned 1 exit status
> make[2]: *** [xsltproc] Error 1
> 
> 
> --- namespaces.c.orig   2007-05-11 09:56:42.000000000 -0400
> +++ namespaces.c        2007-05-11 09:56:42.000000000 -0400
> @@ -43,6 +43,8 @@
>  #include "xsltutils.h"
>  #include "namespaces.h"
>  #include "imports.h"
> +#include "trio.h"
> +#define snprintf trio_snprintf

  What version are you using ? I see

namespaces.c-#ifndef    XSLT_NEED_TRIO
namespaces.c-#include <stdio.h>
namespaces.c-#else
namespaces.c:#include <trio.h>
namespaces.c-#endif
namespaces.c-
namespaces.c-#include <libxml/xmlmemory.h>

 so the need for trio should be detected by configure, and automatically inluded
if needed. Forcing trio use like your patch does in all cases is not a proper
way to fix your problem in the general case,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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