Git Product home page Git Product logo

Comments (7)

clalancette avatar clalancette commented on August 24, 2024 3

This should have been fixed upstream with cartographer-project@ae05658 (which is in this repository), and then further fixed in cartographer-project@1f69b83 (which is not). So I believe that this would be fixed by moving to upstream.

And that is basically the goal here. All of the changes in this repository have now been merged upstream, so this repository should be considered deprecated. We can't quite switch to the upstream yet in ROS 2 Foxy, because the cartographer_ros port in https://github.com/ros2/cartographer_ros doesn't build against the newer cartographer.

All of that is to say is that you should make sure that https://github.com/cartographer-project/cartographer builds for you, and work with upstream to make sure that is the case.

from cartographer.

clalancette avatar clalancette commented on August 24, 2024

Can you tell me which branch and commit you are on for the cartographer repository? You have to be using the ros2 branch here.

from cartographer.

ShivamPR21 avatar ShivamPR21 commented on August 24, 2024

Yes I was using ros2 branch but before that I have tried to build on tag 2.0.0, 2.1.0 and release-latest unfortunately only 2.1.0 was able to build successfully but is incompatible with cartographer_ros[on branch ros2].

from cartographer.

clalancette avatar clalancette commented on August 24, 2024

Yes, you need to stick to the ros2 branches for both this and cartographer_ros.

I will say that what you pasted above looks pretty weird. There's a lot of jumbled output there, so it's kind of hard to see what is going on.

Unfortunately, I don't have much else to give you here. This builds for me locally and on the buildfarm: http://build.ros2.org/view/Fbin_uF64/job/Fbin_uF64__cartographer__ubuntu_focal_amd64__binary/5/consoleFull . This must be something different in your environment, but I don't have a good idea what it could be at the moment.

from cartographer.

goekce avatar goekce commented on August 24, 2024

On Archlinux with GCC 10.2 I get similar errors:

/usr/bin/ld: CMakeFiles/cartographer.common.lockless_queue_test.dir/cartographer/common/lockless_queue_test.cc.o: undefined reference to symbol '_ZN7testing4Test5SetUpEv'
/usr/bin/ld: /usr/lib/libgtest.so.1.10.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

libgtest must be provided as a library during linking:

$ pwd
build/cartographer

$ cmake  -E cmake_link_script CMakeFiles/cartographer.common.lockless_queue_test.dir/link.txt --verbose=1
/usr/bin/c++ -O3 -DNDEBUG -rdynamic CMakeFiles/cartographer.common.lockless_queue_test.dir/cartographer/common/lockless_queue_test.cc.o -o cartographer.common.lockless_queue_test  libcartographer.a -lgmock_main -lpthread libcartographer_test_library.a libcartographer.a /usr/lib/libceres.so.1.14.0 -lglog -llua5.3 -lm /usr/lib64/libboost_iostreams.so.1.72.0 -lglog -lgflags -lcairo -lprotobuf -lpthread 
/usr/bin/ld: CMakeFiles/cartographer.common.lockless_queue_test.dir/cartographer/common/lockless_queue_test.cc.o: undefined reference to symbol '_ZN7testing4Test5SetUpEv'
/usr/bin/ld: /usr/lib/libgtest.so.1.10.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

$ /usr/bin/c++ -O3 -DNDEBUG -rdynamic CMakeFiles/cartographer.common.lockless_queue_test.dir/cartographer/common/lockless_queue_test.cc.o -o cartographer.common.lockless_queue_test  libcartographer.a -lgmock_main -lpthread libcartographer_test_library.a libcartographer.a /usr/lib/libceres.so.1.14.0 -lglog -llua5.3 -lm /usr/lib64/libboost_iostreams.so.1.72.0 -lglog -lgflags -lcairo -lprotobuf -lpthread -lgtest
# links successfully

kunaltyagi has a CMake solution which works for me: cartographer-project#1611 (comment)

from cartographer.

goekce avatar goekce commented on August 24, 2024

I switched to rolling and tried compiling cartographer_ros with its dependencies. I replaced ros2/cartographer with cartographer-project/cartographer but as @clalancette suggested, ros2/cartographer_ros is not compatible with cartographer-project/cartographer. (I could compile cartographer but not cartographer_ros.)

I was about to replace ros2/cartographer_ros with cartographer-project/cartographer_ros, but saw the WIP cartographer-project/cartographer_ros#1622 for rolling/galactic. I did not try it.

from cartographer.

clalancette avatar clalancette commented on August 24, 2024

This was all cleaned up in the latest stuff, so should work now (at least on Humble and Rolling). I'm going to close this out, but feel free to reopen if you are still having issues.

from cartographer.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.