I compile my code using the following set of flags
LIBS += $(EXT_DIR)/librocksdb.a -lrt -lsnappy -llz4 -lz
where librocksdb.a is generated by
PORTABLE=1 make static_lib
I need to ship the binary to several tens of machines (all are ec2 machines with the same set of packages installed, same code/directory organisation structure).
When I try to run the code however (on the remote machine, not on the local one, where it works fine), I get the following error
Error in RockDB: Compression type Snappy is not linked with the binary.
When I compile remotely and use the binary from there, it also works fine. Libsnappy is installed on both machines.
Any thoughts on how I can fix this error and generate a binary that can be executed on multiple machines?
Use ldd ./yourapplication to check the library dependency on the remote machine.
Or build & install static snappy library before build your application.
I did this on an old machine, it works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.