[CDRIVER-1150] Can't build r3.0.0: package 'libmongoc-1.0>=1.3.1' not found Created: 04/Mar/16 Updated: 08/Dec/17 Resolved: 16/Mar/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrey Ponomarenko | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
I can't build r3.0.0. The libbson 1.3.3 and mongo-c-driver 1.3.3 have been installed properly. The CMake configure error message is the following: ]$ cmake . – Configuring incomplete, errors occurred! |
| Comments |
| Comment by Vincent D [ 08/Dec/17 ] | |||||||||||||||||
|
Thank you for the info. I did
then | |||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 08/Dec/17 ] | |||||||||||||||||
|
Yes, that looks to me like the correct steps. You have built libmongoc with "./configure", which is generated by the Autotools. Building libmongoc that way will also build libbson. You should now have libbson and libmongoc 1.6.3 installed on your system. I recommend you try the latest release of libmongoc, 1.8.2, instead. | |||||||||||||||||
| Comment by Vincent D [ 08/Dec/17 ] | |||||||||||||||||
|
Hi I have the same problem,
From the files in the mongo-cxx release I don't see what else than cmake I could use to build mongocxx. I actually do the following :
| |||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 18/Mar/16 ] | |||||||||||||||||
|
Great, thanks for your reply. | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 17/Mar/16 ] | |||||||||||||||||
|
It's OK to close the issue. My problem is resolved. | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 17/Mar/16 ] | |||||||||||||||||
|
There is no any specific reason for me to build them by different build systems. Thank you. | |||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 16/Mar/16 ] | |||||||||||||||||
|
andrewponomarenko, I'm going to close this for now. My recommendation is that you build libbson and libmongoc both using Autotools. (The CMake build is primarily meant for Windows builds.) If you have a strong need to mix Autotools and CMake builds, please reopen this ticket and we'll gladly debug the problem with you. | |||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 14/Mar/16 ] | |||||||||||||||||
|
Oh, I missed that. Can you tell me why you're building libbson with Automake and the C Driver with CMake please? | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 14/Mar/16 ] | |||||||||||||||||
|
There is no config.log in the c driver because it is configured by cmake. | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 14/Mar/16 ] | |||||||||||||||||
|
libbson config log | |||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 09/Mar/16 ] | |||||||||||||||||
|
libbson's and libmongoc's Makefiles both put their pkgconfig files in $(libdir)/pkgconfig/: https://github.com/mongodb/libbson/blob/master/src/Makefile.am#L23 ... so I don't know why they'd put installed different places. If you'd like to open a Jira ticket in the CDRIVER project with the config.log generated by both libbson and libmongoc we can debug from there. | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 08/Mar/16 ] | |||||||||||||||||
|
Output of "PKG_CONFIG_DEBUG_SPEW=1 cmake" | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 08/Mar/16 ] | |||||||||||||||||
|
Seems that the issue is with the installation of the Mongo C driver. It is installed to "/usr/lib/pkgconfig/libmongoc-1.0.pc", but libbson is installed to "/usr/lib64/pkgconfig/libbson-1.0.pc". The output of the "PKG_CONFIG_DEBUG_SPEW=1 cmake" is attached. | |||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 07/Mar/16 ] | |||||||||||||||||
|
andrewponomarenko - One thing that puzzles me is that while configuring without PKG_CONFIG_PATH, the CMake build was able to find libbson-1.3.3, but then failed to find libmongoc at all. Presumably, libbson and libmongoc were installed to the same location. Why did the first one succeed, and the second one fail? Can you verify that you only have one instance of each of libbson and libmongoc installed on the system? I think the easiest way would be to search the filesystem for libmongoc-1.0.pc and libbson-1.0.pc. Another interesting thing to try would be to set PKG_CONFIG_DEBUG_SPEW in the environment to get more detailed information on what pkgconfig is doing. mark.benvenuto - I wouldn't expect that the user would need to set PKG_CONFIG_PATH in this situation. The /usr/lib/pkgconfig path should be automatically included in the search path. If it wasn't, how was libbson, presumably installed to /usr, located in the original failed configuration attempt? | |||||||||||||||||
| Comment by Mark Benvenuto [ 06/Mar/16 ] | |||||||||||||||||
|
acm Is there a way to we can advise the user that they need to set PKG_CONFIG_PATH in some cases? I know this affects Fedora users, but does it also affect Ubuntu users? | |||||||||||||||||
| Comment by Andrey Ponomarenko [ 04/Mar/16 ] | |||||||||||||||||
|
Hello, Thank you for the reply. The mongo-c-driver is configured with "cmake -DCMAKE_INSTALL_PREFIX=/usr" and libbson with "./configure --prefix=/usr". The file libmongoc-1.0.pc is presented in the system:
Adding PKG_CONFIG_PATH=/usr/lib/pkgconfig/ parameter fixed the issue:
Why the CMake can't find default pkgconfig path (/usr/lib/pkgconfig/) automatically? Thank you! | |||||||||||||||||
| Comment by Mira Carey [ 04/Mar/16 ] | |||||||||||||||||
|
Andrey, What location have you installed libmongoc and libbson into? If those directories aren't already registered with pkg-config, you may need to specify PKG_CONFIG_PATH on the cmake command line invocation. I.e.
You're looking for a directory containing a file named libmongoc-1.0.pc Regards, |