Paul Melnikow
2015-03-06 03:28:42 UTC
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:
If you're looking for a rundown of what you need to do to build the c
what might be going wrong? Iâve got the .def and .defs files available and
Iâm compiling mongoc-counters.c. If I run nm on the .o or static library .a
files, the symbols seem to be there.
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
Project source: https://github.com/paulmelnikow/ObjCMongoDB/tree/libmongoc
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:
https://github.com/paulmelnikow/mongo-c-driver-1/blob/1.1.0%2Bpodspec/mongo-c-driver.podspec
And the syntax for same: http://guides.cocoapods.org/syntax/podspec.html
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:
https://gist.githubusercontent.com/paulmelnikow/17632c2df8943d4dedc2/raw/gistfile1.txt
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7ecedf5e-de41-49ec-bfc0-22a42d170f91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
premier package manager for iOS and Mac OS. I'm following these steps which
Jason Carey sent me:
If you're looking for a rundown of what you need to do to build the c
- Run autotools
- You can either do this yourself by invoking ./autogen.sh on a system
with autoconf, automake, libtool and autoreconf or...
- You can download a release tarball from the mongo-c-driver releases
page. That get's you to ./configure and only relies on a compiler and make.
- Run ./configure
- ./autogen.sh runs this for you, so only needed if you downloaded a
release tarball
- Copy the headers and sources out of src/mongoc, src/libbson/src/bson
and src/libbson/src/yajl
- This is all of the *.c, *.h, *.def, *.defs files
- Compile with "-DBSON_COMPILATION -DMONGOC_COMPILATION"
Iâve gotten to link time, and now have an issue I canât resolve. Any idea- You can either do this yourself by invoking ./autogen.sh on a system
with autoconf, automake, libtool and autoreconf or...
- You can download a release tarball from the mongo-c-driver releases
page. That get's you to ./configure and only relies on a compiler and make.
- Run ./configure
- ./autogen.sh runs this for you, so only needed if you downloaded a
release tarball
- Copy the headers and sources out of src/mongoc, src/libbson/src/bson
and src/libbson/src/yajl
- This is all of the *.c, *.h, *.def, *.defs files
- Compile with "-DBSON_COMPILATION -DMONGOC_COMPILATION"
what might be going wrong? Iâve got the .def and .defs files available and
Iâm compiling mongoc-counters.c. If I run nm on the .o or static library .a
files, the symbols seem to be there.
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
Project source: https://github.com/paulmelnikow/ObjCMongoDB/tree/libmongoc
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:
https://github.com/paulmelnikow/mongo-c-driver-1/blob/1.1.0%2Bpodspec/mongo-c-driver.podspec
And the syntax for same: http://guides.cocoapods.org/syntax/podspec.html
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:
https://gist.githubusercontent.com/paulmelnikow/17632c2df8943d4dedc2/raw/gistfile1.txt
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7ecedf5e-de41-49ec-bfc0-22a42d170f91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.