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

Makefile in release tarball does not contain the install targets #111

Closed
amadio opened this issue Sep 8, 2017 · 16 comments
Closed

Makefile in release tarball does not contain the install targets #111

amadio opened this issue Sep 8, 2017 · 16 comments

Comments

@amadio
Copy link

amadio commented Sep 8, 2017

Please do not strip the install targets from the Makefile. I am packaging xxHash for Gentoo Linux, and noticed that the Makefile is incomplete compared to what's in the git repository.

@Cyan4973
Copy link
Owner

Cyan4973 commented Sep 8, 2017

Which change, or patch, would you like ?
As far as I can tell, make install is expected to work on Linux ?

@Cyan4973
Copy link
Owner

Cyan4973 commented Sep 8, 2017

ah ok, since the change in the title, the issue is clearer.

Indeed, v0.6.2 is dated 13 Aug 2016.
Back then, there was no install target in Makefile. It was added later on.

@amadio
Copy link
Author

amadio commented Sep 8, 2017

Yes, I'm picking the release tarball. Maybe just creating a new release would be fine, then. Thanks!

@Cyan4973
Copy link
Owner

Cyan4973 commented Sep 8, 2017

@amadio
Copy link
Author

amadio commented Sep 8, 2017

Thanks! As a side note, shouldn't the header be installed on make install? How is xxhash supposed to be used by projects depending on it (e.g., LZ4)?

@amadio
Copy link
Author

amadio commented Sep 8, 2017

Maybe creating a small library with the hash functions would be useful for other projects.

@Cyan4973
Copy link
Owner

Cyan4973 commented Sep 8, 2017

Right,
currently, there is no library created.
It could be added, though, to be fair, I haven't received any request in this direction so far.
I guess most users include the source code directly.

As a reference point, it would be good to know how it works for some other common checksum such as md5sum. The cli side is fine, it's the library side which is still mysterious to me.

@atweiden
Copy link

atweiden commented Sep 9, 2017

I haven't received any request in this direction so far

I use the xxHash shared library in a Perl6 package. 0.6.3 is broken for me, as it does not include 0.6.2's options to build a shared library.

@Cyan4973
Copy link
Owner

Cyan4973 commented Sep 11, 2017

I'm surprised because xxHash release tarball never offered a Makefile target to build a shared library :
https://github.com/Cyan4973/xxHash/blob/v0.6.2/Makefile

However, the unofficial community-supported cmake script did :
https://github.com/Cyan4973/xxHash/blob/v0.6.2/cmake_unofficial/CMakeLists.txt

It was updated in v0.6.3, maybe that's when it was broken ?
https://github.com/Cyan4973/xxHash/blob/v0.6.3/cmake_unofficial/CMakeLists.txt
5ab73ee

Edit : I tested the new cmake script, indeed, it only produces the static library, not the dynamic one as it used to in 0.6.2.

Edit 2 : Actually, it's possible to build dynamic library with this script, it requires using flag -DBUILD_SHARED_LIBS=ON. According to patch's author, @ChrisKitching, this is standard behavior for cmake scripts. Though it's unclear to me how users can discover it...

@atweiden
Copy link

Thanks, -DBUILD_SHARED_LIBS did the trick.

@ChrisKitching
Copy link
Contributor

Though it's unclear to me how users can discover it...

https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html

It's in the manual.

It's also the default behaviour. If you're only getting static libraries by default, then something in your cmake script must be explicitly setting this to off (effectively changing the default).

@Cyan4973
Copy link
Owner

It's also the default behaviour. If you're only getting static libraries by default, then something in your cmake script must be explicitly setting this to off (effectively changing the default).

The cmake script has not been modified since your patch.
There is no variable BUILD_SHARED_LIBS mentioned in the file.

According to your statement, it means that it should be set to ON by default.
But tests show that it only produces static library.

Now, if it's enough to just add an option line with BUILD_SHARED_LIBS set to ON, I can certainly do it.

Cyan4973 added a commit that referenced this issue Sep 14, 2017
@Cyan4973
Copy link
Owner

dev branch update :

cmake script was modified to also create shared library by default.

Since there are users of the library in binary format,
I've also added a lib target to Makefile.
make install now also installs static and shared libraries.

@amadio
Copy link
Author

amadio commented Dec 18, 2017

@Cyan4973 Could you please tag a new release? I'd like to use the updated Makefile when packaging xxHash for Gentoo. Cheers,

@Cyan4973
Copy link
Owner

xxHash v0.6.4 has been released

@amadio
Copy link
Author

amadio commented Dec 22, 2017

Thank you!

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

4 participants