1
votes

gcc -o clxd -m64 -L/usr/local/lib64 -L/usr/lib64 -L/usr/lib64/nptl -Wl,-rpath,/home/y/lib64 -ldl -lrt -lpthread -lstdc++ -lgcc -lc -lm -lev -L/home/y/lib64 -Wl,-Bstatic -lboost_program_options -lboost_date_time -lboost_filesystem -lboost_regex -lboost_system -lboost_thread -llua -lcrypto -Wl,-Bdynamic -L/usr/lib

The above command is from a make file while executing make using V=1 (verbose) to understand if I have passed on directories properly or not. And it exits with the following error:

/usr/bin/ld: cannot find -lcrypto collect2: ld returned 1 exit status

My understanding from the gcc command, -Bstatic tries to statically link lib crypto (-lcrypto). When I checked under /usr/lib64, I have the following files:

libcrypto.so -> libcrypto.so.1.0.1e
libcrypto.so.10 -> libcrypto.so.1.0.1e
libcrypto.so.1.0.1e

Does -Bstatic link the shared files statically or not? If not how do I get libcrypto.a?

1
Your distribution (or similar) would need to have a package for them if you wanted the static libraries to link against.Etan Reisner
Will I be able to build it from source?mariner
You certainly could build a copy of it from source. Whether you want to is the question. And, if you do, how that interacts with your system copy if you install it (or how you manage it as a general build detail if you don't).Etan Reisner

1 Answers

5
votes

I solved this on Linux/Macosx by installing libssl-dev.

sudo apt-get install libssl-dev