clang compilation issues on FreeBSD 10.1-STABLE

Joseph Olatt joji at shellx.eskimo.com
Tue Dec 9 01:44:40 UTC 2014


I'm able to compile the following code on FreeBSD 8.x and 9.x. However,
on a FreeBSD 10.1-STABLE system, I'm not. The code is:

/* Begin code */
#include <openssl/evp.h>

int
main(int argc, char * argv[])
{
    EVP_CIPHER_CTX ctx;

    /* Initialize the context */
    EVP_CIPHER_CTX_init(&ctx);
}
/* End code */


/* Begin compile command */
c++ tt.cpp -lssl
/* End compile command */


/* Begin compile error */
/usr/bin/ld: //lib/libcrypto.so.7: invalid DSO for symbol `EVP_CIPHER_CTX_init' definition
//lib/libcrypto.so.7: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
/* End compile error */


Anybody have any ideas how I can overcome the above error? I suspect it
has something to do with clang/llvm on FreeBSD 10.x.

Any suggestions/insight will be greatly appreciated.


More information about the freebsd-questions mailing list