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

Failure to compile on OSX, Boost error #1

Open
walchko opened this issue May 4, 2013 · 0 comments
Open

Failure to compile on OSX, Boost error #1

walchko opened this issue May 4, 2013 · 0 comments

Comments

@walchko
Copy link

walchko commented May 4, 2013

OSX 10.8.3
ROS Groovy

I had to add system to the CMakeLists.txt to get it to work:

find_package(Boost REQUIRED date_time thread system)

Here is the original error

<== Finished processing package [37 of 170]: 'qt_gui_py_common'
==> Processing catkin package: 'random_numbers'
==> Creating build directory: 'build_isolated/random_numbers'
==> Building with env: '/Users/kevin/tmp/reinstall/install_isolated/env.sh'
==> cmake /Users/kevin/tmp/reinstall/src/random_numbers -DCATKIN_DEVEL_PREFIX=/Users/kevin/tmp/reinstall/devel_isolated/random_numbers -DCMAKE_INSTALL_PREFIX=/Users/kevin/tmp/reinstall/install_isolated
-- 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
-- Using CATKIN_DEVEL_PREFIX: /Users/kevin/tmp/reinstall/devel_isolated/random_numbers
-- Using CMAKE_PREFIX_PATH: /Users/kevin/tmp/reinstall/install_isolated;/opt/ros/groovy
-- This workspace overlays: /Users/kevin/tmp/reinstall/install_isolated;/opt/ros/groovy
-- Found PythonInterp: /usr/bin/python (found version "2.7.2") 
-- Found PY_em: /Library/Python/2.7/site-packages/em.pyc  
-- Found gtest: gtests will be built
-- Using CATKIN_TEST_RESULTS_DIR: /Users/kevin/tmp/reinstall/build_isolated/random_numbers/test_results
-- catkin 0.5.65
WARNING: 'catkin' should be listed as a buildtool dependency in the package.xml (instead of build dependency)
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   date_time
--   thread
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kevin/tmp/reinstall/build_isolated/random_numbers
==> make -j2 -l2 in '/Users/kevin/tmp/reinstall/build_isolated/random_numbers'
Scanning dependencies of target random_numbers
[100%] Building CXX object CMakeFiles/random_numbers.dir/src/random_numbers.cpp.o
Linking CXX shared library /Users/kevin/tmp/reinstall/devel_isolated/random_numbers/lib/librandom_numbers.dylib
Undefined symbols for architecture x86_64:
  "boost::system::system_category()", referenced from:
      ___cxx_global_var_init3 in random_numbers.cpp.o
      boost::thread_exception::thread_exception(int, char const*) in random_numbers.cpp.o
  "boost::system::generic_category()", referenced from:
      ___cxx_global_var_init1 in random_numbers.cpp.o
      ___cxx_global_var_init2 in random_numbers.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/kevin/tmp/reinstall/devel_isolated/random_numbers/lib/librandom_numbers.dylib] Error 1
make[1]: *** [CMakeFiles/random_numbers.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "./src/catkin/bin/../python/catkin/builder.py", line 658, in build_workspace_isolated
    number=index + 1, of=len(ordered_packages)
  File "./src/catkin/bin/../python/catkin/builder.py", line 443, in build_package
    install, jobs, force_cmake, quiet, last_env, cmake_args, make_args
  File "./src/catkin/bin/../python/catkin/builder.py", line 297, in build_catkin_package
    run_command(make_cmd, build_dir, quiet)
  File "./src/catkin/bin/../python/catkin/builder.py", line 186, in run_command
    raise subprocess.CalledProcessError(proc.returncode, ' '.join(cmd))
CalledProcessError: Command '/Users/kevin/tmp/reinstall/install_isolated/env.sh make -j2 -l2' returned non-zero exit status 2
<== Failed to process package 'random_numbers': 
  Command '/Users/kevin/tmp/reinstall/install_isolated/env.sh make -j2 -l2' returned non-zero exit status 2

Reproduce this error by running:
==> /Users/kevin/tmp/reinstall/install_isolated/env.sh make -j2 -l2

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

No branches or pull requests

1 participant