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

OSX: specify the full path to the location of libblis.dylib #390

Merged
merged 3 commits into from Mar 31, 2020

Conversation

balay
Copy link
Contributor

@balay balay commented Mar 31, 2020

OSX: specify the full path to the location of libblis.dylib so that it can be found at runtime

Before this change:

Appication gives runtime error [when linked with blis]

dyld: Library not loaded: libblis.3.dylib
balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
        libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

After this change:

balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
	/Users/balay/petsc/arch-darwin-c-debug/lib/libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

Note: this build is with:

Executing: ['./configure', '--prefix=/Users/balay/petsc/arch-darwin-c-debug', '--enable-threading=no', 'CC=gcc', 'auto']

…t can be found at runtime

Before this change:

Appication gives runtime error [when linked with blis]
dyld: Library not loaded: libblis.3.dylib

balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
        libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

After this change:
balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
	/Users/balay/petsc/arch-darwin-c-debug/lib/libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
@isuruf
Copy link
Contributor

isuruf commented Mar 31, 2020

Does the test suite work without installing the library with this change?

@devinamatthews
Copy link
Member

@fgvanzee I was afraid this would break moving the library (or not installing it) and setting DYLD_LIBRARY_PATH, but that still works. Looks good to me.

@devinamatthews
Copy link
Member

@isuruf test suite works because it uses the static library.

common.mk Outdated Show resolved Hide resolved
Co-Authored-By: Jed Brown <jed@jedbrown.org>
@balay
Copy link
Contributor Author

balay commented Mar 31, 2020

I was afraid this would break moving the library (or not installing it) and setting DYLD_LIBRARY_PATH, but that still works. Looks good to me.

@devinamatthews AFAIK for the library to work before copying over - and after copying over - one needs to run install_name_tool separately for each of these steps. And DYLD_LIBRARY_PATH doesn't always work [If I remember correctly - it doesn't propagate to binaries run from scripts]

@devinamatthews
Copy link
Member

@balay of course, I just wanted to make sure it worked at least as well as before, which indeed it does.

@fgvanzee fgvanzee merged commit da0c086 into flame:master Mar 31, 2020
pradeeptrgit pushed a commit to amd/blis that referenced this pull request Jun 30, 2020
* OSX: specify the full path to the location of libblis.dylib so that it can be found at runtime

Before this change:

Appication gives runtime error [when linked with blis]
dyld: Library not loaded: libblis.3.dylib

balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
        libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

After this change:
balay@kpro lib % otool -L libblis.dylib
libblis.dylib:
	/Users/balay/petsc/arch-darwin-c-debug/lib/libblis.3.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

* INSTALL_LIBDIR -> libdir as INSTALL_LIBDIR has DESTDIR

Co-Authored-By: Jed Brown <jed@jedbrown.org>

* CREDITS file update.

Co-authored-by: Jed Brown <jed@jedbrown.org>
Co-authored-by: Field G. Van Zee <field@cs.utexas.edu>
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

Successfully merging this pull request may close these issues.

None yet

5 participants