[CXX-737] #include "mongo/client/dbclient.h" give boost error Created: 09/Nov/15 Updated: 20/Nov/15 Resolved: 20/Nov/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON, Build, Implementation, Testing |
| Affects Version/s: | legacy-1.0.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Fransiskus Lukman | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Compile: g++ -Wall -std=c++11 -l boost_system -pthread -I mongo-client-install/include -L mongo-client-install/lib -l mongoclient -l boost_thread -l boost_regex main.cpp -o Lucy $(mysql_config --libs --cflags) 2>&1 /tmp/ccHC5mIq.o: In function `__static_initialization_and_destruction_0': Anybody else getting message like the above? i came accross saying bosst haing a problem with ubuntu 14,04 is that true? |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 20/Nov/15 ] | |
|
fransiskuslukman@gmail.com - I'm closing this since I've not heard back from you. If you are still having difficulty linking with the driver, please feel free to comment on the ticket and we can re-open it. | |
| Comment by Fransiskus Lukman [ 14/Nov/15 ] | |
|
sure ill upload it | |
| Comment by Andrew Morrow (Inactive) [ 12/Nov/15 ] | |
|
Could you possibly provide a minimal compilable source file that fails to link for you? I'd like to try to reproduce on my local system. | |
| Comment by Andrew Morrow (Inactive) [ 12/Nov/15 ] | |
|
I had overlooked that you already had boost _system on the build line, just at the beginning, so clearly that was not actually the issue. | |
| Comment by Fransiskus Lukman [ 10/Nov/15 ] | |
|
Andrew, still the same output of: | |
| Comment by Fransiskus Lukman [ 10/Nov/15 ] | |
|
Andrew Morrow I have tried, i think boost don't install easily on Ubuntu 14.04 I used sudo apt-get install libboost-all-dev This is the output: is there a direction or suggestion for me? | |
| Comment by Andrew Morrow (Inactive) [ 10/Nov/15 ] | |
|
fransiskuslukman@gmail.com - Building with --config=force shouldn't ever cause a problem. Actually though, I think the solution might be much simpler: I think you need to add boost_system to your link line. Can you try building your application with :
Also, please be aware that boost installed in /usr is most likely not built with C++11. The current understanding of the C++ driver developers is that boost does not offer a stable ABI between C++03 and C++11 builds, so it is still something to look out for. | |
| Comment by Fransiskus Lukman [ 10/Nov/15 ] | |
|
Hi andrew, i build the scons with i am currently making a fresh build on ubuntu 14.04 reinstalling because on the previous one i might have used --config=force | |
| Comment by Andrew Morrow (Inactive) [ 09/Nov/15 ] | |
|
fransiskuslukman@gmail.com - I see that you are building your application with C++11. Did you build the mongo C++ driver with C++11 enabled? Is the boost in /usr built with C++11 (it usually is not). It is unfortunate, but boost does not offer a stable ABI between C++03 and C++11 builds of the library. As a result, all of your application, the driver, and boost must be consistently built with either C++03 or C++11. |