gcc compilation error
cnd opened this issue · comments
third-party/install/include/folly/synchronization/AtomicStruct.h:77:11: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘struct std::chrono::duration<long int, std::ratio<1, 1000000000> >’ with ‘private’ member ‘std::chrono::duration<long int, std::ratio<1, 1000000000> >::__r’ from an array of ‘using Raw = folly::_t<folly::detail::AtomicStructRaw<3> >’ {aka ‘long unsigned int’}; use assignment or copy-initialization instead [-Werror=class-memaccess]
memcpy(&v, &d, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from third-party/install/include/folly/detail/Futex.h:21,
from third-party/install/include/folly/MicroLock.h:24,
from ../lkg/runtime/native/include/skip/InternTable.h:17,
from ../lkg/runtime/native/include/skip/objects.h:14,
from ../lkg/runtime/native/include/skip/String.h:13,
from ../lkg/runtime/native/include/skip/Exception.h:11,
from ../lkg/runtime/native/src/sk_standalone.cpp:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/chrono:302:14: note: ‘struct std::chrono::duration<long int, std::ratio<1, 1000000000> >’ declared here
struct duration
^~~~~~~~
cc1plus: all warnings being treated as errors
I will need more details on your install, version of gcc you are using etc ...
yes I'm using the workaround alike
sed -i -e 's|-Werror||g' "CMake/SkipCompiler.cmake || die
sed -i -e 's|-Werror||g' "third-party/folly/src/CMake/FollyCompilerUnix.cmake || die
sed -i -e 's|-Werror=unknown-warning-option||g' "third-party/folly/src/folly/configure.ac || die