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

Installed binaries are broken on macOS #1040

Closed
keichi opened this issue Dec 6, 2018 · 11 comments
Closed

Installed binaries are broken on macOS #1040

keichi opened this issue Dec 6, 2018 · 11 comments

Comments

@keichi
Copy link
Contributor

keichi commented Dec 6, 2018

Installed binaries fail to find the ADIOS library. Binaries under the build directory do work. Might be related to #348?

ADIOS2 build configuration:
  ADIOS Version: 2.2.0
  C++ Compiler : AppleClang 10.0.0.10001145
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

  Fortran Compiler : GNU 8.2.0
    /usr/local/bin/gfortran

  Installation prefix: /usr/local
        bin: bin
        lib: lib
    include: include
      cmake: lib/cmake/adios2
     python: lib/python3.7/site-packages

  Features:
    Library Type: shared
    Build Type:   Release
    Testing: ON
    Build Options:
      BZip2    : ON
      ZFP      : ON
      SZ       : ON
      MGARD    : OFF
      MPI      : ON
      DataMan  : ON
      SST      : ON
      ZeroMQ   : ON
      HDF5     : OFF
      Python   : ON
      Fortran  : ON
      SysVShMem: ON
      Endian_Reverse: OFF
$ bpls
dyld: Library not loaded: @rpath/libadios2.2.dylib
  Referenced from: /usr/local/bin/bpls
  Reason: image not found
Abort trap: 6
@williamfgc
Copy link
Contributor

@keichi is the same issue, after install make sure adios2-install/lib is in DYLD_LIBRARY_PATH on Mac

@keichi
Copy link
Contributor Author

keichi commented Dec 6, 2018

It does work if I set DYLD_LIBRARY_PATH, but I've installed ADIOS under /usr/local. Why do I need to set DYLD_LIBRARY_PATH?

@williamfgc
Copy link
Contributor

I am not familiar with Xcode ld on Mac, but this link might help: https://stackoverflow.com/questions/27314733/make-usr-local-lib-a-default-library-search-path-for-ld-on-mac-os-x

@keichi
Copy link
Contributor Author

keichi commented Dec 6, 2018

All the binaries under /usr/local/bin that I've installed using Homebrew run fine without changing any environment variable. I think ADIOS2 should also work out of the box.

@williamfgc
Copy link
Contributor

If libadios2.dylib is in a reachable ld location it should work. Is /usr/local/lib always reachable by ld? What does otool - L bpls tell you?

@keichi
Copy link
Contributor Author

keichi commented Dec 6, 2018

/usr/local/bin/bpls:
	@rpath/libadios2.2.dylib (compatibility version 2.0.0, current version 2.2.0)
	/Users/keichi/.spack/opt/spack/darwin-mojave-x86_64/clang-10.0.0-apple/openmpi-3.1.3-6owrpmticip3filnaljkrsyl3zlonwea/lib/libmpi.40.dylib (compatibility version 51.0.0, current version 51.3.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)

@keichi
Copy link
Contributor Author

keichi commented Dec 6, 2018

The linker does find the libraries under /usr/local/lib since mpic++ -std=c++11 -ladios2 foo.cpp succeeds.

@williamfgc
Copy link
Contributor

@keichi Does ./bin/adios-reorganize have the same problem?

@keichi
Copy link
Contributor Author

keichi commented Dec 6, 2018

@williamfgc Yes, it does. Same with adios_iotest.

@williamfgc
Copy link
Contributor

@keichi, thanks. @chuckatkins how can we strip @rpath from the installed libraries as in #348 ?

@chuckatkins
Copy link
Contributor

Fixed in current master.

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