[CXX-990] Can't install the C++ driver Created: 11/Aug/16 Updated: 11/Sep/19 Resolved: 11/Aug/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | 3.0.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Blocker - P1 |
| Reporter: | kapil gupta | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 14.04 |
||
| Description |
|
I have installed libbson and C mongodb driver. I then tried to install the C++ new driver which gave me this error: ``` 'make' 'install' See also /home/cortana/Desktop/mongo-cxx-driver-master/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-*.log make[2]: *** [src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install] Error 1 |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
Unfortunately, pkg-config just doesn't seem to want you to be able to set rpath via the pkg-config system, or I would recommend that. I'm not sure if using the CMake modules we ship would solve the problem either, but it might. In any event, in the real world you will be building against the C++11 library with a build system of some sort, which can automate this for you. I'm going to close this ticket as 'works as designed' because I don't think there are any changes to make here. | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
ok, sorry about that :/ Is there a more permanent solution than mentioning rpath on each compilation ? | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
Right, so /usr/local/lib is in fact not in your default runtime library search path. When you link to libmongocxx or libbsoncxx, you need to specify it with -Wl,-rpath,/usr/local/lib as I originally suggested. | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
Now it works | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
And what happens if you run
| |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
| |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
And, lastly, what does
| |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
-I/usr/local/include/mongocxx/v_noabi -I/usr/local/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/bsoncxx/v_noabi -L/usr/local/lib -lmongocxx -lbsoncxx | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
And, what does:
Report? | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
This is the output: | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
What does
Report? | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
That is my default library path. I tried to explicitly tell it the path too, gives the same error. | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
Is /usr/local in the default library search on your system? If not, you probably need to tell the linker to embed /usr/local for the path into hellomongo. Something like:
As a test, you could try running your hellomongo binary with LD_LIBRARY_PATH=/usr/local/lib set in the environment and see if that fixes it. | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
-DCMAKE_INSTALL_PREFIX=/usr/local | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
What was your install prefix when you installed the driver? | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
I have another problem regarding the driver. I installed the c++ driver successfully and compiled the code provided for testing . On the running the code, I get this error : ``` Is this an error caused due to incorrect installation or just a linking error? | |
| Comment by kapil gupta [ 11/Aug/16 ] | |
|
I just needed a sudo to get clearance to create a folder. Guess should have read the log first :/ | |
| Comment by Andrew Morrow (Inactive) [ 11/Aug/16 ] | |
|
Can you attach the files that
|