Closed codeadict closed 1 year ago
I'm out of my depth here when it comes to make scripts.
With a bit of help from google, perhaps adding --with-pic
to the ./configure
in https://github.com/basho/eleveldb/blob/develop/c_src/Makefile#L36 might work?
Perhaps @hmmr may be able to help
When I was preparing #266, I took a conservative approach and left code that downloads snappy and builds it. Now, however, I tend to think it's best to just rely on libsnappy preinstalled.
Regarding this particular error, can there be something in your LDFLAGS
that shouldn't be there?
Opened #271, to simplify things.
Indeed, if we don't require a specific Snappy version, it might be better to rely on the OS one. @hmmr Thanks so much, I'll try your changes on my m1 mac
@hmmr I've opened https://github.com/basho/eleveldb/pull/272 on top of your PR and added OSX to CI to ensure it never breaks. I'm still unsure if this works on all OSes until CI runs. I've tested it on my M1 mac and it works fine. @ioolkos If you can please give it a shot on your OS that would be great too.
@codeadict https://github.com/basho/eleveldb/pull/272 builds without issues for me on Ubuntu 20.04 and 22.04 (both with OTP 25)
@ioolkos It compiles but does not load the nif correctly if you try using eleveldb from the shell. Fails with {error,{load_failed,"Failed to load NIF library: '/home/runner/work/eleveldb/eleveldb/_build/test/lib/eleveldb/priv/eleveldb.so: undefined symbol: _ZN6snappy21GetUncompressedLengthEPKcmPm'"}}
which probably indicates it expects snappy 1.1.9 that has a different signature and Ubuntu and Debian systems most have 1.1.8. I'm out of ideas here. So probably downloading and compiling snappy was not a bad idea, its what the erlang_rocksdb library does too but we have to find a way for the package manager installed library to not interfere with compiled one
@codeadict hm, you're right, just confirmed this. sorry for not testing properly. I'll try to see whether I can find anything to do about this on Ubuntu.
Here is a job running these tests https://github.com/codeadict/eleveldb/actions/runs/4227609076.
When libsnappy has been already installed via the OS package manager. Compiling eleveldb fails with the following error:
This happens on Ubuntu 22.04 and OTP 25.