libad_map_opendrive_reader.so: undefined reference to `pugi::xml_named_node_iterator::operator++()'
tvsrr opened this issue · 2 comments
Hmm, seems like the linker might not actually be linking to pugixml. So you might want to check the actual detailed build output within the log/latest/* folder.
But as the ad_map_opendrive_reader.so has already the issue, it doesn't help to just not build osm_to_adm binary (which might not be required as it's a tool). You might be able to debug more by switching to the build/ad_map_opendrive_reader directory and find out what actually is listed as linked libraries if you call e.g. "ccmake ." there. Or just manually inspect the build/ad_map_opendrive_reader/CMakeCache.txt file there. What is there listed as PUGIXML_LIBRARIES? I believe that PUGIXML_INCLUDE_DIR should somehow be listed correctly otherwise it would even not compile... That's e.g. what listed on my Ubunut 16.04 machine in this file after
//Path to a file.
PUGIXML_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
PUGIXML_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libpugixml.so
And when I call
$> ldd libad_map_opendrive_reader.so
linux-vdso.so.1 => (0x00007fff9656c000)
libpugixml.so.1 => /usr/lib/x86_64-linux-gnu/libpugixml.so.1 (0x00007f7d0f1ef000)
libproj.so.9 => /usr/lib/x86_64-linux-gnu/libproj.so.9 (0x00007f7d0ef94000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7d0ebb1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7d0e8a8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7d0e690000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7d0e2c6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7d0e0a9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7d0f852000)
I believe in your case something went wrong...
But usually the build should abort on CMake configure if it is not found.
according to map/ad_map_opendrive_reader/CMakeLists.txt:
#pugixml
find_library(PUGIXML_LIBRARIES
NAMES pugixml
)
find_path(PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
)
if((NOT PUGIXML_LIBRARIES) OR (NOT PUGIXML_INCLUDE_DIR))
message(FATAL "Dependency pugixml not found!")
endif()
I guess, you already tried to delete the build directory and triggered a rebuild to ensure that there was not some kind of incomplete build as root cause....
Issue solved when pugixml share object creation is enabled in the cmakelists.txt