Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to build snappy-java for FreeBSD 8.1 to use it with cassandra (can't enable columns compression without it).

Trying to build it from source and getting an error:

$ hg clone https://snappy-java.googlecode.com/hg/ snappy-java 
$ cd snappy-java 
$ export JAVA_HOME=/usr/local/openjdk6 && gmake 

The process starts, but after some time i get the following error:

g++ -I/usr/local/openjdk6/include -Ilib/inc_mac -O2 -fPIC - 
fvisibility=hidden  -Ilib/include   -I"/usr/local/openjdk6/include/ 
freebsd" -Itarget/snappy-1.0.4 -o target/snappy-1.0.4-Default/ 
libsnappyjava.so target/snappy-1.0.4-Default/snappy-sinksource.o 
target/snappy-1.0.4-Default/snappy-stubs-internal.o target/ 
snappy-1.0.4-Default/snappy.o target/snappy-1.0.4-Default/ 
SnappyNative.o -shared -static 
/usr/bin/ld: /usr/lib/crtbeginT.o: relocation R_X86_64_32 can not be 
used when making a shared object; recompile with -fPIC 
/usr/lib/crtbeginT.o: could not read symbols: Bad value 
gmake: *** [target/snappy-1.0.4-Default/libsnappyjava.so] Error 1 

So -fPIC is already ON... Any help is appreciated. Thanks

share|improve this question

2 Answers 2

up vote 0 down vote accepted
can't enable columns compression without it

That is not quite true. DeflateCompressor is still available without the Snappy libraries. Do you require or prefer Snappy? If so, I would add the downloadable .jar from the Snappy project to your classpath. There is no need to perform your own build.

share|improve this answer

Try to remove the -static from the compilerflags. You are building a shared libary.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.