Hi all:
I am using RHEL8 and GCC8, statically linking ETA and libxml2.
I'm trying to build a sample application using ETA 2.2.3 and libxml2. When linking I am getting duplicate symbols errors like
/opt/rh/gcc-toolset-11/root/usr/bin/ld: /userhome/epederson/.conan/data/libxml2/2.13.5///package/a0eb883ef4c5f6bbed8510d21145a7b12bd3ce89/lib/libxml2.a(libxml2_la-globals.o): in function xmlInitGlobals':
/userhome/epederson/.conan/data/libxml2/2.13.5/_/_/build/a0eb883ef4c5f6bbed8510d21145a7b12bd3ce89/src/globals.c:560: multiple definition of
xmlInitGlobals'; /userhome/epederson/.conan/data/rtsdk-eta/2.2.3/third-party/stable/package/86623287cb17dedcf3a3860ff0bc96052d3e2443/lib/librsslVA.a(libxml2_la-globals.o):globals.c:(.text+0x1a): first defined here
That is one of many such duplicate symbols. When looking at librssVA.a (Specifically ./Cpp-C/Eta/Libs/RHEL8_64_GCC831/Optimized/librsslVA.a), I see that does define the duplicate symbols. For example:
$ nm --defined-only librsslVA.a | grep xmlInitGlobals
000000000000001a T xmlInitGlobals
0000000000000026 T xmlInitGlobalsInternal
When checking the contents of librsslVA.a it appears that somehow the libxml2 object files have been included. For example:
$ ar t librsslVA.a | grep libxml2
libxml2_la-buf.o
libxml2_la-c14n.o
libxml2_la-catalog.o
libxml2_la-chvalid.o
libxml2_la-debugXML.o
libxml2_la-dict.o
libxml2_la-encoding.o
libxml2_la-entities.o
libxml2_la-error.o
libxml2_la-globals.o
libxml2_la-hash.o
libxml2_la-HTMLparser.o
libxml2_la-HTMLtree.o
libxml2_la-list.o
libxml2_la-parserInternals.o
libxml2_la-parser.o
libxml2_la-pattern.o
libxml2_la-relaxng.o
libxml2_la-SAX2.o
libxml2_la-schematron.o
libxml2_la-threads.o
libxml2_la-tree.o
libxml2_la-uri.o
libxml2_la-valid.o
libxml2_la-xinclude.o
libxml2_la-xlink.o
libxml2_la-xmlIO.o
libxml2_la-xmlmemory.o
libxml2_la-xmlmodule.o
libxml2_la-xmlreader.o
libxml2_la-xmlregexp.o
libxml2_la-xmlsave.o
libxml2_la-xmlschemas.o
libxml2_la-xmlschemastypes.o
libxml2_la-xmlstring.o
libxml2_la-xmlunicode.o
libxml2_la-xmlwriter.o
libxml2_la-xpath.o
libxml2_la-xpointer.o
Is this intentional? Is it possible to use both libxml2 and librsslVA in the same program? What is the intention of librsslVA versus librssl?
Thanks,