Skip to content

CMake: fix rhash detection#27944

Merged
adamjstewart merged 8 commits intospack:developfrom
iarspider:cmake-rhash-fix
Dec 17, 2021
Merged

CMake: fix rhash detection#27944
adamjstewart merged 8 commits intospack:developfrom
iarspider:cmake-rhash-fix

Conversation

@iarspider
Copy link
Copy Markdown
Contributor

Fixes #27932

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Dec 13, 2021

Hi @iarspider! I noticed that the following package(s) don't yet have maintainers:

  • rhash

Are you interested in adopting any of these package(s)? If so, simply add the following to the package class:

    maintainers = ['iarspider']

If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with spack blame:

$ spack blame rhash

Thank you for your help! Please don't add maintainers without their consent.

You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer.

@iarspider
Copy link
Copy Markdown
Contributor Author

iarspider commented Dec 13, 2021

Notice: I don't have a Mac machine to test if manual installation of shared libraries

if spec.satisfies('platform=darwin'):
install('librhash/*.dylib', prefix.lib)

is still needed.

@adamjstewart adamjstewart self-assigned this Dec 13, 2021
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Just downloaded all versions and it looks like version 1.3.6 is the first version to add a configure script and change the test name. Can you change the version checks to reflect this?

@adamjstewart
Copy link
Copy Markdown
Member

Tested on macOS and the binaries/libs seem to be broken:

$ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash 
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash:
	/lib/librhash.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
$ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/lib/librhash.dylib 
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/lib/librhash.dylib:
	/lib/librhash.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

This is not the case on 1.3.5:

$ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.3.5-jkw22fsf3i4acieulhccgrkvwoe3xsj2/bin/rhash 
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.3.5-jkw22fsf3i4acieulhccgrkvwoe3xsj2/bin/rhash:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
$ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.3.5-jkw22fsf3i4acieulhccgrkvwoe3xsj2/lib/librhash.dylib 
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.3.5-jkw22fsf3i4acieulhccgrkvwoe3xsj2/lib/librhash.dylib:
	/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.3.5-jkw22fsf3i4acieulhccgrkvwoe3xsj2/lib/librhash.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

* Update package.py

* Update package.py
@iarspider
Copy link
Copy Markdown
Contributor Author

@adamjstewart anything I can do to get this merged?

@adamjstewart
Copy link
Copy Markdown
Member

I'm still seeing broken installation links:

$ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash:
	/lib/librhash.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

which results in:

$ /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash -h
dyld: Library not loaded: /lib/librhash.0.dylib
  Referenced from: /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/rhash-1.4.2-kxo2sgndi65p32mf2irtntl6duxufnuy/bin/rhash
  Reason: image not found
Abort trap: 6

The Homebrew package doesn't seem to do anything special other than the patch you added. Let me see if I can get this working...

@adamjstewart
Copy link
Copy Markdown
Member

Alright, added a little macOS magic, should be good now. If the latest commit looks good to you then I can merge.

@iarspider
Copy link
Copy Markdown
Contributor Author

@adamjstewart thanks! Yes, that's fine, ok to merge.

@adamjstewart adamjstewart enabled auto-merge (squash) December 16, 2021 22:56
@adamjstewart adamjstewart merged commit 6443086 into spack:develop Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation issue: [email protected]~ownlibs~ncurses

2 participants