LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help installing from source (https://www.linuxquestions.org/questions/linux-newbie-8/help-installing-from-source-4175637319/)

vysero 08-28-2018 11:30 AM

Help installing from source
 
I want to attempt installing this newer version of Qt from source based off of this guide: http://doc.qt.io/qt-5/linux-building.html

However, I have some questions. My first question is that in the guide it says: "By default, Qt is configured for installation in the /usr/local/Qt-%VERSION% directory"

Which seems odd to me because my current version of Qt is in a folder called Trolltech usr/local/Trooltech

Inside the directory is Qt-4.7.2 so should I delete this Trolltech folder all together? I am assuming I need to get rid of Qt-4.7.2 before I download the newer version?

BW-userx 08-28-2018 11:39 AM

No, I'd think not. it is a different version, as it says it has a default install dir, this one you have installed therefore HAS been modified. Someone correct me if I am wrong, but it should be able to run long side the other version.

I'd download your different version, and compile it according to the instructions for doing so. the PATH to is what is important when using it. and whatever else it may use to gain the path to its executable.

http://doc.qt.io/qtcreator/creator-run-settings.html

hydrurga 08-28-2018 11:41 AM

Out of interest, which distro are you using and why do you want to update Qt?

TB0ne 08-28-2018 11:54 AM

Quote:

Originally Posted by vysero (Post 5897081)
I want to attempt installing this newer version of Qt from source based off of this guide: http://doc.qt.io/qt-5/linux-building.html

However, I have some questions. My first question is that in the guide it says: "By default, Qt is configured for installation in the /usr/local/Qt-%VERSION% directory" Which seems odd to me because my current version of Qt is in a folder called Trolltech usr/local/Trooltech Inside the directory is Qt-4.7.2 so should I delete this Trolltech folder all together? I am assuming I need to get rid of Qt-4.7.2 before I download the newer version?

Haven't we been here before???
https://www.linuxquestions.org/quest...ns-4175636832/

You were told back then that you need to install this from packages, not from source, and asked why. You never answered. Still a valid question now: WHY are you attempting to do this, rather than installing from packages? Unless you are a serious software developer, and you *NEED* some bleeding-edge feature that's only available in the absolute latest version/beta version, there is no reason to use anything but what's in the software repositories.

vysero 08-28-2018 11:58 AM

Quote:

Originally Posted by hydrurga (Post 5897089)
Out of interest, which distro are you using and why do you want to update Qt?

Ubuntu 16.04

Its a long story. Essentially, I am running into this problem: https://bugreports.qt.io/browse/QTBU...comment-206970

The current version I have installed was installed with errors.

hydrurga 08-28-2018 12:05 PM

Why don't you tell us more of the long story (from the start)?

dugan 08-28-2018 12:05 PM

Quote:

Originally Posted by TB0ne (Post 5897097)
Unless you are a serious software developer, and you *NEED* some bleeding-edge feature that's only available in the absolute latest version/beta version, there is no reason to use anything but what's in the software repositories.

And in that case, I'd recommend setting up a VM with a more bleeding-edge distro and using Qt in that.

vysero 08-28-2018 12:10 PM

Quote:

Originally Posted by BW-userx (Post 5897088)
No, I'd think not. it is a different version, as it says it has a default install dir, this one you have installed therefore HAS been modified. Someone correct me if I am wrong, but it should be able to run long side the other version.

I'd download your different version, and compile it according to the instructions for doing so. the PATH to is what is important when using it. and whatever else it may use to gain the path to its executable.

http://doc.qt.io/qtcreator/creator-run-settings.html

Okay assuming I don't delete that folder. As I have stated I am running into this bug: http://https://bugreports.qt.io/brow...comment-206970

So my solution according to that is to add: QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98 to the qmake.conf file. I am assuming I will have access to that folder after I have unpacked the tarball?

ondoho 08-28-2018 12:12 PM

Quote:

Originally Posted by vysero (Post 5897099)
Its a long story. Essentially, I am running into this problem: https://bugreports.qt.io/browse/QTBU...comment-206970

how can compiling from source help fix a bug that only crops up when compiling from source?
:confused:

...and in any case, this still doesn't explain why you think need to compile qt from source in the first place.

vysero 08-28-2018 12:21 PM

Quote:

Originally Posted by ondoho (Post 5897112)
how can compiling from source help fix a bug that only crops up when compiling from source?
:confused:

...and in any case, this still doesn't explain why you think need to compile qt from source in the first place.

No I need to compile from source because there are specific installation options that I need to change like:

QT_CONFIG_OPTIONS += -svg
QT_CONFIG_OPTIONS += -no-qt3support
QT_CONFIG_OPTIONS += -opengl
QT_CONFIG_OPTIONS += -nomake examples
QT_CONFIG_OPTIONS += -nomake demos
QT_CONFIG_OPTIONS += -nomake translations

Also the bug pops up regardless if you compile from source. I am working with old legacy products and legacy code but the machine I am working on has a newer version of gcc. So rather than downgrade my current version of gcc I am attempting the fix that was recommended for this bug.

dugan 08-28-2018 12:28 PM

Quote:

Originally Posted by vysero (Post 5897118)
I am working with old legacy products and legacy code but the machine I am working on has a newer version of gcc. So rather than downgrade my current version of gcc...

Build an older version of GCC. Put it in /opt/gcc-4.5 or a similarly isolated directory.

vysero 08-28-2018 12:39 PM

Quote:

Originally Posted by dugan (Post 5897119)
Build an older version of GCC. Put it in /opt/gcc-4.5 or a similarly isolated directory.

That is a good lead-in into something that confused me about the bug fix. According to the bug fix all I need to do is put: QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98 into the qtmake.conf file. What is gnu++98? Is that line supposed to force the compiler to use a specific version of gcc? If that's the case how will that even work if my version of gcc is 8.1?

dugan 08-28-2018 12:55 PM

Oh dear. Was that your misunderstanding?

All that means is that g++ would be called with -std=gnu++98. So:

Code:

g++ -std=gnu++98 whatever.cpp
It tells the c++ compiler to assume that the code conforms to the C++ 98 standard.

It should be supported in gcc 8.1.

vysero 08-28-2018 02:13 PM

Quote:

Originally Posted by dugan (Post 5897139)
Oh dear. Was that your misunderstanding?

All that means is that g++ would be called with -std=gnu++98. So:

Code:

g++ -std=gnu++98 whatever.cpp
It tells the c++ compiler to assume that the code conforms to the C++ 98 standard.

It should be supported in gcc 8.1.

Well sort of. Its hard for me to give a perfect definition of what my problem is because I myself am not 100% sure what my problem is. Here is what I know. My machine errors out when I try to compile the version of Qt that I need in order to build one of our legacy products. I took the error I was given and dropped it into a google search and I found the solution that I referred to earlier.

So basically, I am looking for a way to implement that solution.

ondoho 08-28-2018 11:54 PM

Quote:

Originally Posted by vysero (Post 5897187)
Its hard for me to give a perfect definition of what my problem is because I myself am not 100% sure what my problem is.

but your computer is.
that's why we ask for output (and not narrative) to help you understand.


All times are GMT -5. The time now is 03:33 AM.