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

Can't build with g++ 6.3.0 on Ubuntu 17.04 #34

Closed
0X1A opened this issue Jun 16, 2017 · 2 comments
Closed

Can't build with g++ 6.3.0 on Ubuntu 17.04 #34

0X1A opened this issue Jun 16, 2017 · 2 comments

Comments

@0X1A
Copy link

0X1A commented Jun 16, 2017

Hi, following the build instructions I get the following errors:

alberto@0X4 ~/R/ThorsSerializer> make
Buiding src Start
make -C src build PREFIX=/home/alberto/Repos/ThorsSerializer/build CXXSTDVER=17
make[1]: Entering directory '/home/alberto/Repos/ThorsSerializer/src'
Buiding Serialize Start
make -C Serialize build PREFIX=/home/alberto/Repos/ThorsSerializer/build CXXSTDVER=17
make[2]: Entering directory '/home/alberto/Repos/ThorsSerializer/src/Serialize'
Building Objects for Testing and Coverage
make[3]: Entering directory '/home/alberto/Repos/ThorsSerializer/src/Serialize'
ERROR
g++ -c BinaryTHash.cpp -o coverage/BinaryTHash.o -I/usr/local/include -fPIC -Wall -Wextra -Wstrict-aliasing -pedantic -Werror -Wunreachable-code -Wno-long-long -Wno-deprecated-register -I/home/alberto/Repos/ThorsSerializer/build/include -isystem /home/alberto/Repos/ThorsSerializer/build/include3rd -DCOVERAGE_Serialize -g -fprofile-arcs -ftest-coverage -DCOVERAGE_TEST -Wno-unused-private-field -Wno-unreachable-code -DTHOR_USE_CPLUSPLUS17 -std=c++17
========================================
In file included from test/../SerUtil.h:5:0,
                 from test/BinaryParserTest.h:6,
                 from BinaryTHash.cpp:10:
test/../Serialize.h: In destructor ‘ThorsAnvil::Serialize::DeSerializer::~DeSerializer()’:
test/../Serialize.h:280:108: error: throw will always call terminate() [-Werror=terminate]
         {   throw std::runtime_error("ThorsAnvil::Serialize::DeSerializer::~DeSerializer: Expected Doc End");
                                                                                                            ^
test/../Serialize.h:280:108: note: in C++11 destructors default to noexcept
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-unused-private-field’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-deprecated-register’ [-Werror]
cc1plus: all warnings being treated as errors
/home/alberto/Repos/ThorsSerializer/build/tools/Makefile:560: recipe for target 'coverage/BinaryTHash.o' failed
make[3]: *** [coverage/BinaryTHash.o] Error 1
make[3]: Leaving directory '/home/alberto/Repos/ThorsSerializer/src/Serialize'
/home/alberto/Repos/ThorsSerializer/build/tools/Makefile:343: recipe for target 'run_test' failed
make[2]: *** [run_test] Error 2
make[2]: Leaving directory '/home/alberto/Repos/ThorsSerializer/src/Serialize'
/home/alberto/Repos/ThorsSerializer/build/tools/Project.Makefile:33: recipe for target 'Serialize.dir' failed
make[1]: *** [Serialize.dir] Error 2
make[1]: Leaving directory '/home/alberto/Repos/ThorsSerializer/src'
/home/alberto/Repos/ThorsSerializer/build/tools/Project.Makefile:33: recipe for target 'src.dir' failed
make: *** [src.dir] Error 2

AFAIK all dependencies are solved and ./configure --disable-binary shows no errors.

Loki-Astari added a commit that referenced this issue Jun 16, 2017
    #34

    test/../Serialize.h: In destructor ‘ThorsAnvil::Serialize::DeSerializer::~DeSerializer()’:
    test/../Serialize.h:280:108: error: throw will always call terminate() [-Werror=terminate]
             {   throw std::runtime_error("ThorsAnvil::Serialize::DeSerializer::~DeSerializer: Expected Doc End");
@Loki-Astari
Copy link
Owner

I think I have fixed this.
I can't test on my end because I don't have access to your environment.

The easiest way to test is to delete everything and start from scratch.

Actions:
Test for the existence of these flags in autotools.
‘-Wno-unused-private-field’
‘-Wno-deprecated-register’

If they exist then add them to the variables: NO_UNUSED_PRIVATE_FIELD and NO_DEPRECIATED_REGISTER

Use these variables in the makefile(s)

The destructor ThorsAnvil::Serialize::DeSerializer::~DeSerializer() was made nothrow(false) The default since C++11 has been default(true) for destructors.

@0X1A
Copy link
Author

0X1A commented Jun 16, 2017

@Loki-Astari 👍 That fixed it! Thanks!

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

2 participants