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 UI in ubuntu 14.04 #147

Closed
zezhou opened this issue Feb 20, 2019 · 7 comments
Closed

can't build UI in ubuntu 14.04 #147

zezhou opened this issue Feb 20, 2019 · 7 comments

Comments

@zezhou
Copy link

zezhou commented Feb 20, 2019

I use cmake -DCMAKE_BUILD_TYPE="Release" .. and it's ok.
then I use make command, and it run failed.

[ 30%] Building CXX object profiler_gui/CMakeFiles/profiler_gui.dir/arbitrary_value_inspector.cpp.o
In file included from easy_profiler/profiler_gui/dialog.h:55:0,
fromeasy_profiler/profiler_gui/arbitrary_value_inspector.cpp:79:
easy_profiler/profiler_gui/window_header.h:87:19: error: ISO C++ forbids declaration of 'Q_FLAG' with no type [-fpermissive]
Q_FLAG(Buttons)
^
easy_profiler/profiler_gui/window_header.h:87:19: error: expected ';' at end of member declaration
make[2]: *** [profiler_gui/CMakeFiles/profiler_gui.dir/arbitrary_value_inspector.cpp.o] Error 1
make[1]: *** [profiler_gui/CMakeFiles/profiler_gui.dir/all] Error 2
make: *** [all] Error 2

I used to think it's gcc/qt version's problem, but after I upgrade gcc/qt, it still don't work.

gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~14.04)
Using Qt version 5.9.1 in /opt/Qt5.9.1/5.9.1/gcc_64/lib

I don't know what I can do now to make it work.

@cas4ey
Copy link
Collaborator

cas4ey commented Feb 20, 2019

Hi @zezhou

Please, try to replace Q_DECLARE_FLAGS(Buttons, Button) at profiler_gui/window_header.h:86 with using Buttons = QFlags<Button>;. If this error still occur, try to add #include <QObject> (or even #include <qobjectdefs.h>) in the same file.

@zezhou
Copy link
Author

zezhou commented Feb 21, 2019

@cas4ey Thanks. It solve the problem, but there still have other compile fails.

@zezhou zezhou closed this as completed Feb 21, 2019
@cas4ey
Copy link
Collaborator

cas4ey commented Feb 21, 2019

@zezhou do you mean that replacing of Q_DECLARE_FLAGS helped // or including additional header ? Which one?

It would be great if you will create a pull request with fixes (or at least post them here).

@cas4ey cas4ey reopened this Feb 21, 2019
@cas4ey
Copy link
Collaborator

cas4ey commented Feb 21, 2019

but there still have other compile fails.

Which ones?

@zezhou
Copy link
Author

zezhou commented Feb 25, 2019

try to replace Q_DECLARE_FLAGS(Buttons, Button) at profiler_gui/window_header.h:86 with using Buttons = QFlags<Button>;

I try this solution, and it stop at another position:

easy_profiler/profiler_gui/blocks_graphics_view.cpp:80:26: fatal error: QSignalBlocker: No such file or directory
compilation terminated.
make[2]: *** [profiler_gui/CMakeFiles/profiler_gui.dir/blocks_graphics_view.cpp.o] Error 1
make[1]: *** [profiler_gui/CMakeFiles/profiler_gui.dir/all] Error 2
make: *** [all] Error 2

I think it may be the qt version confliction, though I upgrade qt to 5.9.1.

@cas4ey
Copy link
Collaborator

cas4ey commented Feb 25, 2019

Do you have Qt less than v5.3 installed at the same time?
I think you might not set up all environment variables properly after upgrade to 5.9.1.
Try cmake -DCMAKE_PREFIX_PATH="<your-path-to-Qt>/lib/cmake"
For example, cmake -DCMAKE_PREFIX_PATH="/opt/Qt5.9.1/5.9.1/gcc_64/lib/cmake" ..

@zezhou
Copy link
Author

zezhou commented Feb 26, 2019

I try this

cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH="/opt/Qt5.9.1/5.9.1/gcc_64/lib/cmake" ..

and build success. thanks a lot.

@zezhou zezhou closed this as completed Feb 26, 2019
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