{"action":"created","issue":{"url":"https://api.github.com/repos/dartsim/dart/issues/1113","repository_url":"https://api.github.com/repos/dartsim/dart","labels_url":"https://api.github.com/repos/dartsim/dart/issues/1113/labels{/name}","comments_url":"https://api.github.com/repos/dartsim/dart/issues/1113/comments","events_url":"https://api.github.com/repos/dartsim/dart/issues/1113/events","html_url":"https://github.com/dartsim/dart/issues/1113","id":361865233,"node_id":"MDU6SXNzdWUzNjE4NjUyMzM=","number":1113,"title":"Error Building DART 6.6 with Octomaps","user":{"login":"kamatajinkya","id":5405377,"node_id":"MDQ6VXNlcjU0MDUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/5405377?v=4","gravatar_id":"","url":"https://api.github.com/users/kamatajinkya","html_url":"https://github.com/kamatajinkya","followers_url":"https://api.github.com/users/kamatajinkya/followers","following_url":"https://api.github.com/users/kamatajinkya/following{/other_user}","gists_url":"https://api.github.com/users/kamatajinkya/gists{/gist_id}","starred_url":"https://api.github.com/users/kamatajinkya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamatajinkya/subscriptions","organizations_url":"https://api.github.com/users/kamatajinkya/orgs","repos_url":"https://api.github.com/users/kamatajinkya/repos","events_url":"https://api.github.com/users/kamatajinkya/events{/privacy}","received_events_url":"https://api.github.com/users/kamatajinkya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T18:09:27Z","updated_at":"2018-09-21T03:14:47Z","closed_at":null,"author_association":"NONE","body":"DART version: 6.6.1\r\nOS: Ubuntu 14.04\r\nComplier: GNU 4.8.4\r\n\r\nDART fails to build with the following error.\r\n```\r\nCMakeFiles/dart.dir/dynamics/VoxelGridShape.cpp.o: In function `dart::dynamics::VoxelGridShape::VoxelGridShape(double)':\r\nVoxelGridShape.cpp:(.text+0xa97): undefined reference to `octomap::OcTree::OcTree(double)'\r\nCMakeFiles/dart.dir/dynamics/VoxelGridShape.cpp.o: In function `dart::dynamics::VoxelGridShape::VoxelGridShape(double)':\r\nVoxelGridShape.cpp:(.text+0xc9c): undefined reference to `octomap::OcTree::OcTree(double)'\r\nCMakeFiles/dart.dir/dynamics/VoxelGridShape.cpp.o: In function `dart::dynamics::VoxelGridShape::VoxelGridShape(std::shared_ptr<octomap::OcTree>)':\r\nVoxelGridShape.cpp:(.text+0xf7b): undefined reference to `octomap::OcTree::OcTree(double)'\r\nCMakeFiles/dart.dir/dynamics/VoxelGridShape.cpp.o: In function `dart::dynamics::VoxelGridShape::VoxelGridShape(std::shared_ptr<octomap::OcTree>)':\r\nVoxelGridShape.cpp:(.text+0x1333): undefined reference to `octomap::OcTree::OcTree(double)'\r\ncollect2: error: ld returned 1 exit status\r\nmake[2]: *** [lib/libdart.so.6.6.1] Error 1\r\nmake[1]: *** [dart/CMakeFiles/dart.dir/all] Error 2\r\nmake: *** [all] Error 2\r\n```\r\n#### Steps to Reproduce\r\n\r\n1. Clone dart\r\n2. Create and open build directory\r\n3. Run cmake and make\r\n\r\nTerminal was sourced with ROS Indigo setup. octomap_ros was installed on machine. The build does not fail if octomap_ros is not installed."},"comment":{"url":"https://api.github.com/repos/dartsim/dart/issues/comments/423400519","html_url":"https://github.com/dartsim/dart/issues/1113#issuecomment-423400519","issue_url":"https://api.github.com/repos/dartsim/dart/issues/1113","id":423400519,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzQwMDUxOQ==","user":{"login":"mxgrey","id":1307217,"node_id":"MDQ6VXNlcjEzMDcyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1307217?v=4","gravatar_id":"","url":"https://api.github.com/users/mxgrey","html_url":"https://github.com/mxgrey","followers_url":"https://api.github.com/users/mxgrey/followers","following_url":"https://api.github.com/users/mxgrey/following{/other_user}","gists_url":"https://api.github.com/users/mxgrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mxgrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxgrey/subscriptions","organizations_url":"https://api.github.com/users/mxgrey/orgs","repos_url":"https://api.github.com/users/mxgrey/repos","events_url":"https://api.github.com/users/mxgrey/events{/privacy}","received_events_url":"https://api.github.com/users/mxgrey/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T03:14:47Z","updated_at":"2018-09-21T03:14:47Z","author_association":"MEMBER","body":"Thanks for the report.\r\n\r\nIt looks like between octree version [1.6.4](https://github.com/OctoMap/octomap/blob/v1.6.4/octomap/include/octomap/OcTree.h) and [1.7.1](https://github.com/OctoMap/octomap/blob/v1.7.1/octomap/include/octomap/OcTree.h), the definition of the `OcTree(double)` constructor went from being inlined to being a symbol exported by the library.\r\n\r\nIt looks like the ROS-installed [octomap](http://wiki.ros.org/octomap) uses v1.6.4 for the Indigo release, where the definition of the constructor is inlined. Hypothetically, if you have a newer version of Octomap installed on your system, then it's possible that the compiler is choosing to use the system-installed headers (which will simply be in `/usr/include`) while linking against the octomap library that is shipped with ROS-Indigo. If your system-installed version of Octomap is version 1.7.1 or later, then the header will not contain the constructor definition, but the ROS-Indigo octomap library will *also* not contain the constructor definition, resulting in an undefined reference.\r\n\r\nMy recommendation is to not have ROS Indigo sourced while trying to build DART.\r\n\r\nAlthough since octomap doesn't version its ABI, if you need to use DART in a ROS node which also depends on the ROS-Indigo octomap, then the symbols of the two different library versions could collide and result in undesirable behavior (which may include crashing the node). In that situation, I would recommend uninstalling octomap from your system (probably using `sudo apt remove liboctomap-dev`) and rely solely on the version of octomap distributed with ROS-Indigo (in which case, you'll *need* to have ROS-Indigo sourced when you build DART).\r\n\r\nLet me know if anything about my guesses are wrong (e.g. if you don't have a different version of Octomap installed on your system)."}}
{"actor":{"display_login":"mxgrey"}}