Thursday, January 24, 2013

XML_C14N error when compiling libxmlsec

OK, as an bioinformatician I always work with compiling and running with many different tools. Here comes with the problem: I need to install the genefilter package in R, which is a great package for performing microarray analysis. In our institute cluster, it works well in the head node but not in other nodes. Further inspection shows that a static library, libxmlsec, is missing in these nodes. Compiling this library is painful as you have to deal with many different errors...

After a few days of struggle, I successfully compiled libxmlsec and now genefilter works fine for all nodes in the cluster. Here I just write down some error messages and my solutions, in cases others have the same problem.

XMLSEC compiling errors: XML_C14N_1_0 undeclared

The error message is something like:

c14n.c: In function 'xmlSecTransformC14NExecute':
c14n.c:423: error: 'XML_C14N_1_0' undeclared (first use in this function)
c14n.c:423: error: (Each undeclared identifier is reported only once
c14n.c:423: error: for each function it appears in.)
c14n.c:431: error: 'XML_C14N_1_1' undeclared (first use in this function)
c14n.c:439: error: 'XML_C14N_EXCLUSIVE_1_0' undeclared (first use in this function)


XML_C14N_1_0 is defined in libxml2 header files, so check whether your libxml2 has some problems. More specifically, XML_C14N_1_0 is defined in "c14n.h", and older libxml2 headers this is not defined. For me this error occurs since I have an older version of libxml2 in the system, which the compiler overrides a newer version in my home directory. Here is the following command the MAKE used when error occurs:

gcc -DHAVE_CONFIG_H -I. -I.. -DPACKAGE=\"xmlsec1\" -I../include -I../include -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1, -I/usr/include/libxml2 -I/home/include/libxml2 -g -O2 -MT c14n.lo -MD -MP -MF .deps/c14n.Tpo -c c14n.c  -fPIC -DPIC -o .libs/c14n.o

Look at the include option (-I) in the above example: the system libxml2 headers are in front of my own libxml2 headers, so the system libxml2 headers (which are the older ones) are used instead of the newer libxml2 headers. My solution is to add a symbolic link in the "include" directory of libxml2 pointing to the new libxml2 headers in my home directory:

wl948@header:~/prog/libxmlsec/xmlsec1-1.2.18/include$ ln -s $HOME/include/libxml2/libxml libxml

which solve this issue because right now the newer libxml2 headers are in front of the system libxml2 files.

I'm sure there should be alternative solutions in the configure program by providing a proper option (probably by setting some environment variables) but I didn't check. Anyone has any ideas?


  1. I'm 15 years old. I was born with HIV my mother passed away because of the HIV infection And I regret why i never met Dr Itua he could have cured my mum for me because as a single mother it was very hard for my mother I came across Dr itua healing words online about how he cure different disease in different races diseases like HIV/Aids Herpes Copd Diabetes Hepatitis even Cancer I was so excited but frighten at same time because I haven't come across such thing article online then I contacted Dr Itua on Mail I also chat with him on what's app +2348149277967 he tells me how it works then I tell him I want to proceed I paid him so swiftly Colorado post office I receive my herbal medicine within 4/5 working days he gave me guild lines to follow and here am I living healthy again can imagine how god use men to manifest his works am I writing in all articles online to spread the god work of Dr Itua Herbal Medicine Yes can ask me anything about this on my twitter @ericamilli or text 7205992850.He's a Great Man.

  2. SEO is the process of optimizing your website and content to improve its visibility for relevant searches. And, SEO services in New York are not different. These are basically offered by an SEO agency in New York who is an expert in local SEO Marketing New York.

  3. Shootercasino – Play casino games online for real money
    › play-casino-games › 카지노 play-casino-games Play the most popular casino games 인카지노 available on the net with Shootercasino. Have 제왕 카지노 fun with fun! Play now!