Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rviz_plugin_tutorials fails to compile on OS X #3

Closed
wjwwood opened this issue Mar 12, 2013 · 6 comments
Closed

rviz_plugin_tutorials fails to compile on OS X #3

wjwwood opened this issue Mar 12, 2013 · 6 comments
Labels
Milestone

Comments

@wjwwood
Copy link
Member

wjwwood commented Mar 12, 2013

See:

http://answers.ros.org/question/56553/rosmake-fails-on-os-x/
http://pastie.org/pastes/6368348/text

The failure:

{-------------------------------------------------------------------------------
  -- Looking for Q_WS_MAC
  -- Looking for Q_WS_MAC - found
  -- Looking for QT_MAC_USE_COCOA
  -- Looking for QT_MAC_USE_COCOA - found
  -- Found Qt4: /usr/local/bin/qmake (found version "4.8.4") 
  [rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_drive_widget.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
  [rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_imu_display.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
  [rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_plant_flag_tool.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
  [rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_teleop_panel.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build
  cd build && make -j -l8
  Scanning dependencies of target rospack_genmsg_libexe
  [  0%] Built target rospack_genmsg_libexe
  Scanning dependencies of target rosbuild_precompile
  [  0%] Built target rosbuild_precompile
  [  7%] Generating src/moc_teleop_panel.cxx
  [ 15%] Generating src/moc_plant_flag_tool.cxx
  [ 23%] Generating src/moc_imu_display.cxx
  [ 30%] Generating src/moc_drive_widget.cxx
  Scanning dependencies of target rviz_plugin_tutorials
  [ 38%] Building CXX object CMakeFiles/rviz_plugin_tutorials.dir/src/drive_widget.cpp.o
  /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:113:23: error: variable length array of non-POD element type 'QPointF'
      QPointF left_track[ step_count ];
                        ^
  /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:114:24: error: variable length array of non-POD element type 'QPointF'
      QPointF right_track[ step_count ];
                         ^
  In file included from /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:34:
  In file included from /usr/local/Cellar/qt/4.8.4/include/QtGui/QMouseEvent:1:
  In file included from /usr/local/Cellar/qt/4.8.4/include/QtGui/qevent.h:52:
  /usr/local/Cellar/qt/4.8.4/include/QtGui/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field]
      char type;
           ^
  1 warning and 2 errors generated.
  make[3]: *** [CMakeFiles/rviz_plugin_tutorials.dir/src/drive_widget.cpp.o] Error 1
  make[2]: *** [CMakeFiles/rviz_plugin_tutorials.dir/all] Error 2
  make[1]: *** [all] Error 2
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package rviz_plugin_tutorials written to:
[ rosmake ]    /Users/alex/.ros/rosmake/rosmake_output-20130302-173409/rviz_plugin_tutorials/build_output.log
[rosmake-3] Finished <<< rviz_plugin_tutorials [FAIL] [ 25.69 seconds ]

I do not have the full error log, but perhaps someone could update the ticket with that.

@alexreg
Copy link

alexreg commented Mar 13, 2013

Surely you've just linked to the full error log (which I posted on answers.ros.org) in that very post? i.e. http://pastie.org/pastes/6368348/text

@wjwwood
Copy link
Member Author

wjwwood commented Mar 13, 2013

@alexreg Most of the relavent error is in my link, but rosmake truncates errors, you would need to post the full build log from the log file which rosmake references.

@wjwwood
Copy link
Member Author

wjwwood commented Mar 13, 2013

See:

[ rosmake ] Output from build of package rviz_plugin_tutorials written to:
[ rosmake ]    /Users/alex/.ros/rosmake/rosmake_output-20130302-173409/rviz_plugin_tutorials/build_output.log

@alexreg
Copy link

alexreg commented Mar 13, 2013

Okay, here's the contents of rviz_plugin_tutorials/build_output.log.

mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake  ..
-- The C compiler identification is Clang 4.2.0
-- The CXX compiler identification is Clang 4.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.2") 
[rosbuild] Building package rviz_plugin_tutorials
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
-- Using CATKIN_DEVEL_PREFIX: /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found PY_em: /usr/local/lib/python2.7/site-packages/em.pyc  
-- Found gtest: gtests will be built
-- catkin 0.5.63
[rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /usr/local/bin/qmake (found version "4.8.4") 
[rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_drive_widget.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
[rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_imu_display.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
[rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_plant_flag_tool.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
[rosbuild] Couldn't find source file /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build/src/moc_teleop_panel.cxx; assuming that it is in /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials and will be generated later
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/build
cd build && make -j -l8
Scanning dependencies of target rospack_genmsg_libexe
[  0%] Built target rospack_genmsg_libexe
Scanning dependencies of target rosbuild_precompile
[  0%] Built target rosbuild_precompile
[  7%] Generating src/moc_teleop_panel.cxx
[ 15%] Generating src/moc_plant_flag_tool.cxx
[ 23%] Generating src/moc_imu_display.cxx
[ 30%] Generating src/moc_drive_widget.cxx
Scanning dependencies of target rviz_plugin_tutorials
[ 38%] Building CXX object CMakeFiles/rviz_plugin_tutorials.dir/src/drive_widget.cpp.o
/Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:113:23: error: variable length array of non-POD element type 'QPointF'
    QPointF left_track[ step_count ];
                      ^
/Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:114:24: error: variable length array of non-POD element type 'QPointF'
    QPointF right_track[ step_count ];
                       ^
In file included from /Users/alex/ros_ws/visualization_tutorials/rviz_plugin_tutorials/src/drive_widget.cpp:34:
In file included from /usr/local/Cellar/qt/4.8.4/include/QtGui/QMouseEvent:1:
In file included from /usr/local/Cellar/qt/4.8.4/include/QtGui/qevent.h:52:
/usr/local/Cellar/qt/4.8.4/include/QtGui/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field]
    char type;
         ^
1 warning and 2 errors generated.
make[3]: *** [CMakeFiles/rviz_plugin_tutorials.dir/src/drive_widget.cpp.o] Error 1
make[2]: *** [CMakeFiles/rviz_plugin_tutorials.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
 

@dgossow
Copy link
Member

dgossow commented Mar 13, 2013

This uses a non-standard C++ extension that clang doesn't support (a variable-length array of QPoint, which is a class). You can fix this by using a vector or making step_count a constant expression.

@alexreg
Copy link

alexreg commented Mar 13, 2013

Ah right. Thanks for that! Hopefully this can be fixed soon. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants