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

pok3rconf fails to build on g++ 4.8 #1

Open
jpeirce opened this issue Jun 20, 2018 · 6 comments
Open

pok3rconf fails to build on g++ 4.8 #1

jpeirce opened this issue Jun 20, 2018 · 6 comments

Comments

@jpeirce
Copy link

jpeirce commented Jun 20, 2018

Needs to pass flags -std=gnu++11 or c++11.

[ 80%] Built target pok3rlib
[ 82%] Generating qrc_resource.cpp
[ 84%] Generating ui_mainwindow.h
[ 86%] Generating ui_keycustomize.h
Scanning dependencies of target pok3rconf
[ 88%] Building CXX object CMakeFiles/pok3rconf.dir/main.cpp.o
In file included from /home/jack/src/pok3rconf/pok3rtool/libchaos/chaos/string/zstring.h:9:0,
                 from /home/jack/src/pok3rconf/mainworker.h:8,
                 from /home/jack/src/pok3rconf/mainwindow.h:4,
                 from /home/jack/src/pok3rconf/main.cpp:1:
/home/jack/src/pok3rconf/pok3rtool/libchaos/chaos/./ztypes.h:23:6: error: #error LibChaos requires a C++11 compiler!

Looking into this, simplest solution would be to force set cmake_minimum_required to 3.1 and set(CMAKE_CXX_STANDARD 11).

However, doing so, it still fails to compile:

[ 80%] Built target pok3rlib
[ 82%] Generating qrc_resource.cpp
[ 84%] Generating ui_mainwindow.h
[ 86%] Generating ui_keycustomize.h
Scanning dependencies of target pok3rconf
[ 88%] Building CXX object CMakeFiles/pok3rconf.dir/main.cpp.o
[ 88%] Building CXX object CMakeFiles/pok3rconf.dir/mainwindow.cpp.o
[ 90%] Building CXX object CMakeFiles/pok3rconf.dir/mainworker.cpp.o
/home/jack/src/pok3rconf/mainworker.cpp:6:15: error: missing binary operator before token "("
 #if !QT_CONFIG(ssl)

Unfortunately, I was not able to figure this one out, I do believe I have all necessary QT dependencies.

@ChaoticEnigma
Copy link
Member

Interesting, on gcc 4.8 i added set_property(TARGET pok3rconf PROPERTY CXX_STANDARD 11), and it compiles for me, but I get a linker error that looks like the Qt libraries linking C++14 standard library features. So at least as built on Arch Linux, Qt doesn't support gcc 4.8

@jpeirce
Copy link
Author

jpeirce commented Jun 21, 2018

I get about the same error on gcc/g++ 5.3.1/6.2.1/7.3.1
/home/jack/src/pok3rconf/mainworker.cpp:6:15: error: missing binary operator before token "("
#if !QT_CONFIG(ssl)

This is on OpenSUSE 42.3.

I will look into this more later today, perhaps I am missing some library

@jpeirce
Copy link
Author

jpeirce commented Jun 23, 2018

FWIW it compiles fine if you comment out the check for SSL.
Lack of documentation has held me back from attempting to actually flash my board.

I'm upgrading my system to the newer version of OpenSuSe today, will see if that makes any difference.

@jpeirce
Copy link
Author

jpeirce commented Jun 24, 2018

Updated to OpenSUSE 15 and there is no longer an error.
15 now uses 7.3.1 as the default compiler, as opposed to 4.8.5 for the previous release 42.3. gcc4/5/6 are not even available in the repos, though there is a possibility that is due to my upgrade method.

Unsure if you want to close this or not.

@ChaoticEnigma
Copy link
Member

Hmm, qt must be using some compiler trick for that ssl check that 4.8 doesn't support. I'm not quite at the point where I need to determine which distros/versions I need to support, but I'll keep this in mind.

As for documentation, I've been holding back until I'm confident the firmware for each supported keyboard won't make the keyboard a brick. If I made it too easy to soon, I know people will try flashing unstable firmware.

@jpeirce
Copy link
Author

jpeirce commented Jun 24, 2018

I got the same error on gcc/g++ 7.3.1 on the older OpenSUSE, so I don't think it's just a compiler issue. Maybe some optional qt package got rolled into base or the old version had an incomplete package.

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