liblanelet
liblanelet copied to clipboard
Not able to compile
I am trying to compile liblanelet on a ubuntu machine. I have included OS,compiler and error details in 1),2),3) section. I think I am making some small mistake. Your guidance will be appreciated.
- OS details
Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial
2)compiler details:
~/gmu/map/liblanelet-master$ g++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3)error that I am getting:
scons install
scons: Reading SConscript files ...
Will not create pkg-configs
scons: done reading SConscript files.
scons: Building targets ...
/usr/bin/g++ -o libLanelet/build/llet_xml.os -c -O3 -std=c++0x -g -fPIC -DDEBUG -DTRACE_LEVEL=critical -Iinstalls/include libLanelet/llet_xml.cpp
In file included from libLanelet/llet_xml.cpp:24:0:
installs/include/MRT/libpugixml/pugixml.hpp:97:10: error: reference to 'basic_string' is ambiguous
typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::
typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;
^
In file included from libLanelet/llet_xml.cpp:24:0:
installs/include/MRT/libpugixml/pugixml.hpp:37:57: note: candidates are: template<class _Elem, class _Traits, class _Ax> class std::basic_string
template <class _Elem, class _Traits, class _Ax> class basic_string;
^
In file included from /usr/include/c++/5/string:39:0,
from /usr/include/c++/5/random:40,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from /usr/include/boost/math/tools/config.hpp:17,
from /usr/include/boost/math/tools/promotion.hpp:26,
from /usr/include/boost/math/special_functions/detail/round_fwd.hpp:12,
from /usr/include/boost/math/special_functions/math_fwd.hpp:26,
from /usr/include/boost/math/special_functions/airy.hpp:11,
from /usr/include/boost/math/special_functions.hpp:15,
from libLanelet/lanelet_point.hpp:22,
from libLanelet/LaneletBase.hpp:25,
from libLanelet/Lanelet.hpp:22,
from libLanelet/llet_xml.hpp:23,
from libLanelet/llet_xml.cpp:20:
/usr/include/c++/5/bits/stringfwd.h:71:11: note: template<class _CharT, class _Traits, class _Alloc> class std::__cxx11::basic_string
class basic_string;
^
In file included from libLanelet/llet_xml.cpp:24:0:
installs/include/MRT/libpugixml/pugixml.hpp:505:3: error: 'string_t' does not name a type
string_t path(char_t delimiter = '/') const;
^
installs/include/MRT/libpugixml/pugixml.hpp:918:3: error: 'string_t' does not name a type
string_t evaluate_string(const xpath_node& n) const;
^
installs/include/MRT/libpugixml/pugixml.hpp:1066:2: error: reference to 'basic_string' is ambiguous
std::basic_string<char, std::char_traits
+1
Well I tried to compile by changing files in pugixml directory with the most current one. It compiles and build library. However running the tests I get several errors as below. Not sure if it is normal or something is missing in my part.
./demo terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Aborted (core dumped)
~/liblanelet.new/installs/bin$ ./lanelet_tests [==========] Running 9 tests from 1 test case. [----------] Global test environment set-up. [----------] 9 tests from LaneletTest [ RUN ] LaneletTest.ConstructionOfLaneletsIsCorrect libLanelet/lanelet_tests.cpp:53: Failure Value of: 6 Expected: lanelets.size() Which is: 0 [ FAILED ] LaneletTest.ConstructionOfLaneletsIsCorrect (0 ms) [ RUN ] LaneletTest.PointGeometryFunctions [ OK ] LaneletTest.PointGeometryFunctions (0 ms) [ RUN ] LaneletTest.MapInsertionAndRetrieval libLanelet/lanelet_tests.cpp:84: Failure Expected: the_ll = map->lanelet_by_id(_id) doesn't throw an exception. Actual: it throws. [ FAILED ] LaneletTest.MapInsertionAndRetrieval (0 ms) [ RUN ] LaneletTest.NodeAccessFunctionsAreConsistent unknown file: Failure C++ exception with description "trying to retieve lanelet with unknown id: 22064" thrown in the test body. [ FAILED ] LaneletTest.NodeAccessFunctionsAreConsistent (1 ms) [ RUN ] LaneletTest.ResortingOfWaysWorksCorrectly unknown file: Failure C++ exception with description "trying to retieve lanelet with unknown id: 22064" thrown in the test body. [ FAILED ] LaneletTest.ResortingOfWaysWorksCorrectly (0 ms) [ RUN ] LaneletTest.AttributeStuffWorks unknown file: Failure C++ exception with description "trying to retieve lanelet with unknown id: 22064" thrown in the test body. [ FAILED ] LaneletTest.AttributeStuffWorks (0 ms) [ RUN ] LaneletTest.RegulatoryElementsAreParsedCorrectly unknown file: Failure C++ exception with description "trying to retieve lanelet with unknown id: 22061" thrown in the test body. [ FAILED ] LaneletTest.RegulatoryElementsAreParsedCorrectly (0 ms) [ RUN ] LaneletTest.GraphSetupWorks libLanelet/lanelet_tests.cpp:197: Failure Value of: 6 Expected: boost::num_vertices(map.graph()) Which is: 0 [ FAILED ] LaneletTest.GraphSetupWorks (1 ms) [ RUN ] LaneletTest.RoutingWorks unknown file: Failure C++ exception with description "trying to retieve lanelet with unknown id: 22063" thrown in the test body. [ FAILED ] LaneletTest.RoutingWorks (0 ms) [----------] 9 tests from LaneletTest (3 ms total)
[----------] Global test environment tear-down [==========] 9 tests from 1 test case ran. (3 ms total) [ PASSED ] 1 test. [ FAILED ] 8 tests, listed below: [ FAILED ] LaneletTest.ConstructionOfLaneletsIsCorrect [ FAILED ] LaneletTest.MapInsertionAndRetrieval [ FAILED ] LaneletTest.NodeAccessFunctionsAreConsistent [ FAILED ] LaneletTest.ResortingOfWaysWorksCorrectly [ FAILED ] LaneletTest.AttributeStuffWorks [ FAILED ] LaneletTest.RegulatoryElementsAreParsedCorrectly [ FAILED ] LaneletTest.GraphSetupWorks [ FAILED ] LaneletTest.RoutingWorks
8 FAILED TESTS
you are right. This project needs to overwrite pugixml source files by http://pugixml.org/.
demo needs to specify the map file. lanelet_tests needs to read the map file at "libLanelet/sample.osm"
In this case, the map file is sample.osm.
I tried to run demo and lanelet_tests and I met the same failures. Have you ever figured out if anything is missing or it's normal?
_在SConstruct的67行,或者随便哪一行添加一句env.Append(CCFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0")