build on macOs 10.13 error

48 views
Skip to first unread message

Y.Nunung Pamungkas Jayuda

unread,
Apr 23, 2018, 8:06:51 AM4/23/18
to mongodb-user

Driver Version : 1.9.4
Host OS : MacOS 10.13
C Compiler : gcc 3.8.1
Xcode : 9.3

ERROR :

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmongoc.a(libmongoc_la-mongoc-linux-distro-scanner.o) has no symbols

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmongoc.a(libmongoc_la-mongoc-linux-distro-scanner.o) has no symbols

  CCLD     libmongoc-1.0.la

Undefined symbols for architecture x86_64:

  "_X509_VERIFY_PARAM_set1_host", referenced from:

      _mongoc_stream_tls_openssl_new in libmongoc.a(libmongoc_la-mongoc-stream-tls-openssl.o)

  "_X509_VERIFY_PARAM_set1_ip_asc", referenced from:

      _mongoc_stream_tls_openssl_new in libmongoc.a(libmongoc_la-mongoc-stream-tls-openssl.o)

  "_X509_VERIFY_PARAM_set_hostflags", referenced from:

      _mongoc_stream_tls_openssl_new in libmongoc.a(libmongoc_la-mongoc-stream-tls-openssl.o)

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[1]: *** [libmongoc-1.0.la] Error 1

make: *** [all-recursive] Error 1



./configure output :

libmongoc 1.9.4 was configured with the following options:


Build configuration:

  Enable debugging (slow)                          : no

  Compile with debug symbols (slow)                : no

  Enable GCC build optimization                    : yes

  Enable automatic init and cleanup                : no

  Enable mongodb+srv URIs                          : yes

  Enable maintainer flags                          : no

  Code coverage support                            : no

  Cross Compiling                                  : no

  Fast counters                                    : no

  Shared memory performance counters               : yes

  SASL                                             : sasl2

  SSL                                              : openssl

  Snappy Compression                               : no

  Zlib Compression                                 : system

  Libbson                                          : bundled


Documentation:

  man                                              : no

  HTML                                             : no


any idea how to solve this ?
Thanks







A. Jesse Jiryu Davis

unread,
Apr 23, 2018, 9:02:05 AM4/23/18
to mongodb-user
I'm guessing this is because the C Driver's build system has found the OpenSSL headers, but it can't find the OpenSSL library, or it found the wrong SSL library. This is sadly common in Mac OS, the history of SSL libraries there is a mess.

I recommend "./configure --enable-ssl=darwin" to avoid OpenSSL entirely and use Apple's builtin SSL instead. This will become the default in version 1.10: https://jira.mongodb.org/browse/CDRIVER-1121
Reply all
Reply to author
Forward
0 new messages