由于出现严格的别名错误,从源生成fiware IoTAgent Cplusplus失败

由于出现严格的别名错误,从源生成fiware IoTAgent Cplusplus失败,fiware,strict-aliasing,Fiware,Strict Aliasing,我试图从源代码构建fiware IoTAgent Cplusplus,但我遇到了严格的别名错误。有什么想法吗 我用于执行构建的命令如下所示 请注意,我正在使用CentOS 6.7构建lxc $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`

我试图从源代码构建fiware IoTAgent Cplusplus,但我遇到了严格的别名错误。有什么想法吗

我用于执行构建的命令如下所示

请注意,我正在使用CentOS 6.7构建lxc

$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

我明白了。我用的是32位CentOS