Re: Bug in new C++ driver?

From: Claus Skaaning <claus.skaaning@xxxxxxxxx>
To: mongodb-user@xxxxxxxxxxxxxxxx
Date: Tue, 10 May 2016 16:12:28 +0200
Why ads?
Hi - yes I explicitly set it, since I didn't see that the environment variable for the CDRIVER was set.
So that's probably the reason.
Thanks again.


On 5/10/2016 3:07 PM, Andrew Morrow wrote:

Did you explicitly select /usr/local as your installation prefix with when invoking CMake by setting -DCMAKE_INSTALL_PREFIX=/usr/local (or the equivalent in the GUI)?

Otherwise, the driver should default to building to a directory called 'install' under the current build directory:

https://github.com/mongodb/mongo-cxx-driver/blob/master/CMakeLists.txt#L64-L68

But, yes, if you explicitly selected an install prefix that the current user cannot write to, you will need to use sudo, and you need to do it at build time, not just install time, since the ExternalProject_Add step which is invoked at build time needs to itself run an install of MNMLSTC/core.

Thanks,
Andrew



On Tue, May 10, 2016 at 8:58 AM, Xauxatz <claus.skaaning@xxxxxxxxx <mailto:claus.skaaning@xxxxxxxxx>> wrote:

    Hi Andrew

    I checked the log file of EP_mnmlstc_core as you suggested and the
    contents indicated that cmake could not create a directory
    /usr/local/include/bsoncxx...

    I am now running make (of mongo-cxx-driver) with sudo - and it works.

    So perhaps you should update the build guide - and I should learn
    to check the log files :-)

    Many thanks!





    On Tuesday, May 10, 2016 at 2:19:48 PM UTC+2, acm wrote:


        In your clean VM, please show me:

        - How you ran CMake. Somewhere, you typed 'cmake' followed by
        some arguments. What were the arguments, and what was the
        result printed to the console? Or did you use the CMake gui?

        - After you ran cmake, you typed make, or ninja, or something
        else, to build the driver with the build system that CMake
        generated. What did you type, and what was the result?

        - In the case above where the build provided a reference to
        log files, what was in those files
        (/home/osboxes/VisualGDB/d/Code/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-*.log).

        - What error are you getting in your clean VM?

        - Do you have git installed and available in your path?

        Thanks,
        Andrew


        On Tue, May 10, 2016 at 8:15 AM, Xauxatz
        <claus.s...@xxxxxxxxx> wrote:

            I now tried with a completely clean Ubuntu virtual machine
            and followed precisely the instructions for installing the
            new C++ driver (here
            <https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-%28New-Driver%29>)


            No matter what I do I run into the problem with
            EP_mnmlstc_core. The build process is broken.

            gcc: 5.3.1
            cmake: 3.5.1
            ubuntu: 16.04 (64 bit)




            On Tuesday, May 10, 2016 at 10:08:47 AM UTC+2, Xauxatz wrote:

                I use cmake version 3.2.2.  I am not sure how to find
                the "CMake invocation", sorry...
                I followed the instructions on this page precisely
                though:
                https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-(New-Driver)
                <https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-%28New-Driver%29>

                I just tried to repeat the process from the beginning,
                first compiling the C driver, then the C++ driver.
                But now I am stuck with this when doing a "make" in
                "mongo-cxx-driver/build":

                |
                [3%]Performinginstall step for'EP_mnmlstc_core'
                CMakeErrorat
                /home/osboxes/VisualGDB/d/Code/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install.cmake:16(message):
                Commandfailed:2


                'make''install'


                Seealso


                /home/osboxes/VisualGDB/d/Code/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-*.log

                |

                I see that this problem has been reported before but
                the suggested answer was to update the toolchain (here
                <https://jira.mongodb.org/plugins/servlet/mobile#issue/CXX-682/comment/1043516>).
                I believe I have the newest versions of all tools
                required, including cmake.
                So how can I fix the above problem and finally get it
                all to work. I've spent days on trying to get this
                running by now.



                On Monday, May 9, 2016 at 5:26:11 PM UTC+2, acm wrote:


                    Hi -

                    Could you please provide some additional
                    information that will help us diagnose the issue?
                    In particular, could you provide:

                    - The CMake invocation you used to generate the
                    C++11 driver build system, and its output.
                    - The make/ninja or other commend you executed to
                    build and install the C++11 driver
                    - The command line that you used to build the
                    application and link it to the installed C++11 driver.

                    That abi:cxx11 tag makes me think that you have
                    mixed libstdc++ ABI versions somewhere.

                    Thanks,
                    Andrew


                    On Mon, May 9, 2016 at 7:17 AM, Xauxatz
                    <claus.s...@xxxxxxxxx> wrote:

                        When I try to compile my C++ program, I get an
                        error when linking with the MongoDB new C++
                        driver (mongocxx) that there is an undefined
                        reference.


                        The problem is easy to reproduce. Just try to
                        compile the test example with in the
                        quickstart guide
                        (https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-(New-Driver)
                        <https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-%28New-Driver%29>).
                        This is the error code:


                        |hellomongo.cpp:(.text+0x3f):undefined
                        reference to
                        `mongocxx::v_noabi::uri::k_default_uri[abi:cxx11]'|


                        I am using the newest 3.0.1 version of the C++
                        driver. The error was also there with 3.0.0.


                        Host: Ubuntu 64 bit

                        gcc: 5.1.1


                        Thanks for any help!


-- You received this message because you are
                        subscribed to the Google Groups "mongodb-user"
                        group.

                        For other MongoDB technical support options,
                        see: https://docs.mongodb.org/manual/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...@xxxxxxxxxxxxxxxx.
                        To post to this group, send email to
                        mongod...@xxxxxxxxxxxxxxxx.
                        Visit this group at
                        https://groups.google.com/group/mongodb-user.
                        To view this discussion on the web visit
                        https://groups.google.com/d/msgid/mongodb-user/492a1364-1c12-4b36-ab80-9eebda3bcc19%40googlegroups.com
                        <https://groups.google.com/d/msgid/mongodb-user/492a1364-1c12-4b36-ab80-9eebda3bcc19%40googlegroups.com?utm_medium=email&utm_source=footer>.
                        For more options, visit
                        https://groups.google.com/d/optout.


-- You received this message because you are subscribed to
            the Google Groups "mongodb-user"
            group.

            For other MongoDB technical support options, see:
            https://docs.mongodb.org/manual/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...@xxxxxxxxxxxxxxxx.
            To post to this group, send email to
            mongod...@xxxxxxxxxxxxxxxx.
            Visit this group at
            https://groups.google.com/group/mongodb-user.
            To view this discussion on the web visit
            https://groups.google.com/d/msgid/mongodb-user/3faaba52-2356-4c65-b442-98184e5b0996%40googlegroups.com
            <https://groups.google.com/d/msgid/mongodb-user/3faaba52-2356-4c65-b442-98184e5b0996%40googlegroups.com?utm_medium=email&utm_source=footer>.


            For more options, visit https://groups.google.com/d/optout.


-- You received this message because you are subscribed to the Google
    Groups "mongodb-user"
    group.

    For other MongoDB technical support options, see:
    https://docs.mongodb.org/manual/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+unsubscribe@xxxxxxxxxxxxxxxx
    <mailto:mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx>.
    To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx
    <mailto:mongodb-user@xxxxxxxxxxxxxxxx>.
    Visit this group at https://groups.google.com/group/mongodb-user.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/mongodb-user/25c3c4a2-11ce-4342-b9c1-a343b177998d%40googlegroups.com
    <https://groups.google.com/d/msgid/mongodb-user/25c3c4a2-11ce-4342-b9c1-a343b177998d%40googlegroups.com?utm_medium=email&utm_source=footer>.


    For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/BQvTonyD9pE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx <mailto:mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx>.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx <mailto:mongodb-user@xxxxxxxxxxxxxxxx>.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHX05qHJ0V0%2B2VhExhhAAHpEKhUnt6_FxfxasYmmODgCbsZQCQ%40mail.gmail.com <https://groups.google.com/d/msgid/mongodb-user/CAHX05qHJ0V0%2B2VhExhhAAHpEKhUnt6_FxfxasYmmODgCbsZQCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/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+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c60525c7-7775-c20f-e1da-3ec0e3c707ea%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?