Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Set install path for libmxnet.so dynamic lib on Mac OS #13629

Merged
merged 1 commit into from
Dec 13, 2018

Conversation

yuxihu
Copy link
Member

@yuxihu yuxihu commented Dec 12, 2018

Add a linker flag in Makefile to set the install path for libmxnet.so dynamic library on Mac OS. With this change, any clients linked against libmxnet.so will automatically record the path as the way dyld should locate it on Mac OS. One use case for this is to run Horovod with MXNet on Mac OS without changing the install path for libmxnet manually after installing Horovod.

@yuxihu yuxihu requested a review from szha as a code owner December 12, 2018 23:29
@yuxihu
Copy link
Member Author

yuxihu commented Dec 12, 2018

@apeforest @anirudh2290 Please take a look

@yuxihu
Copy link
Member Author

yuxihu commented Dec 12, 2018

@mxnet-label-bot update [pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Dec 12, 2018
Copy link
Contributor

@apeforest apeforest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apeforest
Copy link
Contributor

@mxnet-label-bot update [pr-awaiting-merge]

@marcoabreu marcoabreu added pr-awaiting-merge Review and CI is complete. Ready to Merge and removed pr-awaiting-review PR is waiting for code review labels Dec 13, 2018
@anirudh2290 anirudh2290 merged commit 5d2b763 into apache:master Dec 13, 2018
zhaoyao73 added a commit to zhaoyao73/incubator-mxnet that referenced this pull request Dec 13, 2018
* upstream/master: (38 commits)
  Feature/mkldnn static (apache#13628)
  Fix the bug of BidirectionalCell (apache#13575)
  Set install path for libmxnet.so dynamic lib on Mac OS (apache#13629)
  add batch norm test (apache#13625)
  Scripts for building dependency libraries of MXNet (apache#13282)
  fix quantize pass error when the quantization supported Op are excluded in the model (apache#13596)
  Optimize C++ API (apache#13496)
  Fix warning in waitall doc (apache#13618)
  [MXNET-1225] Always use config.mk in make install instructions (apache#13364)
  [MXNET-1224]: improve scala maven jni build and packing. (apache#13493)
  [MXNET-1155] Add scala packageTest utility (apache#13046)
  fix the Float not showing correctly problem (apache#13617)
  apache#13385 [Clojure] - Turn examples into integration tests (apache#13554)
  Add Intel MKL blas to Jenkins (apache#13607)
  Revert "[MXNET-1198] MXNet Java API (apache#13162)"
  Reducing the length of setup tutorial (apache#13306)
  [MXNET-1182] Predictor example (apache#13237)
  [MXNET-1187] Added Java SSD Inference Tutorial for website (apache#13201)
  add defaults and clean up the tests (apache#13295)
  [MXNET-1181] Added command line alternative to IntelliJ in install instructions (apache#13267)
  ...
@lanking520
Copy link
Member

lanking520 commented Dec 14, 2018

This crash the Scala build

[update with my tests...]

otool -L libmxnet.so 
libmxnet.so:
	@rpath/libmxnet.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/usr/local/opt/openblas/lib/libopenblas_haswellp-r0.3.3.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/opencv/lib/libopencv_stitching.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_superres.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_videostab.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_aruco.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_bgsegm.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_bioinspired.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_ccalib.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_dnn_objdetect.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_dpm.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_face.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_photo.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_fuzzy.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_hfs.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_img_hash.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_line_descriptor.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_optflow.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_reg.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_rgbd.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_saliency.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_stereo.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_structured_light.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_phase_unwrapping.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_surface_matching.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_tracking.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_datasets.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_dnn.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_plot.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_xfeatures2d.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_shape.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_video.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_ml.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_ximgproc.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_calib3d.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_features2d.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_highgui.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_videoio.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_flann.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_xobjdetect.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_imgcodecs.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_objdetect.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_xphoto.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_imgproc.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/local/opt/opencv/lib/libopencv_core.3.4.dylib (compatibility version 3.4.0, current version 3.4.3)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)

Scala issue

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/qingla/Documents/GitHub/incubator-mxnet/scala-package/init-native/target/libmxnet-init-scala.jnilib: dlopen(/Users/qingla/Documents/GitHub/incubator-mxnet/scala-package/init-native/target/libmxnet-init-scala.jnilib, 1): Library not loaded: @rpath/libmxnet.so
  Referenced from: /Users/qingla/Documents/GitHub/incubator-mxnet/scala-package/init-native/target/libmxnet-init-scala.jnilib
  Reason: image not found

@lanking520
Copy link
Member

step to reproduce:

make -j$(nprocs) USE_BLAS=openblas
make scalapkg

@yuxihu
Copy link
Member Author

yuxihu commented Dec 14, 2018

@lanking520 let's discuss offline.

@yuxihu yuxihu deleted the mx_mac_install branch January 9, 2019 18:21
piyushghai pushed a commit to piyushghai/incubator-mxnet that referenced this pull request Feb 28, 2019
lanking520 pushed a commit to lanking520/incubator-mxnet that referenced this pull request Apr 26, 2019
lanking520 pushed a commit to lanking520/incubator-mxnet that referenced this pull request Apr 30, 2019
zachgk pushed a commit to zachgk/incubator-mxnet that referenced this pull request May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-merge Review and CI is complete. Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants