ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

assimp error while installing ROS on OS X 10.8

asked 2014-04-23 19:47:00 -0500

karthik_ms gravatar image

updated 2014-04-23 22:00:19 -0500

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.

edit retag flag offensive close merge delete

Comments

Can you post the output of `brew info assimp`? Also what version of ROS are you building? Even better what version of `geometric_shapes`?

William gravatar image William  ( 2014-04-23 20:54:05 -0500 )edit

@William Edited the question as you have asked.

karthik_ms gravatar image karthik_ms  ( 2014-04-23 22:01:03 -0500 )edit

I'm getting this same error now, building Indigo on Mavericks. assimp version is 3.1.1.

mikepurvis gravatar image mikepurvis  ( 2014-08-07 09:25:07 -0500 )edit

4 Answers

Sort by » oldest newest most voted
3

answered 2014-04-24 08:53:33 -0500

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/geome... 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.

edit flag offensive delete link more

Comments

1

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.

cottsay gravatar image cottsay  ( 2014-04-24 09:06:12 -0500 )edit

Precisely as you said. I have checked it and now it compiles. Thanks for the suggestions.

karthik_ms gravatar image karthik_ms  ( 2014-04-24 09:27:44 -0500 )edit
2

answered 2015-01-30 11:10:07 -0500

Dave Coleman gravatar image

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.

edit flag offensive delete link more

Comments

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!

cottsay gravatar image cottsay  ( 2015-01-30 11:52:13 -0500 )edit

When installing indigo on Yosemite this problem still remains, and this solution worked for me.

jmainpri gravatar image jmainpri  ( 2015-11-23 15:16:12 -0500 )edit

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?

cottsay gravatar image cottsay  ( 2015-11-23 17:18:56 -0500 )edit

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.

takluyver gravatar image takluyver  ( 2016-02-10 11:47:25 -0500 )edit

@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.

kPatch gravatar image kPatch  ( 2016-03-05 20:03:50 -0500 )edit
1

answered 2014-04-24 08:15:12 -0500

William gravatar image

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

https://github.com/ros-planning/geome...

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/comm...

The related pull request for geometric_shapes:

https://github.com/ros-planning/geome...

@cottsay Do you have any insight on this?

edit flag offensive delete link more

Comments

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`

karthik_ms gravatar image karthik_ms  ( 2014-04-24 09:05:19 -0500 )edit
0

answered 2014-04-24 09:25:56 -0500

karthik_ms gravatar image

@William and @cottsay Thanks a lot for the insights. The problem seems to be solved now.

There seems to be a typo somehow at this point. The line if (NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150") appears as if( NOT ${ASSIMP_VERSION} STRLESS "2.0.1150" ) . I am not really sure why this has happened since I have not touched the CMakeLists.txt at all before you suggested. Although this does not appear in the file at https://github.com/ros-planning/geome...

find_package(ASSIMP QUIET)
if (NOT ASSIMP_FOUND)
  pkg_check_modules(ASSIMP assimp)
endif()
if (ASSIMP_FOUND)
  message ("ASSIMP_VERSION: ${ASSIMP_VERSION}")
  **if( NOT ${ASSIMP_VERSION} STRLESS "2.0.1150" )**
    add_definitions(-DASSIMP_UNIFIED_HEADER_NAMES)
    message(STATUS "Assimp version has unified headers")
  else()
    message(STATUS "Assimp version does not have unified headers")
  endif()
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-04-23 19:47:00 -0500

Seen: 2,573 times

Last updated: Jan 30 '15