Closed dimitry-ishenko closed 9 months ago
This fixes issue #231 and allows the Client to be built with gcc>=5 and Qt>=5.5.
Any reason why this pretty harmless commit can't be merged? :smiley:
Any reason why this pretty harmless commit can't be merged? :smiley:
I have been on vacation for a couple of weeks but I'm back now! Only reason :smiley:
I wish I had so many vacations... :stuck_out_tongue_closed_eyes:
@dimitry-ishenko I have tried this and it doesn't build on Ubuntu 16.04.3 LTS. I haven't tried on Windows yet or OS X. I tested this using Qt 5.9.3 and gcc 5.4.0. It complains still on same error as #231
Best regards, Armin
It also needs to be rebased after some changes to next branch, fyi.
@dotarmin I've just tried with both my system-wide Qt 5.5.1, as well as Qt 5.9 in /opt/qt59 and it works fine. Could you give me moar detail on how you build?
I will rebase in the meantime.
@dotarmin I've rebased, but there were no conflicts of any kind... Maybe you have other commits in your branch that are not on github?
@dimitry-ishenko I've rebased, but there were no conflicts of any kind... Maybe you have other commits in your branch that are not on github?
It's totally my mistake, sorry.
@dimitry-ishenko I've just tried with both my system-wide Qt 5.5.1, as well as Qt 5.9 in /opt/qt59 and it works fine. Could you give me moar detail on how you build?
I will rebase in the meantime.
Strange, I have tried with Qt 5.9.3 that I installed under /opt/qt/5.9.3. I have also installed 5.5.1 from sources also under /opt/qt/5.5.1 with default configuration. I use gcc that's included by build-essential using apt and it's updated that way as well.
I open the Solution in Qt Creator (kit and everything is setup of course), when I build it still complains at the libgpio-client.so
. If I instead build the libgpio-client.so
from sources and copy over the libgpio-client.so.1.0.0
to the client libs folder, then it works.
/Armin
@dotarmin maybe try building with the set-variables-and-build-linux.sh
script in build-scripts
. You will need to adjust BUILD_QT_PATH
to point to your Qt install. If that works, then it must be something in the Qt Creator settings.
Good idea! Didn't even thought about that. I'll will try it when I'm at work. Thanks!
@dimitry-ishenko It does actually build as far as I can see by using the set-variables-and-build-linux.sh
script but when I try to run it using ./run.sh
under the build folder it complains at following:
Cannot mix incompatible Qt library (version 0x50401) with this library (version 0x50903)
It could be as simple as Qt 5.9 works well, just as you have tried but 5.9.3 does not.
I will install 5.9 and try same thing with that version. I will let you know how it went.
Update I tried this out with 5.9.0 installed as my other qt versions, under /opt. I still get the same error as above but with another version, 0x50900 instead of 0x50903.
Ideas?
Heh... I have the same thing with 5.9. I will try to look into it on Sunday.
Heh... I have the same thing with 5.9. I will try to look into it on Sunday.
Thanks! 😄
@dimitry-ishenko Have you looked at this yet?
@dotarmin sorry, my hands are full at the moment with other projects... :disappointed:
@dimitry-ishenko No problems, we can leave this PR open until you have time.
/Armin
Starting with version 5 gcc defaults to c++11 ABI. This affects
std::string
,std::list
and most of the standard library functions using these classes. The Client includes precompiledlibgpio-client.so
built with older ABI, which causes linkage failure. To force older ABI_GLIBCXX_USE_CXX11_ABI=0
macro has to be defined in each sub-project.Starting with Qt 5.5
QString::trimmed()
is defined in terms ofQString::trimmed_helper()
if the compiler supports reference qualifiers. While the Client includes precompiled Qt libraries, it relies on system-installed Qt headers, and unless one installs Qt 5.4 and builds against its headers, this causes runtime symbol lookup error in libcore.so. To work around that one has to defineQT_COMPILING_QSTRING_COMPAT_CPP
to disable reference qualifiers forQString
.