LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 08-28-2018, 11:30 AM   #1
vysero
Member
 
Registered: May 2018
Posts: 137

Rep: Reputation: Disabled
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?
 
Old 08-28-2018, 11:39 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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
 
Old 08-28-2018, 11:41 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Out of interest, which distro are you using and why do you want to update Qt?
 
Old 08-28-2018, 11:54 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by vysero View Post
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.
 
Old 08-28-2018, 11:58 AM   #5
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
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.

Last edited by vysero; 08-28-2018 at 12:00 PM.
 
Old 08-28-2018, 12:05 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Why don't you tell us more of the long story (from the start)?
 
Old 08-28-2018, 12:05 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,244

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by TB0ne View Post
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.

Last edited by dugan; 08-28-2018 at 12:10 PM.
 
Old 08-28-2018, 12:10 PM   #8
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
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?
 
Old 08-28-2018, 12:12 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by vysero View Post
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?


...and in any case, this still doesn't explain why you think need to compile qt from source in the first place.
 
1 members found this post helpful.
Old 08-28-2018, 12:21 PM   #10
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
how can compiling from source help fix a bug that only crops up when compiling from source?


...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.

Last edited by vysero; 08-28-2018 at 12:24 PM.
 
Old 08-28-2018, 12:28 PM   #11
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,244

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by vysero View Post
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.

Last edited by dugan; 08-28-2018 at 12:32 PM.
 
Old 08-28-2018, 12:39 PM   #12
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
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?
 
Old 08-28-2018, 12:55 PM   #13
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,244

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
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.
 
Old 08-28-2018, 02:13 PM   #14
vysero
Member
 
Registered: May 2018
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
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.
 
Old 08-28-2018, 11:54 PM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by vysero View Post
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.
 
1 members found this post helpful.
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing from Source: How to Know What I Need? SlowCoder Linux - General 5 10-28-2008 08:32 AM
Installing php package after installing from source shubb Slackware 4 03-14-2006 10:19 AM
Installing from source, installing from CVS and the E-17 window manager... Buffbannana049 Ubuntu 10 02-14-2006 11:27 PM
Installing from source carlindenver Linux - General 5 08-25-2005 08:12 PM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration