-
Notifications
You must be signed in to change notification settings - Fork 2.3k
I can only compile and link zstd on CentOS 6 if I add -lrt option to the linker options #3558
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
Comments
Would |
Yes, it worked, so no file patching is needed. However, since yesterday I noticed a much more important bug: zstd 1.5.4 segfaults on CentOS 6 ! |
Care to elaborate ? |
Possible workarounds:
It seems to be a bug in gcc-4.4.7, gcc-4.8.5 works. "-O3 -g" and then doing a "zstd -b"
[...] It looks like the inlining of MEM_write64 doesn't work out with gcc-4.4.7. |
so basically 64-bit-memory-access and unaligned stack are not a very good combination
|
@sb22bs Thank you so much for your analysis. I installed gcc version 4.9.1 on CentOS 6 then compiled and installed zstd with the following command: |
What flag should we pass into the cmake build to work around this issue? |
|
That works, thanks so much @Cyan4973 ! |
Sorry, I just realized that if I compile with gcc version 4.9.x then it works. |
Later versions of zstd fail without -lrt, see facebook/zstd#3558 .
Describe the bug
Compiling and linking zstd on an old Linux system such as CentOS 6 gives the following error when running
make
:To Reproduce
Steps to reproduce the behavior:
tar xf zstd-1.5.4.tar.gz
make
Expected behavior
zstd build process should complete without errors
Desktop (please complete the following information):
The fix:
In
zstd-1.5.4/programs
directory I patchedMakefile
like this:The text was updated successfully, but these errors were encountered: