Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to compile #3

Open
santosjha opened this issue May 22, 2017 · 5 comments
Open

Not able to compile #3

santosjha opened this issue May 22, 2017 · 5 comments

Comments

@santosjha
Copy link

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.

  1. 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, std::allocator > PUGIXML_FUNCTION as_utf8(const wchar_t* str);
^
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:1067:2: error: reference to 'basic_string' is ambiguous
std::basic_string<char, std::char_traits, std::allocator > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);
^
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:1070:2: error: reference to 'basic_string' is ambiguous
std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);
^
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:1071:2: error: reference to 'basic_string' is ambiguous
std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits, std::allocator >& str);
^
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;
^
libLanelet/llet_xml.cpp: In member function 'virtual bool {anonymous}::TagWalker::for_each(pugi::xml_node&)':
libLanelet/llet_xml.cpp:49:28: error: 'string_t' is not a member of 'pugi'
if( node.name() == pugi::string_t("tag") )
^
libLanelet/llet_xml.cpp: In member function 'virtual bool {anonymous}::WayTreeWalker::for_each(pugi::xml_node&)':
libLanelet/llet_xml.cpp:72:28: error: 'string_t' is not a member of 'pugi'
if( node.name() == pugi::string_t("tag") )
^
libLanelet/llet_xml.cpp:79:34: error: 'string_t' is not a member of 'pugi'
else if( node.name() == pugi::string_t("nd") )
^
scons: *** [libLanelet/build/llet_xml.os] Error 1
scons: building terminated because of errors.
<PUGIXML_CHAR> > string_t;

@Codebot2455
Copy link

+1

@santosjha
Copy link
Author

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

@dunanshan
Copy link

dunanshan commented May 27, 2017

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.

@ZhangHongjuan
Copy link

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?

TrackerSB added a commit to TrackerSB/liblanelet that referenced this issue Oct 27, 2018
rli9 pushed a commit to intel/lkp-tests that referenced this issue Dec 6, 2019
…ld version

there is only one version of viennacl, it didn't update since 2013.
now it keeps telling the following error, and it relates to phbender/liblanelet#3
/usr/include/c++/9/bits/stringfwd.h:79:11: error: reference to 'basic_string' is ambiguous
 79 | typedef basic_string<char> string;

Signed-off-by: Ma XinJian <[email protected]>
Signed-off-by: Philip Li <[email protected]>
@MakerFace
Copy link

_在SConstruct的67行,或者随便哪一行添加一句env.Append(CCFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants