Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc compilation error #28

Open
cnd opened this issue Sep 28, 2018 · 4 comments
Open

gcc compilation error #28

cnd opened this issue Sep 28, 2018 · 4 comments

Comments

@cnd
Copy link

cnd commented Sep 28, 2018

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
@pikatchu
Copy link
Collaborator

I will need more details on your install, version of gcc you are using etc ...

@cnd
Copy link
Author

cnd commented Sep 28, 2018

@pikatchu it's seen in log, 8.2.0, what else you need to know?

@Pavlos1
Copy link
Contributor

Pavlos1 commented Sep 30, 2018

@cnd This is the same error I reference in #26.

Workaround: Apply my patch to disable warnings as errors.
Long term fix: Probably update the version of folly used by skip (git submodules are pinned to a specific commit).

@cnd
Copy link
Author

cnd commented Sep 30, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants