Hi there, I'm trying to build mongo-c-driver for CocoaPods, which is the premier package manager for iOS and Mac OS. I'm following these steps which Jason Carey sent me:
Can you let me know what I might be doing wrong? Thanks!
Note that I'm configuring mongo with bson in "embedded" mode, then exclude the bson sources, and pull them in from the libbson pod instead. I don't think that is related to this linker error, though.
Version: 1.1.0
Host OS: iOS 8.1
Compiler: Xcode 6.1.1
Configuration:
libbson 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 binary hardening : yes
Code coverage support : no
Cross Compiling : no
Big endian : no
Link Time Optimization (experimental) : no
Documentation:
man : no
HTML : no
*** IMPORTANT ***
This is an unstable version of libmongoc.
It is for test purposes only.
Please, DO NOT use it in a production environment.
It will probably crash and you will lose your data.
Additionally, the API/ABI may change during the course
of development.
Thanks,
The libmongoc team.
*** END OF WARNING ***
libmongoc 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 binary hardening : yes
Code coverage support : no
Cross Compiling : no
Fast counters : no
SASL : sasl2
SSL : yes
Libbson : bundled
Documentation:
man : no
HTML : no
This is the podspec, which essentially specifies the build instructions:
Here's the error:
Undefined symbols for architecture x86_64:
"___mongoc_counter_auth_failure", referenced from:
_mongoc_counter_auth_failure_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_auth_success", referenced from:
_mongoc_counter_auth_success_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_clients_active", referenced from:
_mongoc_counter_clients_active_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-client.o)
"___mongoc_counter_clients_disposed", referenced from:
_mongoc_counter_clients_disposed_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-client.o)
"___mongoc_counter_cursors_active", referenced from:
_mongoc_counter_cursors_active_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cursor.o)
"___mongoc_counter_cursors_disposed", referenced from:
_mongoc_counter_cursors_disposed_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cursor.o)
"___mongoc_counter_dns_failure", referenced from:
_mongoc_counter_dns_failure_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-client.o)
"___mongoc_counter_dns_success", referenced from:
_mongoc_counter_dns_success_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-client.o)
"___mongoc_counter_op_egress_delete", referenced from:
_mongoc_counter_op_egress_delete_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_getmore", referenced from:
_mongoc_counter_op_egress_getmore_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_insert", referenced from:
_mongoc_counter_op_egress_insert_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_killcursors", referenced from:
_mongoc_counter_op_egress_killcursors_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_msg", referenced from:
_mongoc_counter_op_egress_msg_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_query", referenced from:
_mongoc_counter_op_egress_query_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_reply", referenced from:
_mongoc_counter_op_egress_reply_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_total", referenced from:
_mongoc_counter_op_egress_total_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_egress_update", referenced from:
_mongoc_counter_op_egress_update_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_delete", referenced from:
_mongoc_counter_op_ingress_delete_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_getmore", referenced from:
_mongoc_counter_op_ingress_getmore_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_insert", referenced from:
_mongoc_counter_op_ingress_insert_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_killcursors", referenced from:
_mongoc_counter_op_ingress_killcursors_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_msg", referenced from:
_mongoc_counter_op_ingress_msg_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_query", referenced from:
_mongoc_counter_op_ingress_query_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_reply", referenced from:
_mongoc_counter_op_ingress_reply_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_total", referenced from:
_mongoc_counter_op_ingress_total_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_op_ingress_update", referenced from:
_mongoc_counter_op_ingress_update_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_protocol_ingress_error", referenced from:
_mongoc_counter_protocol_ingress_error_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-cluster.o)
"___mongoc_counter_streams_active", referenced from:
_mongoc_counter_streams_active_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-stream-buffered.o)
"___mongoc_counter_streams_disposed", referenced from:
_mongoc_counter_streams_disposed_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-stream-buffered.o)
"___mongoc_counter_streams_egress", referenced from:
_mongoc_counter_streams_egress_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-socket.o)
"___mongoc_counter_streams_ingress", referenced from:
_mongoc_counter_streams_ingress_add in libPods-ObjCMongoDB-mongo-c-driver.a(mongoc-socket.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And finally, the full transcript: