<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:31 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-841] Cmake fails if libbson_dir provided but not pkg-config found</title>
                <link>https://jira.mongodb.org/browse/CXX-841</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;If you enter LIBBSON_DIR and there is no pkg-config around, makefile fails with a FindPkgConfig.cmake error even if I entered a LIBBSON_DIR value.&lt;br/&gt;
The solution is to switch (in both *.cmake provided under ./cmake) the if section: if (PKG_CONFIG_FOUND) with the 2nd one elseif(LIBBSON_DIR).&lt;br/&gt;
Attached the two files modified.&lt;/p&gt;</description>
                <environment></environment>
        <key id="264687">CXX-841</key>
            <summary>Cmake fails if libbson_dir provided but not pkg-config found</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="4">Incomplete</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="mvalle@cscs.ch">Mario Valle</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Feb 2016 13:00:25 +0000</created>
                <updated>Tue, 15 Mar 2016 18:36:46 +0000</updated>
                            <resolved>Tue, 15 Mar 2016 18:36:46 +0000</resolved>
                                    <version>3.0.0</version>
                                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1204240" author="acm" created="Tue, 15 Mar 2016 18:36:46 +0000"  >&lt;p&gt;Hi - I&apos;m closing this issue as I&apos;ve not heard any more information. Please feel free to re-open it if you need further help.&lt;/p&gt;</comment>
                            <comment id="1186096" author="acm" created="Fri, 26 Feb 2016 17:42:44 +0000"  >&lt;p&gt;Sorry for the delay. Not to ask an obvious question, but do you actually have libbson 1.3.1 or newer? That error message seems to indicate that pkg-config was in fact used, but it found too old of a version of libbson.&lt;/p&gt;</comment>
                            <comment id="1180365" author="mvalle@cscs.ch" created="Mon, 22 Feb 2016 11:50:27 +0000"  >&lt;p&gt;Here is what the cmake-gui outputs after restoring the two Find*.cmake &lt;br/&gt;
to the original version:&lt;/p&gt;

&lt;p&gt;Checking for module &apos;libbson-1.0&amp;gt;=1.3.1&apos;&lt;/p&gt;

&lt;p&gt;CMake Error at &lt;br/&gt;
/local/local1/cmake-3.5.0-rc2-Linux-x86_64/share/cmake-3.5/Modules/FindPkgConfig.cmake:363 &lt;br/&gt;
(message): A required package was not found Call Stack (most recent call &lt;br/&gt;
first): &lt;br/&gt;
/local/local1/cmake-3.5.0-rc2-Linux-x86_64/share/cmake-3.5/Modules/FindPkgConfig.cmake:528 &lt;br/&gt;
(_pkg_check_modules_internal) cmake/FindLibBSON.cmake:26 &lt;br/&gt;
(pkg_check_modules) src/bsoncxx/CMakeLists.txt:67 (find_package)&lt;/p&gt;

&lt;p&gt;Configuring incomplete, errors occurred!&lt;/p&gt;

&lt;p&gt;See also &lt;br/&gt;
&quot;/home/mvalle/mongodb/mongo-cxx-driver-master/build/CMakeFiles/CMakeOutput.log&quot;.&lt;/p&gt;



&lt;p&gt;Note that the FindPkgConfig.cmake file is there and CMAKE is at its &lt;br/&gt;
latest version 3.5.0&lt;br/&gt;
Maybe the problem is with CMAKE and not with MongoDB. In this case, &lt;br/&gt;
sorry for the noise.&lt;br/&gt;
Best&lt;br/&gt;
          mario&lt;/p&gt;




</comment>
                            <comment id="1179041" author="acm" created="Fri, 19 Feb 2016 17:35:59 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mvalle%40cscs.ch&quot; class=&quot;user-hover&quot; rel=&quot;mvalle@cscs.ch&quot;&gt;mvalle@cscs.ch&lt;/a&gt; -&lt;/p&gt;

&lt;p&gt;First, I&apos;m happy to hear that the new driver build system is working better for you. We like it better too. Any thoughts or opinions on the new API in the C++11 driver?&lt;/p&gt;

&lt;p&gt;I read your explanation of what is going wrong, and I&apos;m a little puzzled that you are seeing that behavior. The search for PkgConfig is supposed to be &quot;quiet&quot;, so that it won&apos;t break if it isn&apos;t found:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/blob/master/cmake/FindLibBSON.cmake#L22-L25&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/blob/master/cmake/FindLibBSON.cmake#L22-L25&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you provide the console output from your CMake invocation so I can see the error that you are getting?&lt;/p&gt;</comment>
                            <comment id="1178781" author="mvalle@cscs.ch" created="Fri, 19 Feb 2016 13:56:27 +0000"  >&lt;p&gt;Dear Andrew,&lt;br/&gt;
thanks for looking!&lt;br/&gt;
Why I made this change. In my installation ccmake has not found &lt;br/&gt;
pkg-config (this is for now a side project, so no much time to &lt;br/&gt;
investigate why). The logic in the two Find*.cmake module attached say &lt;br/&gt;
that if pkg-config not found, then use the LIBBSON_DIR variable. That &lt;br/&gt;
makes much sense. Unfortunately CMAKE dies if pkg-config not found, so &lt;br/&gt;
the other elseif is never reached. Maybe this should be investigated &lt;br/&gt;
upfront. With my small change, if LIBBSON_DIR not set, nothing changes. &lt;br/&gt;
If set, then pkg-config not tested and the ccmake configuration succeeds.&lt;br/&gt;
In any case, the modifications were attached to the bug submission.&lt;/p&gt;

&lt;p&gt;I want to add, that the new c++ driver with the cmake build environment &lt;br/&gt;
is a breeze to compile compared with the old (2.6) one.&lt;/p&gt;

&lt;p&gt;Best.&lt;br/&gt;
		mario&lt;/p&gt;


&lt;p&gt;&amp;#8211; &lt;br/&gt;
Ing. Mario Valle&lt;br/&gt;
Swiss National Supercomputing Centre (CSCS)&lt;br/&gt;
v. Trevano 131, 6900 Lugano, Switzerland&lt;br/&gt;
Tel: +41 (91) 610.82.60&lt;/p&gt;
</comment>
                            <comment id="1178756" author="acm" created="Fri, 19 Feb 2016 13:27:08 +0000"  >&lt;p&gt;Hi, thanks for the bug report.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure I totally understand why you want to make this change. The way it is written, it should only be attempting to use the pkg-config mechanism if pkg-config is found. Or are you describing a situation where the pkg-config binary is found, but there is no .pc file available for libmongoc? I think I might see why in that latter case you would want the _DIR variables to function as overrides. Can you clarify a bit? Also, if you want to contribute your changes, a github PR is the preferred way to send us changes.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="110024" name="CMakeOutput.log" size="44861" author="mvalle@cscs.ch" created="Mon, 22 Feb 2016 11:50:27 +0000"/>
                            <attachment id="108700" name="FindLibBSON.cmake" size="1718" author="mvalle@cscs.ch" created="Thu, 11 Feb 2016 13:00:25 +0000"/>
                            <attachment id="108701" name="FindLibMongoC.cmake" size="1769" author="mvalle@cscs.ch" created="Thu, 11 Feb 2016 13:00:25 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrdisf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>