openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!

Home Page:http://www.porticoproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing shared pugixml library

guigui64 opened this issue · comments

Building on Ubuntu 20, the librti1516e64[d].so files are created with undefined references.
You can realize that either when compiling the example federate (A), or by adding the -z defs ld args when building the lib in ieee1516e.xml (B).

(A)

$ ./linux64.sh compile
RTI_HOME environment variable is set to /home/comte/workspaces/hla/portico/codebase/dist/portico-2.2.0
compiling example federate
/usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/dist/portico-2.2.0/lib/gcc4/librti1516e64.so: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
collect2: error: ld returned 1 exit status

(B)

cpp.ieee1516e.compile:
     [echo] [Compile] (IEEE-1516e) gcc4.amd64.debug
     [echo] (IEEE-1516e) Building librti1516e64d (gcc4-debug amd64)
  [cpptask] Starting Compile 
(...)
  [cpptask] Starting Link 
  [cpptask] /usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/build/cpp/linux64/ieee1516e/gcc4/amd64/debug/obj/amd64/DatatypeRetrieval.o: in function `portico1516e::DatatypeRetrieval::getDatatypeNode(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)':
  [cpptask] /home/comte/workspaces/hla/portico/codebase/src/cpp/ieee1516e/src/portico/DatatypeRetrieval.cpp:324: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
  [cpptask] /usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/src/cpp/ieee1516e/src/portico/DatatypeRetrieval.cpp:330: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
  [cpptask] /usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/src/cpp/ieee1516e/src/portico/DatatypeRetrieval.cpp:336: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
  [cpptask] /usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/src/cpp/ieee1516e/src/portico/DatatypeRetrieval.cpp:342: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
  [cpptask] /usr/bin/ld: /home/comte/workspaces/hla/portico/codebase/src/cpp/ieee1516e/src/portico/DatatypeRetrieval.cpp:348: undefined reference to `pugi::xpath_node_set::operator=(pugi::xpath_node_set&&)'
  [cpptask] collect2: error: ld returned 1 exit status

I think that the cpptask that builds those libraries do not use the static libraries present in codebase/lib/pugixml/linux64/lib*.a

Solutions are:

  • build shared libraries for pugixml (tested): this would require adding path to this lib in LD_LIBRARY_PATH
  • have the cpptask link to provided static libraries (not tested because I don' t know how to do it with cpptask)