Closed GoogleCodeExporter closed 8 years ago
ok, so your gcc is in fact clang ?
Original comment by yann.col...@gmail.com
on 14 Feb 2014 at 6:23
[deleted comment]
Apparently, as installed by the latest XCode command line tools.
Original comment by bsg...@gmail.com
on 15 Feb 2014 at 7:27
ok,
unfortunately -install_name is not accepted by GCC.
So it's not a portable solution.
There's a need to find another one which does not affect GCC users.
Original comment by yann.col...@gmail.com
on 27 Feb 2014 at 7:28
According to this S.O. post
(http://stackoverflow.com/questions/9170000/how-use-llvm-linker)
the following makefile line should work :
gcc -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"r114\" -shared lz4.c lz4hc.c
-fPIC -Wl,-soname=liblz4.so.1 -o liblz4.so
I could test is using clang on Linux, and it works correctly :
clang -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"r114\" -shared lz4.c
lz4hc.c -fPIC -Wl,-soname=liblz4.so.1 -o liblz4.so
which is no proof that it will work on OSX.
Would you mind testing it ?
Regards
Original comment by yann.col...@gmail.com
on 27 Feb 2014 at 7:40
According to this S.O. post
(http://stackoverflow.com/questions/9170000/how-use-llvm-linker)
the following makefile line should work :
gcc -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"r114\" -shared lz4.c lz4hc.c
-fPIC -Wl,-soname=liblz4.so.1 -o liblz4.so
I could test is using clang on Linux, and it works correctly :
clang -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"r114\" -shared lz4.c
lz4hc.c -fPIC -Wl,-soname=liblz4.so.1 -o liblz4.so
which is no proof that it will work on OSX.
Would you mind testing it ?
Regards
Original comment by yann.col...@gmail.com
on 27 Feb 2014 at 7:40
Latest r114 might solve this issue, although I'm unable to test it properly.
At least, the new makefile is compatible with clang (on Linux).
Original comment by yann.col...@gmail.com
on 12 Mar 2014 at 2:58
I tested the r114 release on OS X 10.8. The problem persists. I was able to get
liblz4 to compile by conditionally removing the -soname linker argument.
Additionally, I set the extension of shared library files to dylib instead of
so. The patch is attached. Please test it and let me know if it solves the
problem.
Original comment by jasiec...@gmail.com
on 14 Mar 2014 at 6:26
Attachments:
For reference: -soname isn't recognized by OS X's linker. This isn't a clang
vs. GCC problem. -install_name is the OS X equivalent, though -install_name
typically takes the install path rather than a basename.
Original comment by mistyde...@gmail.com
on 14 Mar 2014 at 6:43
Original comment by yann.col...@gmail.com
on 20 Mar 2014 at 1:45
Original comment by yann.col...@gmail.com
on 20 Mar 2014 at 1:46
I've adapted your proposed patch to latest r115 release candidate.
It seems to be a very good patch.
Unfortunately, I'm unable to test it on OS-X.
All I can say is that it works fine on Linux, and doesn't break anything.
So I'm relying on you for OS-X related tests.
Best Regards
Original comment by yann.col...@gmail.com
on 20 Mar 2014 at 1:58
Attachments:
Fixed into r115
Original comment by yann.col...@gmail.com
on 23 Mar 2014 at 11:16
I just tested it on OS X. It compiles correctly but it still builds
`liblz4.dylib.1.2.3` instead of `liblz4.1.2.3.dylib`.
Original comment by jasiec...@gmail.com
on 23 Mar 2014 at 12:15
true, there's a need for a more complex patch to correct this issue
Original comment by yann.col...@gmail.com
on 23 Mar 2014 at 12:17
The following release candidate should correct the issue regarding OSX
versioned naming convention for shared library.
Original comment by yann.col...@gmail.com
on 23 Mar 2014 at 1:36
Attachments:
Great, it seems to work very well now! Thanks for addressing it so quickly.
Original comment by jasiec...@gmail.com
on 23 Mar 2014 at 3:49
fix integrated into r116
Original comment by yann.col...@gmail.com
on 24 Mar 2014 at 9:02
Great, thank you! Consider putting a link to the Homebrew lz4 formula in the
"Executable binaries" section on the main project page:
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/lz4.rb
It allows Mac OS X users to install lz4 by simply running `brew install lz4`.
So far it's r114 but a patch updating it to r116 is on its way.
Original comment by jasiec...@gmail.com
on 25 Mar 2014 at 8:09
sure
Original comment by yann.col...@gmail.com
on 25 Mar 2014 at 9:14
Original issue reported on code.google.com by
bsg...@gmail.com
on 14 Feb 2014 at 4:19