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

runtime error on mac: can't find ignition #78

Closed
RussTedrake opened this issue Jan 10, 2018 · 12 comments
Closed

runtime error on mac: can't find ignition #78

RussTedrake opened this issue Jan 10, 2018 · 12 comments

Comments

@RussTedrake
Copy link
Contributor

testing with the drake_cmake_installed workflow on mac. it almost works. is this something simple?

russt$ src/simple_continuous_time_system/simple_continuous_time_system
dyld: Symbol not found: __ZN8ignition4math5Angle4ZeroE
  Referenced from: /Users/russt/drake-build/install/lib/libdrake.so
  Expected in: /Users/russt/drake-build/install/lib/liblcm.so
 in /Users/russt/drake-build/install/lib/libdrake.so
Abort trap: 6
@jwnimmer-tri
Copy link
Contributor

RobotLocomotion/drake#7622 was recent, so possibly that disturbed something. According to that PR, it should be trying to link / load / use libignition_math.so to provide that symbol, I believe.

I don't think we have Shambhala CI for macOS though, and I'm not sure how many people have tried it recently (consuming Drake as a dependency via CMake on macOS).

@RussTedrake
Copy link
Contributor Author

confirming that the libignition_math.so exists, but it is not listed as a dependency of libdrake.so

russs-air:lib russt$ otool -L libdrake.so
libdrake.so:
	@rpath/libdrake.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/protobuf/lib/libprotobuf.15.dylib (compatibility version 16.0.0, current version 16.1.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/tinyxml2/lib/libtinyxml2.6.dylib (compatibility version 6.0.0, current version 6.0.0)
	/usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 5401.0.0, current version 5401.3.0)
	/usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1450.15.0)
	/usr/local/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.9.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 158.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1450.15.0)
	/usr/local/opt/dreal/lib/libdreal.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/ibex/lib/libibex.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/clp/lib/libClpSolver.1.dylib (compatibility version 15.0.0, current version 15.11.0)
	/usr/local/opt/clp/lib/libClp.1.dylib (compatibility version 15.0.0, current version 15.11.0)
	/usr/local/opt/coinutils/lib/libCoinUtils.3.dylib (compatibility version 14.0.0, current version 14.14.0)
	/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
	/usr/local/opt/ipopt/lib/libipopt.1.dylib (compatibility version 12.0.0, current version 12.8.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/nlopt/lib/libnlopt_cxx.0.dylib (compatibility version 9.0.0, current version 9.2.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersSources-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersGeneral-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonComputationalGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOLegacy-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/lz4/lib/liblz4.1.dylib (compatibility version 1.0.0, current version 1.8.0)
	/usr/local/opt/[email protected]/lib/libvtkIOImage-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkDICOMParser-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkmetaio-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/libpng/lib/libpng16.16.dylib (compatibility version 51.0.0, current version 51.0.0)
	/usr/local/opt/[email protected]/lib/libvtkRenderingOpenGL2-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkRenderingCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonColor-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonExecutionModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonDataModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonSystem-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonTransforms-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonMisc-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonMath-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtksys-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/glew/lib/libGLEW.2.1.dylib (compatibility version 2.1.0, current version 2.1.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
russs-air:lib russt$ ls
cmake					libfmt.so				liboctomath.a
libBulletCollision.so			libignition_math.so			liboctomath.so
libLinearMath.so			libignition_rndf.a			libscsdir.so
libPythonQt.dylib			libignition_rndf.so			libsdformat.a
libccd.a				liblcm.so				libsdformat.so
libccd.so				liblcmtypes_bot2_core_c.a		libtinyobjloader.a
libddApp.dylib				liblcmtypes_bot2_core_c.so		libtinyobjloader.so
libdrake.so				liblcmtypes_robotlocomotion_c.a		libyaml_cpp.a
libfcl.a				liblcmtypes_robotlocomotion_c.so	libyaml_cpp.so
libfcl.so				liboctomap.a				python2.7
libfmt.a				liboctomap.so
russs-air:lib russt$

@jamiesnape
Copy link
Contributor

I will look into it momentarily. I run Mac builds locally.

@jamiesnape
Copy link
Contributor

$ curl -LO https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-mac.tar.gz
$ tar -xf drake-latest-mac.tar.gz
$ otool -L drake/lib/libdrake.so
drake/lib/libdrake.so:
	@rpath/libdrake.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/libignition_math.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/libBulletCollision.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/libLinearMath.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/libscsdir.so (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/liblcm.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/protobuf/lib/libprotobuf.15.dylib (compatibility version 16.0.0, current version 16.1.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/yaml-cpp/lib/libyaml-cpp.0.5.dylib (compatibility version 0.5.0, current version 0.5.3)
	/usr/local/opt/tinyxml2/lib/libtinyxml2.6.dylib (compatibility version 6.0.0, current version 6.0.0)
	/usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 5401.0.0, current version 5401.3.0)
	/usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1450.16.0)
	/usr/local/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.9.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 158.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1450.16.0)
	/usr/local/opt/dreal/lib/libdreal.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/ibex/lib/libibex.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/clp/lib/libClpSolver.1.dylib (compatibility version 15.0.0, current version 15.11.0)
	/usr/local/opt/clp/lib/libClp.1.dylib (compatibility version 15.0.0, current version 15.11.0)
	/usr/local/opt/coinutils/lib/libCoinUtils.3.dylib (compatibility version 14.0.0, current version 14.14.0)
	/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
	/usr/local/opt/ipopt/lib/libipopt.1.dylib (compatibility version 12.0.0, current version 12.8.0)
	/usr/local/opt/[email protected]/lib/libdmumps.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/[email protected]/lib/libmpiseq.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/[email protected]/lib/libmumps_common.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/[email protected]/lib/libpord.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/nlopt/lib/libnlopt_cxx.0.dylib (compatibility version 9.0.0, current version 9.2.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersSources-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersGeneral-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonComputationalGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOLegacy-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkIOCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/lz4/lib/liblz4.1.dylib (compatibility version 1.0.0, current version 1.8.0)
	/usr/local/opt/[email protected]/lib/libvtkIOImage-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkDICOMParser-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkmetaio-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/X11/lib/libpng16.16.dylib (compatibility version 43.0.0, current version 43.0.0)
	/usr/local/opt/[email protected]/lib/libvtkRenderingOpenGL2-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkRenderingCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonColor-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkFiltersGeometry-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonExecutionModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonDataModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonSystem-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonTransforms-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonMisc-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonMath-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtkCommonCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/[email protected]/lib/libvtksys-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/glew/lib/libGLEW.2.1.dylib (compatibility version 2.1.0, current version 2.1.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)

Can you try the latest nightly package?

@jamiesnape
Copy link
Contributor

I think this has something to do with the Bazel version, but still trying to work out what changed and when.

@RussTedrake
Copy link
Contributor Author

fwiw, it looks like homebrew bumped it's bazel version last week (so I got 0.9):

russs-air:mac russt$ brew info bazel
bazel: stable 0.9.0 (bottled)
Google's own build tool
https://bazel.build/
/usr/local/Cellar/bazel/0.9.0 (12 files, 93.2MB) *
  Poured from bottle on 2018-01-06 at 06:24:55
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/bazel.rb
==> Requirements
Required: java = 1.8 ✔, macOS >= 10.10 ✔
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

@jamiesnape
Copy link
Contributor

jamiesnape commented Jan 12, 2018

I think the problem is an unreported bug in Bazel (not sure when it was introduced yet) that will be fixed in either 0.9.1 or 0.10.0 that relates to the toolchain (it is fixed in master). Our custom toolchain has diverged (and in fact was taken from the one that Bazel uses to build itself rather than what it uses to build other projects) from the one used by Bazel by default, which I will remedy later.

@RussTedrake
Copy link
Contributor Author

I've installed [email protected] (which has 0.6.1) and inserted it in my path, run bazel clean in drake, then make clean; make in drake-build, and make clean; make in shambhala/drake_cmake_installed/build. But I still get the same error.

Russs-MacBook-Air:build russt$ ./src/simple_continuous_time_system/simple_continuous_time_system
dyld: Symbol not found: __ZN8ignition4math5Angle4ZeroE
  Referenced from: /Users/russt/drake-build/install/lib/libdrake.so
  Expected in: /Users/russt/drake-build/install/lib/liblcm.so
 in /Users/russt/drake-build/install/lib/libdrake.so
Abort trap: 6
Russs-MacBook-Air:build russt$ bazel version
Build label: 0.6.1-homebrew
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Jan 10 21:28:05 2018 (1515619685)
Build timestamp: 1515619685
Build timestamp as int: 1515619685

@jamiesnape
Copy link
Contributor

I can reproduce this now with an up-to-date custom toolchain, so I know exactly the breakage. Just iterating through Bazel versions to find if one is not broken.

@jamiesnape
Copy link
Contributor

Not good news so far looking for a stable version. About to build the release-0.10.0 branch, which looks promising.

@jamiesnape
Copy link
Contributor

Until Bazel 0.10.0 is out, the workaround is:

brew tap robotlocomotion/director
brew install [email protected]
export PATH=/usr/local/opt/[email protected]/bin:$PATH

@jamiesnape
Copy link
Contributor

Now that 0.10.0+ is out, I think we can mark this resolved.

@jamiesnape jamiesnape removed their assignment Jun 22, 2021
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

3 participants