[xmlsec] Xmlsec Issue on Linux x86_64, XMLSEC_NO_SIZE_T

Aleksey Sanin aleksey at aleksey.com
Tue Mar 20 21:12:17 PST 2007


Could you please try to get xmlsec from svn and run ./autogen.sh
instead of ./configure? It sounds like the autoconf/automake packages
are not configuring xmlsec on your system correctly. ./autogen.sh
should force the update.

Aleksey

Nolan Hurlburt wrote:
> Hi list,
> 
> I ran into a bit of a problem recently using the xmlsec library today on 
> a Linux x86_64 box. Here’s the situation:
> 
> 1) The xmlsec library was compiled using the standard configure, make. ( 
> --enable-debugging, --with-libxlst=no )
> 2) A piece of code that signs an xml doc was compiled and linked it to 
> the library.
> 3) The code involved a call to xmlSecDSigCtxSign()
> result = ( xmlSecDSigCtxSign( dsigCtx, signNode ) >= 0);
> 
> This was failing because the struct in the library appeared to be 
> different then the one that our code was passing in. ( Memory was 
> shifted when it entered the xmlSecDSigCtxSign function ) Note: the code 
> works fine on 32-bit Windows and Linux.
> 
> We determined this was because of a compile flag that is set when 
> compiling the library: -DXMLSEC_NO_SIZE_T. (configure.in ln: 128)
> 
> This results in a size_t being an unsigned int rather than size_t . 
> (xmlsec.h line:43)
> 
> Apparently this is defined when configure detects a 64-bit system. 
> Obviously when we compiled our code we didn’t compile with this defined 
> causing a difference in the size of the struct relative to the piece of 
> code.
> 
> We can resolve this in two ways:
> 
> 1) Not defining XMLSEC_NO_SIZE_T when compiling the library.
> 2) Compiling our application with XMLSEC_NO_SIZE_T defined.
> 
> Is anyone familiar with the implications of each of these actions?
> 
> Thank you kindly,
> 
> Nolan
> 



More information about the xmlsec mailing list