Page 1 of 1

Building on Gentoo with recent Qt

Posted: Thu Jun 04, 2015 7:59 pm
by massimo
I used to build the git source fine on gentoo with dev-qt/qtcore-4.8.6-r1 installed.
Since dev-qt/qtcore-4.8.7 I get the error

Code: Select all

qmake -r
Reading /home.crypt/massimo/opt/qcad/src/src.pro
 Reading /home.crypt/massimo/opt/qcad/src/3rdparty/3rdparty.pro
Project ERROR: Script bindings not available for Qt version 4.8.7. You can add them to src/3rdparty/qt-labs-qtscriptgenerator-4.8.7 or use another version of Qt.
Currently available Qt on Gentoo:

Code: Select all

[U] dev-qt/qtcore
     Available versions:  
     (4)    4.8.5-r2 4.8.6-r2 (~)4.8.7
     (5)    (~)5.4.1^t
Do I need to mask the 4.8.6 globally for building QCad? What version do I need? I can have some Qt4 and Qt5 slotted side by side, but not 2 of the Qt4. The old guide still says 4.8.4, isn't that outdated? Can I build a QCad with a local Qt in $HOME?

Re: Building on Gentoo with recent Qt

Posted: Thu Jun 04, 2015 8:37 pm
by massimo
It seems this 3rdparty had some binary parts. In qt-labs-qtscriptgenerator-4.8.6 are .o files are "ELF 64-bit LSB relocatable, x86-64".
So I was just lucky in the past that I was able to build that on my platform with that 4.8.6..., now with 4.8.7 it's not possible and would not be possible on other architectures.

What is this 3rdparty? Can I disable parts, just to get a working basic QCad build?

Re: Building on Gentoo with recent Qt

Posted: Fri Jun 05, 2015 7:47 am
by andrew
massimo wrote:It seems this 3rdparty had some binary parts.
No. There should not be any object files in a clean git checkout.
What is this 3rdparty? Can I disable parts, just to get a working basic QCad build?
No, the script bindings are fundamental to QCAD.

You can likely use the bindings for Qt 4.8.6, just copy or rename qcad/src/3rdparty/qt-labs-qtscriptgenerator-4.8.6 appropriately. Don't forget to rename the file qt-labs-qtscriptgenerator-4.8.6.pro as well.

Re: Building on Gentoo with recent Qt

Posted: Fri Jun 05, 2015 12:27 pm
by massimo
andrew wrote:You can likely use the bindings for Qt 4.8.6, just copy or rename qcad/src/3rdparty/qt-labs-qtscriptgenerator-4.8.6 appropriately. Don't forget to rename the file qt-labs-qtscriptgenerator-4.8.6.pro as well.
Thanks. I tried that before but I forgot to rename the file. Compilation worked now.
However the binary fails with:

Code: Select all

Fatal:    Cannot mix incompatible Qt library (version 0x40806) with this library (version 0x40807)

Re: Building on Gentoo with recent Qt

Posted: Fri Jun 05, 2015 3:16 pm
by andrew
Looks like you have object or library files from an older Qt version still around. A full clean / make should help.

Re: Building on Gentoo with recent Qt

Posted: Fri Jun 05, 2015 3:48 pm
by massimo
I forgot to say, this was a complete fresh clone from git.

Re: Building on Gentoo with recent Qt

Posted: Fri Jun 05, 2015 5:16 pm
by andrew
There's definitely a Qt version mixup. This has nothing to do with sources but with already compiled libraries.