Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9078

[fiware-stackoverflow] Building fiware-IoTAgent-Cplusplus from source failed due to strict-aliasing error

    Details

      Description

      Created question in FIWARE Q/A platform on 13-12-2015 at 08:12
      Please, ANSWER this question AT https://stackoverflow.com/questions/34248833/building-fiware-iotagent-cplusplus-from-source-failed-due-to-strict-aliasing-err

      Question:
      Building fiware-IoTAgent-Cplusplus from source failed due to strict-aliasing error

      Description:
      I'm trying to build fiware-IoTAgent-Cplusplus from source but I am getting strict-aliasing error. Any idea?

      The commands I used to perform the build are as follows.

      Note that I am building inside a lxc using CentOS 6.7.

      $source tools/get_version_string.sh
      $cmake -DGIT_VERSION=`get_rpm_version_string | cut -d ' ' -f 1` -DGIT_COMMIT=`get_rpm_version_string | cut -d
      ' ' -f 2` -DMQTT=ON -DCMAKE_BUILD_TYPE=Release ../../
      $make
      :
      :
      scons: done reading SConscript files.
      scons: Building targets ...
      g++ -o build/linux2/normal/mongo/bson/bsonelement.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -ggdb -pthread -Wall -Wsign-compare -Wn
      o-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-function -Wno-deprecated-declarations -Wno-missing-braces -DMONGO_EXPOSE_MACRO
      S -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DBOOST_THREAD_USES_DATETIME -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK
      -DMONGO_HAVE_TIMEGM -DLIBMONGOCLIENT_BUILDING -DSTATIC_LIBMONGOCLIENT -Ibuild/linux2/normal/third_party/gtest-1.7.0/include -Isrc/third_part
      y/gtest-1.7.0/include -Ibuild/linux2/normal -Isrc -Ibuild/linux2/normal/mongo -Isrc/mongo -I/root/fiware/fiware-IoTAgent-Cplusplus/build/Rel
      ease/third_party/boost/include -I/root/fiware/fiware-IoTAgent-Cplusplus/build/Release/third_party/boost/include src/mongo/bson/bsonelement.c
      pp
      cc1plus: warnings being treated as errors
      In file included from /root/fiware/fiware-IoTAgent-Cplusplus/build/Release/third_party/boost/include/boost/functional/hash.hpp:6,
      from src/mongo/bson/bsonelement.cpp:20:
      /root/fiware/fiware-IoTAgent-Cplusplus/build/Release/third_party/boost/include/boost/functional/hash/detail/hash_float.hpp: In function 'voi
      d boost::hash_combine(size_t&, const T&) [with T = double]':
      /root/fiware/fiware-IoTAgent-Cplusplus/build/Release/third_party/boost/include/boost/functional/hash/detail/hash_float.hpp:71: error: derefe
      rencing pointer 'ptr.266' does break strict-aliasing rules
      /root/fiware/fiware-IoTAgent-Cplusplus/build/Release/third_party/boost/include/boost/functional/hash/detail/hash_float.hpp:71: note: initial
      ized from here
      scons: *** [build/linux2/normal/mongo/bson/bsonelement.o] Error 1
      scons: building terminated because of errors.
      make[2]: *** [third_party/mongo-driver/src/mongo-driver-stamp/mongo-driver-build] Error 2
      make[1]: *** [CMakeFiles/mongo-driver.dir/all] Error 2
      make: *** [all] Error 2

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:17|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:17|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:11|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:11|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:11|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:11|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            backlogmanager Backlog Manager
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: