Page 1 of 1
Qt GUI in MacOS Sierra
Posted: Tue Feb 20, 2018 11:01 pm
by nctrd
Hi,
I am trying to compile freeciv 2.5.10 from source, with Qt gui, like:
./configure --enable-aimodules=yes --enable-client=qt --enable-shared --disable-nls
It stops with:
> configure: error: selected client 'qt' cannot be built: Missing Qt5 development files
I've got qt5 from homebrew, it is linked by "brew link --force qt", I've got qtpath, qmake and other qt binnaries in my PATH (because of the linking), I did "export PKG_CONFIG_PATH=/usr/local/Cellar/qt/5.10.1/lib/pkgconfig/", but the configure script stops with the message above.
I've tried also:
./configure --enable-aimodules=yes --enable-client=qt --enable-shared --disable-nls --with-qt5-includes=/usr/local/Cellar/qt/5.10.1/include/ --with-qt5-libs=/usr/local/Cellar/qt/5.10.1/lib, again, with no success.
I did not manage to google the answer, and here is this post.
Please help.
Thank you in advance.
Re: Qt GUI in MacOS Sierra
Posted: Tue Feb 20, 2018 11:07 pm
by cazfi
Can I see config.log produced by the configure attempt?
Re: Qt GUI in MacOS Sierra
Posted: Wed Feb 21, 2018 10:18 pm
by nctrd
Please consider the attachement.
I've grepped it for qt and QT, there are apparently many errors.
Re: Qt GUI in MacOS Sierra
Posted: Wed Feb 21, 2018 10:33 pm
by nctrd
Dear cazfi,
Thank you for inspiring me.
The very first error in the log was, "error: Qt requires a C++11 compiler and yours does not seem to be that."
I googled it, and got this:
https://stackoverflow.com/questions/378 ... make-error
Solved by:
export CXXFLAGS=-std=c++11
Configure completed, see the second log.
However, make failed at freeciv-qt:
CXX dummycxx.o
CC gui_interface.o
CXXLD freeciv-qt
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"fc_client::SDL_main(QApplication*)", referenced from:
qtg_ui_main(int, char**) in libfcgui-qt.a(gui_main.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [freeciv-qt] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This topic,
https://stackoverflow.com/questions/189 ... or-project, says about origings of a similar problem, "can't split a templated class into a .cpp and a .h file".
However, my level in c is helloworld tops, and I'd rather not try fixing it myself.
Re: Qt GUI in MacOS Sierra
Posted: Thu Feb 22, 2018 2:00 am
by cazfi
nctrd wrote:Undefined symbols for architecture x86_64:
"fc_client::SDL_main(QApplication*)", referenced from:
qtg_ui_main(int, char**) in libfcgui-qt.a(gui_main.o)
Can you report this to the bugtracker at
http://www.hostedredmine.com/projects/f ... issues/new ?
Meanwhile, you can test if it goes through if you disable audio support at configure time with '--disable-sdl-mixer' option.
Re: Qt GUI in MacOS Sierra
Posted: Thu Feb 22, 2018 2:16 am
by cazfi
Opened the ticket myself, so I can attack the fix I'm making there.
http://www.hostedredmine.com/issues/734798
Re: Qt GUI in MacOS Sierra
Posted: Thu Feb 22, 2018 12:45 pm
by nctrd
Thank you.
I've disabled SDL and got another error, apparently at the very final linking:
CXXLD freeciv-qt
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"vtable for help_dialog", referenced from:
help_dialog::help_dialog(QWidget*) in libfcgui-qt.a(helpdlg.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for help_widget", referenced from:
help_widget::help_widget(QWidget*) in libfcgui-qt.a(helpdlg.o)
help_widget::help_widget(help_item const*, QWidget*) in libfcgui-qt.a(helpdlg.o)
help_widget::~help_widget() in libfcgui-qt.a(helpdlg.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for message_dlg", referenced from:
message_dlg::message_dlg() in libfcgui-qt.a(messagedlg.o)
message_dlg::~message_dlg() in libfcgui-qt.a(messagedlg.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for pregamevote", referenced from:
pregamevote::pregamevote(QWidget*) in libfcgui-qt.a(voteinfo_bar.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for option_dialog", referenced from:
option_dialog::option_dialog(QString const&, option_set const*, QWidget*) in libfcgui-qt.a(optiondlg.o)
option_dialog::~option_dialog() in libfcgui-qt.a(optiondlg.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for xvote", referenced from:
xvote::xvote(QWidget*) in libfcgui-qt.a(voteinfo_bar.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried googling it, the answers are quite different, too much of a dark magic for me.
Re: Qt GUI in MacOS Sierra
Posted: Thu Feb 22, 2018 1:15 pm
by nctrd
I've managed to compile freeciv 2.5.8, with
./configure --enable-aimodules=yes --enable-client=qt --enable-shared --disable-nls --disable-sdl-mixer
It works. However, the problem that initially brought me to the qt client is still present.
http://forum.freeciv.org/f/viewtopic.ph ... 99&p=97418
Namely, units do not move smoothly, they teleport after waiting for animation delay times number of steps. Apparently, this is not a gtk bug, its something else. Noteworthy, the problem is not present in linux.
Re: Qt GUI in MacOS Sierra
Posted: Fri Feb 23, 2018 9:31 pm
by cazfi
Can you test if the patch there fixes the build problem with audio enabled for you?