Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

DXXXF
Hi All,

I'm trying to compile from source. I'm a bit of a newb (if people still say that!?) when it comes to this sort of thing.

During make (i.e, after I type 'make -j4') I get errors relating to the .h files in generated/librecad/ui, which on investigation
relate to QtGui in the headers, and a UTF8 option lower down in the actual code.

Both of these errors are easily corrected for an individual file (the offending text can simply be removed and make proceeds fine), however as there are lots of files, and as these files are auto generated, I believe there must be an easier way to deal with this. For example both of the erroneous pieces of code seem to be things that would have worked with qt4, but have been dropped from qt5. If anyone could give me a pointer I would be grateful.

Do note that I've got a working version from package, and am happy to bash my head against a wall googling error messages and whatnot, so please don't expend any effort on this unless you happen to have something on the tip of your tongue!

Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

fa201
Hi,

In case it helps, you can get a list of necessary packages at : https://librecad.readthedocs.io/en/latest/appx/build.html#building-on-linux

Goog luck.
Fabrice

French hobbyist interested in 2D design.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

DXXXF
Hi Fabrice,

Thanks for your message.

The build-from-source link you sent seems to be newer than one I was looking at (see below), so hopefully that's a step in the right direction! I'll let you know how it goes.

https://wiki.librecad.org/index.php?title=LibreCAD_Installation_from_Source
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

LordOfBikes
Administrator
Both Linux instructions, in the wiki and the manual, look identical for me, so I assume, this will not solve your issues.
I just checked the instructions on a fresh Ubuntu 20.04 and they worked without modification.

But you mentioned Qt4, while 2.0.x should build fine with Qt4 and possibly 2.1.x code too, Qt5 is mandatory for any later code.
So you have to check, that Qt5 is used to build LibreCAD.
You should see the used Qt version when you enter
qmake -v
If Qt4 is your default Qt version, you can use qtchooser to switch over to Qt5.
Both, Qt5 and qtchooser are installed with above linked instructions.

investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

DXXXF
Cheers for taking a look, LordOfBikes.

I'll give you a bit of a scattergun blast of thoughts and clarifications, but will reiterate that I've got LibreCAD from package working fine, so from my point of view there is no 'need' to get LibreCAD from source working. I'm not so much yelling for help as typing out my thought process on the off-chance that somebody's had the exact same issue as me.

Anyway.

Both sets of instructions look the same to you, too? Cool - I'll not try to dig any deeper here.

Working without modification on Ubuntu 20.04? Cool - I'm on Ubuntu 18.04 (with elements of MATE and Xubuntu in the mix if that makes a difference?), so unless any of this sets anyone's alarm bells ringing I'll assume it's neither the OS, nor the instructions on the wiki, nor the code. Which I think leaves Qt, Qmake, make and g++, right?

'qmake -v'? Says I've got Qmake 3.1 and Qt 5.9.5

'...mentioned Qt4...'? To clarify the issue seems to be (and I could very easily have the wrong end of the stick here) that some of the header files (e.g. .../generated/librecad/ui/ui_qg_commandwidget.h) have out of date code in them (e.g. '#include <QtGui/QAction>'). i.e, these header files seem to have been made for Qt4, rather than Qt5. The comment block
at the top of these header files say that they were 'Created by Qt user interface compiler v 4.8.7' from .ui files.

My next actions will be to investigate the .ui files and 'qt user interface compiler', unless anyone has any better ideas?

Like I mentioned above, there's really no need to jump in on this unless you've got something right on the tip of your tongue. I'm sure my issues are nothing that a bit of googling error messages won't fix!

Either way, once I find out what I'm doing wrong I'll be sure to post it here.





Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

DXXXF
Success!

I found out what versions of user interface compiler I had by doing 'uic -v', and it told me I had 5 point something, which is obviously different to the 4 point something that supposedly created those header files. I ran clean.sh and did 'qmake' and 'make' again, as in the wiki, and it compiled fine, and it now runs.

I don't know how I had an old version of uic, or how it got updated, but everything's working now. Cheers guys!
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install from source, errors, possibly qt4 -> q5 issue? (QtGui in header)

LordOfBikes
Administrator
Great!

This would have been my next recommendation, to run qmake again and make clean for a complete rebuild.
investing less than half an hour into Search function can save hours or days of waiting for a solution