Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1510

Unable to Compile - 'bson_decimal128_t' was not declared in this scope

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.1.0
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      Ubuntu 16.04 32-bit

      I am unable to build. See below:

      $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. -DBSONCXX_POLY_USE_MNMLSTC=1 -DLIBMONGOC_DIR=/usr -DLIBBSON_DIR=/usr
      -- The CXX compiler identification is GNU 5.4.0
      -- Check for working CXX compiler: /usr/bin/c++
      -- Check for working CXX compiler: /usr/bin/c++ -- works
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- The C compiler identification is GNU 5.4.0
      -- Check for working C compiler: /usr/bin/cc
      -- Check for working C compiler: /usr/bin/cc -- works
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Found LIBBSON: bson-1.0  
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
      -- Found LIBMONGOC: mongoc-1.0  
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/bit/mongo-cxx-driver/build
      
      Scanning dependencies of target EP_mnmlstc_core
      [  0%] Creating directories for 'EP_mnmlstc_core'
      [  1%] Performing download step (git clone) for 'EP_mnmlstc_core'
      -- EP_mnmlstc_core download command succeeded.  See also /home/bit/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-download-*.log
      [  1%] No patch step for 'EP_mnmlstc_core'
      [  1%] No update step for 'EP_mnmlstc_core'
      [  2%] Performing configure step for 'EP_mnmlstc_core'
      -- EP_mnmlstc_core configure command succeeded.  See also /home/bit/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-configure-*.log
      [  2%] Performing build step for 'EP_mnmlstc_core'
      -- EP_mnmlstc_core build command succeeded.  See also /home/bit/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-build-*.log
      [  2%] Performing install step for 'EP_mnmlstc_core'
      -- EP_mnmlstc_core install command succeeded.  See also /home/bit/mongo-cxx-driver/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-*.log
      [  2%] Performing fix-includes step for 'EP_mnmlstc_core'
      [  2%] Completed 'EP_mnmlstc_core'
      [  2%] Built target EP_mnmlstc_core
      Scanning dependencies of target bsoncxx_static
      [  2%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx_static.dir/array/element.cpp.o
      [  2%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx_static.dir/array/value.cpp.o
      [  3%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx_static.dir/array/view.cpp.o
      [  3%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx_static.dir/builder/core.cpp.o
      /home/bit/mongo-cxx-driver/src/bsoncxx/builder/core.cpp: In member function 'void bsoncxx::v_noabi::builder::core::append(const bsoncxx::v_noabi::types::b_decimal128&)':
      /home/bit/mongo-cxx-driver/src/bsoncxx/builder/core.cpp:348:5: error: 'bson_decimal128_t' was not declared in this scope
           bson_decimal128_t d128;
           ^
      /home/bit/mongo-cxx-driver/src/bsoncxx/builder/core.cpp:349:5: error: 'd128' was not declared in this scope
           d128.high = value.value.high();
           ^
      /home/bit/mongo-cxx-driver/src/bsoncxx/builder/core.cpp:352:74: error: 'bson_append_decimal128' was not declared in this scope
           bson_append_decimal128(_impl->back(), key.data(), key.length(), &d128);
                                                                                ^
      src/bsoncxx/CMakeFiles/bsoncxx_static.dir/build.make:134: recipe for target 'src/bsoncxx/CMakeFiles/bsoncxx_static.dir/builder/core.cpp.o' failed
      make[2]: *** [src/bsoncxx/CMakeFiles/bsoncxx_static.dir/builder/core.cpp.o] Error 1
      CMakeFiles/Makefile2:437: recipe for target 'src/bsoncxx/CMakeFiles/bsoncxx_static.dir/all' failed
      make[1]: *** [src/bsoncxx/CMakeFiles/bsoncxx_static.dir/all] Error 2
      Makefile:138: recipe for target 'all' failed
      make: *** [all] Error 2
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            cplasplas Brandon Boudreaux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: