fzi-forschungszentrum-informatik / Lanelet2

Map handling framework for automated driving
BSD 3-Clause "New" or "Revised" License
800 stars 327 forks source link

Build fails on Kinetic #71

Closed msmcconnell closed 4 years ago

msmcconnell commented 4 years ago

Lanelet2's CI system runs a build for both ROS Melodic on Ubuntu 18.04 and ROS Kinetic on Ubuntu 16.04. However the Kinetic build has been failing recently https://travis-ci.org/fzi-forschungszentrum-informatik/Lanelet2/jobs/636414307

I have been able to replicate this error locally as well. Are there any plans to address this or is kinetic not supported anyway given the C++ 14 requirement?

Specific Error

Errors     << lanelet2_routing:make /home/developer/workspace/logs/lanelet2_routing/build.make.001.log
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2001l, 2014l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2001l, 2014l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2001l, 2004l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2001l, 2004l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2002l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2002l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2013l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2013l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2024l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2024l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2023l, 2016l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2023l, 2016l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2025l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2025l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2027l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2017l, 2027l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2024l, 2026l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2024l, 2026l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2024l, 2029l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2024l, 2029l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2029l, 2038l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2029l, 2038l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2041l, 2049l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2041l, 2049l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2015l, 2009l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2015l, 2009l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2015l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2003l, 2015l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2029l, 2068l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2029l, 2068l>::To'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2037l, 2037l, 2065l>::From'
/usr/include/c++/5/bits/unordered_map.h:689: error: undefined reference to 'TestRoute<2037l, 2037l, 2065l>::To'

Seems like a linker error but I haven't been able to figure-out the root cause.

poggenhans commented 4 years ago

It was a C++14 vs C++17 thing. Internally we develop with 17 but our internal tests should ensure that lanelet2 also builds with 14 before changes are being released to Github. However our internal tests do not check that the unittests can also be compiled with C++14, and so this error slipped though.

The problem should fixed now. Travis is happy as well.

msmcconnell commented 4 years ago

@poggenhans Thanks for the quick resolution!