Klozz / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

Will not compile on Solaris platforms #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With some Googling on compile error I got it to compile with the following two 
diffs.   However it seems to only build a 32 bit version.

--- Makefile    (revision 113)
+++ Makefile    (working copy)
@@ -32,9 +32,9 @@

 PREFIX=/usr
 CC=gcc
-CFLAGS+= -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"
+CFLAGS+= -I. -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"

 LIBDIR=$(PREFIX)/lib
 INCLUDEDIR=$(PREFIX)/include
@@ -76,7 +76,7 @@
        ar rcs liblz4.a lz4.o lz4hc.o

 liblz4.so: lz4.c lz4hc.c
-       $(CC) -shared -fPIC -Wl,--soname=liblz4.so.1 $(CFLAGS) $^ -o $@
+       $(CC) -shared -fPIC -h liblz4.so.1 $(CFLAGS) $^ -o $@

--- programs/Makefile   (revision 113)
+++ programs/Makefile   (working copy)
@@ -34,7 +34,7 @@
 DESTDIR=
 PREFIX=/usr
 CC=gcc
-CFLAGS+= -I.. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"
+CFLAGS+= -I.. -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"

This is on OmniOS r151008j.

Out of the box this is the result:
# make all
gcc -O3 -c -I. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"r113\" lz4.c lz4hc.c
ar rcs liblz4.a lz4.o lz4hc.o
gcc -shared -fPIC -Wl,--soname=liblz4.so.1 -I. -std=c99 -Wall -W -Wundef 
-DLZ4_VERSION=\"r113\" lz4.c lz4hc.c -o liblz4.so
ld: fatal: unrecognized option '--'
ld: fatal: use the -z help option for usage information
Makefile:79: recipe for target 'liblz4.so' failed
make: *** [liblz4.so] Error 1

Original issue reported on code.google.com by c...@innovates.com on 3 Mar 2014 at 5:09

GoogleCodeExporter commented 8 years ago
Thanks for the report.

However, apparently the changes are specific to SUN Solaris, and I can't 
deliver a version which only works for Sun Solaris.

If a patch which both solves this issue and keep all other target systems 
working as intended is provided, I'm happy to integrated it.

Original comment by yann.col...@gmail.com on 6 Mar 2014 at 10:31

GoogleCodeExporter commented 8 years ago
The latest Makefile of LZ4 is able to produce different compilation options 
depending on host system. Currently, this difference is achieved between Linux 
and OS-X.

Maybe, could you have a look at it, and see if there is a way to achieve 
something similar for Sun Solaris ?

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 4:46

GoogleCodeExporter commented 8 years ago
Issue closed, since there was no feedback from reporter, nor any easy way to 
independently reproduce the problem.

Original comment by yann.col...@gmail.com on 11 Jun 2014 at 9:15