0
$\begingroup$

Rosanswers logo

While trying to install ROS on OS X 10.8, with XCode 5.0.2, the package geometric_shapes is unable to build. It give the following error.

==> Processing catkin package: 'geometric_shapes'
==> Building with env: '/Users/Siva/ros_catkin_ws/install_isolated/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/Users/Siva/ros_catkin_ws/build_isolated/geometric_shapes'
==> make -j4 -l4 in '/Users/Siva/ros_catkin_ws/build_isolated/geometric_shapes'
[ 20%] Building CXX object CMakeFiles/geometric_shapes.dir/src/mesh_operations.cpp.o
/Users/Siva/ros_catkin_ws/src/geometric_shapes/src/mesh_operations.cpp:54:10: fatal error: 'assimp/aiScene.h' file not found
#include <assimp/aiScene.h>
         ^
1 error generated.
make[2]: *** [CMakeFiles/geometric_shapes.dir/src/mesh_operations.cpp.o] Error 1
make[1]: *** [CMakeFiles/geometric_shapes.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'geometric_shapes': 
  Command '/Users/Siva/ros_catkin_ws/install_isolated/env.sh make -j4 -l4' returned non-zero exit status 2

I have installed assimp in my machine through

brew install assimp

Output of brew info assimp

assimp: stable 3.0.1270, HEAD
http://assimp.sourceforge.net/
/usr/local/Cellar/assimp/3.0.1270 (52 files, 8.0M) *
  Built from source
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/assimp.rb
==> Dependencies
Build: cmake ✔
Required: boost ✔

Geometric_shapes version as specified in hydro-desktop-full-wet.rosinstall :

local-name: geometric_shapes
    uri: https://github.com/ros-gbp/geometric_shapes-release/archive/release/hydro/geometric_shapes/0.3.6-0.tar.gz
    version: geometric_shapes-release-release-hydro-geometric_shapes-0.3.6-0

I am trying to build Hydro on OS X 10.8 with XCode 5.0.2

But even then the error persists. I am not sure on how to proceed, Kindly help.


Originally posted by karthik_ms on ROS Answers with karma: 71 on 2014-04-23

Post score: 1


Original comments

Comment by William on 2014-04-23:
Can you post the output of brew info assimp? Also what version of ROS are you building? Even better what version of geometric_shapes?

Comment by karthik_ms on 2014-04-23:
@william Edited the question as you have asked.

Comment by mikepurvis on 2014-08-07:
I'm getting this same error now, building Indigo on Mavericks. assimp version is 3.1.1.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Thanks for bringing this to my attention, @william.

3.0.1270 is certainly newer than 2.0.1150, which is when the change happened. For some reason the version detection at https://github.com/ros-planning/geometric_shapes/blob/hydro-devel/CMakeLists.txt#L18 is not working.

I know nothing about OSX, but there must be some sort of pkgconfig file that is SUPPOSED to be setting the version number. I think the easiest way to find out what version the system is reporting is to add the following command between if (ASSIMP_FOUND) and if (NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150"):

message ("ASSIMP_VERSION: ${ASSIMP_VERSION}")

in the CMakeLists.txt for geometric_shapes. Re-run the build (which will still fail) but let me know what cmake outputs after ASSIMP_VERSION:. If you can find it, It might also be helpful to see the assimp.pc file that was installed by the system.


Originally posted by cottsay with karma: 311 on 2014-04-24

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by cottsay on 2014-04-24:
Ah! I think I just spotted it. You're using an outdated version of geometric-shapes! Try either upgrading or applying https://github.com/ros-planning/geometric_shapes/commit/410cdb4058075c6fd5e3c525270d8e8fb2b62c0f to your machine. geometric_shapes 0.3.8 is the current version.

Comment by karthik_ms on 2014-04-24:
Precisely as you said. I have checked it and now it compiles. Thanks for the suggestions.

$\endgroup$
0
$\begingroup$

Rosanswers logo

It looks like ASSIMP_UNIFIED_HEADER_NAMES is not getting set correctly, see:

https://github.com/ros-planning/geometric_shapes/blob/0422a14931b14bbfa6daecde30aed82ec188bc2b/src/mesh_operations.cpp#L49-57

The include line should be #include <assimp/scene.h> not #include <assimp/aiScene.h> for your version of assimp.

Relevant assimp change:

https://github.com/assimp/assimp/commit/6fa251c2f2e7a142bb861227dce0c26362927fbc

The related pull request for geometric_shapes:

https://github.com/ros-planning/geometric_shapes/pull/14

@cottsay Do you have any insight on this?


Originally posted by William with karma: 17335 on 2014-04-24

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by karthik_ms on 2014-04-24:
I am sorry but I am not completely familiar with GIT yet. I am still learning. How do I execute the changes you suggested. Do I just have to download the geometric_shapes package now again ? Or would you suggest me to install the older version of assimp

$\endgroup$
0
$\begingroup$

Rosanswers logo

This is still causing an issue on OSX Yosemite - I don't know why the CMakeLists isn't correctly evaluating if (NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150")

As a hack, I just forced on the ASSIMP_UNIFIED_HEADER_NAMES definition and the package built. I did this by moving the add_definitions(-DASSIMP_UNIFIED_HEADER_NAMES) line outside the if statement.


Originally posted by Dave Coleman with karma: 1396 on 2015-01-30

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by cottsay on 2015-01-30:
As I mentioned above, can you try extracting the ${ASSIMP_VERSION} from the CMakeLists.txt and/or post the contents of assimp.pc? Also, please post the geometric_shapes version you have installed. Thanks!

Comment by jmainpri on 2015-11-23:
When installing indigo on Yosemite this problem still remains, and this solution worked for me.

Comment by cottsay on 2015-11-23:
As I mentioned above, could you please add message ("ASSIMP_VERSION: ${ASSIMP_VERSION}") to your CMakeLists.txt, run it, and post the results, and also post the contents of assimp.pc so we can debug this issue?

Comment by takluyver on 2016-02-10:
I had a similar issue installing indigo on Fedora. I tried putting in the message (just after if (ASSIMP_FOUND)) to see what version it was seeing, and then it started working, after failing several times without that. Don't know how that makes any sense. assimp v 3.1.1, according to dnf.

Comment by kPatch on 2016-03-05:
@takluyver - The same occurred with my build. I made some spacing changes to the CMakeFile, saved it, reverted it, saved it, and then it built without any errors. But, two tries before doing so I executed the following command: brew reinstall --build-from-source assimp. I'm running Yosemite.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.