Glad to hear it. Your version of libxml is 2.9.1, which still uses xmlChar for format statements. More recent versions use char, which is now libnucnet's and NucNet Tools' default. One should be able to check the libxml version by typing
xml2-config --version
If the version is earlier than 2.9.3, one might need to set the environment variable WN_XML_CHAR, as you have done above. To set it permanently for your linux installation, edit your .bashrc file. Best wishes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Getting Help with Nucnet Tools" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I'm at revision 546, and in the examples/misc folder, typing make all_misc gives the following error:
make all_analysis gives a similar error.
tar xz -C ../../vendor -f ../../vendor/wn_matrix.tar.gz
g++ -Werror -Wall -Wpointer-arith -Wwrite-strings -fshort-enums -fno-common -g -O0 -fopenmp -Wno-deprecated
xml2-config --cflags
gsl-config --cflags
-I../../vendor/libnucnet/0.30/src -I../../vendor/wn_matrix/0.19/src -I../../vendor/libstatmech/0.10/src -I../../vendor/libnuceq/0.7/src -I../.. -c ../../vendor/wn_matrix/0.19/src/WnMatrix.c -o ../../obj/WnMatrix.o../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘int WnMatrixassignElement(WnMatrix, size_t, size_t, double)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:130:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_row, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_row );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:131:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_col, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_col );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar *buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘int WnMatrixupdateElement(WnMatrix, size_t, size_t, double)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:244:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_row, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_row );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:245:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_col, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_col );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘int WnMatrixremoveElement(WnMatrix, size_t, size_t)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:282:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_row, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_row );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:283:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_col, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_col );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar *buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘double WnMatrixgetElement(WnMatrix, size_t, size_t)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:322:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_row, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_row );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:323:62: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
xmlStrPrintf( sx_col, WN_MATRIX_BUF_SIZE, WN_FORMAT, i_col );
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘WnMatrixLine* WnMatrixgetRow(WnMatrix, size_t)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:1044:3: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘WnMatrixLine* WnMatrixgetColumn(WnMatrix, size_t)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:1108:3: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘xmlDoc WnMatrixCoomakeXmlDocument(WnMatrixCoo, const WnChar)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:1903:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:1920:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:1937:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘xmlDoc WnMatrixCsrmakeXmlDocument(WnMatrixCsr, const WnChar)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2095:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2140:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2157:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘xmlDoc WnMatrixYalemakeXmlDocument(WnMatrixYale, const WnChar)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2320:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2337:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../vendor/wn_matrix/0.19/src/WnMatrix.c: In function ‘xmlDoc* WnMatrixmake_gsl_vector_xml_document(gsl_vector, const WnChar)’:
../../vendor/wn_matrix/0.19/src/WnMatrix.c:2899:5: error: invalid conversion from ‘const WnChar {aka const char}’ to ‘const xmlChar {aka const unsigned char}’ [-fpermissive]
);
^
In file included from /usr/include/libxml2/libxml/tree.h:18:0,
from /usr/include/libxml2/libxml/parser.h:16,
from /usr/include/libxml2/libxml/hash.h:29,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.h:49,
from ../../vendor/wn_matrix/0.19/src/WnMatrix.c:40:
/usr/include/libxml2/libxml/xmlstring.h:98:17: note: initializing argument 3 of ‘int xmlStrPrintf(xmlChar, int, const xmlChar, ...)’
xmlStrPrintf (xmlChar buf,
^
../../build/Makefile:239: recipe for target '../../obj/WnMatrix.o' failed
make: *** [../../obj/WnMatrix.o] Error 1
Thanks for your post. Can you try (in a bash shell):
export WN_XML_CHAR=xmlChar
make clean
make all_analysis
Let me know if that works. If so, could you let me know the output you get from
./test_versions
Thanks, and best wishes.
View and moderate all "Getting Help with Nucnet Tools" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks, that worked.
Codes are compiled against:
libxml version 2.9.1
gsl version 1.16
Boost version 1.55.0
Glad to hear it. Your version of libxml is 2.9.1, which still uses xmlChar for format statements. More recent versions use char, which is now libnucnet's and NucNet Tools' default. One should be able to check the libxml version by typing
xml2-config --version
If the version is earlier than 2.9.3, one might need to set the environment variable WN_XML_CHAR, as you have done above. To set it permanently for your linux installation, edit your .bashrc file. Best wishes.