SlideShare a Scribd company logo
P.1
Upgrade GCC & Install Qt 5.4
On CentOS 6.5
William.L
wiliwe@gmail.com
2015-05-14
P.2
Index
Install/Upgrad GCC Supporting C++11 or above Standard ............................................................................ 3
Install Qt 5 ............................................................................................................................................................. 7
P.3
Install/Upgrad GCC Supporting C++11 or above
Standard
For some librariese that need GCC C++ compiler supporting C++11 or above standard mandatorily, so it would
fail to build on CentOS 6.5 whose GCC’s version is v4.4.7, it is too old.
From GCC v4.7, GCC supports C++11 standard; from GCC v4.9, GCC supports C++14 standard.
Here using GCC v4.9.0 as an example for upgrading GCC on CentOS 6.5.
To retrieve a copy of GCC source archive, please refer to the GNU GCC download site:
* ftp://ftp.gnu.org/gnu/gcc/
* http://ftp.gnu.org/gnu/gcc/
* https://ftp.gnu.org/gnu/gcc/
1) Dowload GCC v4.9.0 source archive.
# curl -O http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
or
# wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
2) Unpack gcc-4.9.0.tar.gz, it will generate a folder name “gcc-4.9.0”:
# tar zxf gcc-4.9.0.tar.gz
3) Install development tools (if you do not install it ever).
# yum groupinstall "Development tools"
P.4
4) Download and extract pre-requisites
These prerequisites are required to build the final gcc compiler.
# cd gcc-4.9.0
# ./contrib/download_prerequisites
P.5
Note:
* It must locate in this level of directory because the pre-requisite packages must be put in this level!
* If you do not install required libraries for building GCC, it will show below error messages.
5) Configure and install GCC
# cd ..
# mkdir build_gcc_4.9.0
# cd build_gcc_4.9.0
# ../gcc-4.9.0/configure --prefix=/opt/gcc-4.9.0/ --enable-checking=release --enable-languages=c,c++ --disable-multilib
# make -j4 (4 means 4 CPU cores, this will change on different CPU platform)
# make -k check
# make install
Note
On 64-bit (x86_64) platform, when confguring GCC, use the option
"--enable-multilib --with-multilib-list=m32,m64" to let compiler could build out a 32-bit software, while
the option "--disable-multilib" means no 32-bit support, e.g. it could only built out 64-bit software.
6) Using alternatives(or ”update-alternatives“ which is a symbolic link to “alternatives”) tool to set currently
used GCC compiler. The version of GCC used in CentOS 6.5 is v4.4.7.
# mv /usr/bin/gcc /usr/bin/gcc_4.4.7
# update-alternatives --install /usr/bin/gcc gcc /opt/gcc-4.9.0/bin/x86_64-unknown-linux-gnu-gcc-4.9.0 40
# mv /usr/bin/g++ /usr/bin/g++_4.4.7
# update-alternatives --install /usr/bin/g++ g++ /opt/gcc-4.9.0/bin/g++ 40
# mv /usr/bin/c++ /usr/bin/c++_4.4.7
# update-alternatives --install /usr/bin/c++ c++ /opt/gcc-4.9.0/bin/c++ 40
To verify current version of GCC compiler.
# gcc --version
P.6
# g++ --version
# c++ --version
7) Copy new GCC libraries to system library folder
[for 32-bit]
# mv /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6.backup
# cp -P /opt/gcc-4.9.0/lib/libstdc++.so.6 /usr/lib/
# cp /opt/gcc-4.9.0/lib/libstdc++.so.6.0.20 /usr/lib/
[for 64-bit]
# mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.backup
# cp -P /opt/gcc-4.9.0/lib64/libstdc++.so.6 /usr/lib64/
# cp /opt/gcc-4.9.0/lib64/libstdc++.so.6.0.20 /usr/lib64/
To verify current version of all system libraries
# ldconfig -v
If you want to update the “man” document for the new GCC, it could copy folders and files under
/opt/gcc-4.9.0/share to /usr/lib/share or /usr/lib64/share.
P.7
Install Qt 5
Here using Qt v5.4.1 for example.
1) Install Development Tools (if you do not install it ever)
# su
$ yum groupinstall "Development Tools"
P.8
2) Download qt -opensource-linux-x64-5.4.1.run or latest version
* http://download.qt.io/archive/qt/
* http://download.qt.io/archive/qt/5.4/5.4.1/
* http://download.qt.io/archive/qt/5.4/5.4.1/qt-opensource-linux-x64-5.4.1.run.mirrorlist
3) Change the mode of to executable
# chmod 755 ./qt-opensource-linux-x64-5.4.1.run
4) Run qt-opensource-linux-x64-5.4.1.run to start installation process
# ./qt-opensource-linux-x64-5.4.1.run
P.9
P.10
P.11
P.12
Note
If the GCC(g++ / c++ compiler) version does not support C++10 (or above) standard, it will show below error
messages.
P.13
It could use commands to check if there have needed C++ libraries in the system.
# strings /usr/lib64/libstdc++.so.6 | grep GLIBC
Below shows CentOS 6.5 original C++ libraries.
If you ever upgrade GCC to a newer version, it would show more libraries (here is the case that it had
upgrade GCC to v4.9.0).
P.14
5) Add Qt commands to PATH (e.g. qmake).
Ex:
export PATH=$PATH :/home/william/Qt5.4.1/5.4/gcc_64/bin
6) Run qmake -version to verify the version.
7) Copy built Qt 5.4.1 library’s pkg-config(package configuration) file (.pc) to system library folder for 64-bit,
/usr/lib64/pkgconfig.
su
cd /usr/lib64/
cp -r ./pkgconfig ./ pkgconfig_org
cd ./pkgconfig
cp /home/william/Qt5.4.1/5.4/gcc_64/lib/pkgconfig/* ./
P.15
Note
/home/william/Qt5.4.1 is Qt 5.4.1 installation path.
About pkg-config, please see its official site:
http://www.freedesktop.org/wiki/Software/pkg-config/
Reference
* https://wiki.qt.io/How-to-Install-Qt-5-and-Qwt-on-CentOS-6
* https://rajivpandit.wordpress.com/2013/11/15/install-qt5-on-centos-6-4-and-fix-glibcxx_3-4-15-not-found-error-in-qt5-install/

More Related Content

What's hot

Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294
IkiArif1
 
Getting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build ServiceGetting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build Service
Andi Sugandi
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
Jian-Hong Pan
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
yaranusa
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup
晓东 杜
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
Fu Haiping
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Jian-Hong Pan
 
Docker e postgresql
Docker e postgresqlDocker e postgresql
Docker e postgresql
Fernando Ike
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linuxchinkshady
 
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generatorKernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Anne Nicolas
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
Nugroho Gito
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
dotCloud
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
Puppet
 
short_intro_to_CMake_(inria_REVES_team)
short_intro_to_CMake_(inria_REVES_team)short_intro_to_CMake_(inria_REVES_team)
short_intro_to_CMake_(inria_REVES_team)
Jérôme Esnault
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
Mohammed Farrag
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
dotCloud
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
ghessler
 

What's hot (20)

Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294
 
Getting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build ServiceGetting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build Service
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Lab docker
Lab dockerLab docker
Lab docker
 
Docker e postgresql
Docker e postgresqlDocker e postgresql
Docker e postgresql
 
C make tutorial
C make tutorialC make tutorial
C make tutorial
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux
 
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generatorKernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
short_intro_to_CMake_(inria_REVES_team)
short_intro_to_CMake_(inria_REVES_team)short_intro_to_CMake_(inria_REVES_team)
short_intro_to_CMake_(inria_REVES_team)
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
 

Similar to Upgrade GCC & Install Qt 5.4 on CentOS 6.5

Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution
Mohamed BENCHENOUF
 
Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3
Angie Ihirwe
 
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
Eduardo Nuno
 
Kranthi kumar implement_ci_cd_my_notes
Kranthi kumar implement_ci_cd_my_notesKranthi kumar implement_ci_cd_my_notes
Kranthi kumar implement_ci_cd_my_notes
🅺🆁🅰🅽🆃🅷🅸 🅺 . 🆁🅰🅰🆅🅸
 
oSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfoSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdf
AdrianSchrter1
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
Linaro
 
CM_SME revised bc635_637PCI_V2_Linux_SDK
CM_SME revised bc635_637PCI_V2_Linux_SDKCM_SME revised bc635_637PCI_V2_Linux_SDK
CM_SME revised bc635_637PCI_V2_Linux_SDKChris Muntzer
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
SoheilSabzevari2
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
How to install_and_configure_r_on_a_linux_server
How to install_and_configure_r_on_a_linux_serverHow to install_and_configure_r_on_a_linux_server
How to install_and_configure_r_on_a_linux_serversushantbit04
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Ajith Ramawickrama
 
Basic Git Tutorial
Basic Git TutorialBasic Git Tutorial
Basic Git Tutorial
Vicente Bolea
 
Installing & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSInstalling & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOS
Devin Olson
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
SZ Lin
 
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraBringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Lalatendu Mohanty
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
Joshua Harlow
 
Zenoss: Buildout
Zenoss: BuildoutZenoss: Buildout
Zenoss: Buildout
Jeffrey Clark
 
Red hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usRed hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usDuong Hieu
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
Pantheon
 

Similar to Upgrade GCC & Install Qt 5.4 on CentOS 6.5 (20)

Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution
 
Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3
 
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
 
Kranthi kumar implement_ci_cd_my_notes
Kranthi kumar implement_ci_cd_my_notesKranthi kumar implement_ci_cd_my_notes
Kranthi kumar implement_ci_cd_my_notes
 
oSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfoSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdf
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
CM_SME revised bc635_637PCI_V2_Linux_SDK
CM_SME revised bc635_637PCI_V2_Linux_SDKCM_SME revised bc635_637PCI_V2_Linux_SDK
CM_SME revised bc635_637PCI_V2_Linux_SDK
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 
How to install_and_configure_r_on_a_linux_server
How to install_and_configure_r_on_a_linux_serverHow to install_and_configure_r_on_a_linux_server
How to install_and_configure_r_on_a_linux_server
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
 
Basic Git Tutorial
Basic Git TutorialBasic Git Tutorial
Basic Git Tutorial
 
Installing & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSInstalling & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOS
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
 
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraBringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Zenoss: Buildout
Zenoss: BuildoutZenoss: Buildout
Zenoss: Buildout
 
Red hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usRed hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-us
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Kickstart
KickstartKickstart
Kickstart
 

More from William Lee

Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
William Lee
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
William Lee
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
William Lee
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
William Lee
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
William Lee
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
William Lee
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
William Lee
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
William Lee
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
William Lee
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
William Lee
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
William Lee
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
William Lee
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
William Lee
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
William Lee
 
Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OSWilliam Lee
 
GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeWilliam Lee
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069William Lee
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)William Lee
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)William Lee
 

More from William Lee (20)

Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
 
Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OS
 
GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in Gnome
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)
 

Recently uploaded

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Upgrade GCC & Install Qt 5.4 on CentOS 6.5

  • 1. P.1 Upgrade GCC & Install Qt 5.4 On CentOS 6.5 William.L wiliwe@gmail.com 2015-05-14
  • 2. P.2 Index Install/Upgrad GCC Supporting C++11 or above Standard ............................................................................ 3 Install Qt 5 ............................................................................................................................................................. 7
  • 3. P.3 Install/Upgrad GCC Supporting C++11 or above Standard For some librariese that need GCC C++ compiler supporting C++11 or above standard mandatorily, so it would fail to build on CentOS 6.5 whose GCC’s version is v4.4.7, it is too old. From GCC v4.7, GCC supports C++11 standard; from GCC v4.9, GCC supports C++14 standard. Here using GCC v4.9.0 as an example for upgrading GCC on CentOS 6.5. To retrieve a copy of GCC source archive, please refer to the GNU GCC download site: * ftp://ftp.gnu.org/gnu/gcc/ * http://ftp.gnu.org/gnu/gcc/ * https://ftp.gnu.org/gnu/gcc/ 1) Dowload GCC v4.9.0 source archive. # curl -O http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz or # wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz 2) Unpack gcc-4.9.0.tar.gz, it will generate a folder name “gcc-4.9.0”: # tar zxf gcc-4.9.0.tar.gz 3) Install development tools (if you do not install it ever). # yum groupinstall "Development tools"
  • 4. P.4 4) Download and extract pre-requisites These prerequisites are required to build the final gcc compiler. # cd gcc-4.9.0 # ./contrib/download_prerequisites
  • 5. P.5 Note: * It must locate in this level of directory because the pre-requisite packages must be put in this level! * If you do not install required libraries for building GCC, it will show below error messages. 5) Configure and install GCC # cd .. # mkdir build_gcc_4.9.0 # cd build_gcc_4.9.0 # ../gcc-4.9.0/configure --prefix=/opt/gcc-4.9.0/ --enable-checking=release --enable-languages=c,c++ --disable-multilib # make -j4 (4 means 4 CPU cores, this will change on different CPU platform) # make -k check # make install Note On 64-bit (x86_64) platform, when confguring GCC, use the option "--enable-multilib --with-multilib-list=m32,m64" to let compiler could build out a 32-bit software, while the option "--disable-multilib" means no 32-bit support, e.g. it could only built out 64-bit software. 6) Using alternatives(or ”update-alternatives“ which is a symbolic link to “alternatives”) tool to set currently used GCC compiler. The version of GCC used in CentOS 6.5 is v4.4.7. # mv /usr/bin/gcc /usr/bin/gcc_4.4.7 # update-alternatives --install /usr/bin/gcc gcc /opt/gcc-4.9.0/bin/x86_64-unknown-linux-gnu-gcc-4.9.0 40 # mv /usr/bin/g++ /usr/bin/g++_4.4.7 # update-alternatives --install /usr/bin/g++ g++ /opt/gcc-4.9.0/bin/g++ 40 # mv /usr/bin/c++ /usr/bin/c++_4.4.7 # update-alternatives --install /usr/bin/c++ c++ /opt/gcc-4.9.0/bin/c++ 40 To verify current version of GCC compiler. # gcc --version
  • 6. P.6 # g++ --version # c++ --version 7) Copy new GCC libraries to system library folder [for 32-bit] # mv /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6.backup # cp -P /opt/gcc-4.9.0/lib/libstdc++.so.6 /usr/lib/ # cp /opt/gcc-4.9.0/lib/libstdc++.so.6.0.20 /usr/lib/ [for 64-bit] # mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.backup # cp -P /opt/gcc-4.9.0/lib64/libstdc++.so.6 /usr/lib64/ # cp /opt/gcc-4.9.0/lib64/libstdc++.so.6.0.20 /usr/lib64/ To verify current version of all system libraries # ldconfig -v If you want to update the “man” document for the new GCC, it could copy folders and files under /opt/gcc-4.9.0/share to /usr/lib/share or /usr/lib64/share.
  • 7. P.7 Install Qt 5 Here using Qt v5.4.1 for example. 1) Install Development Tools (if you do not install it ever) # su $ yum groupinstall "Development Tools"
  • 8. P.8 2) Download qt -opensource-linux-x64-5.4.1.run or latest version * http://download.qt.io/archive/qt/ * http://download.qt.io/archive/qt/5.4/5.4.1/ * http://download.qt.io/archive/qt/5.4/5.4.1/qt-opensource-linux-x64-5.4.1.run.mirrorlist 3) Change the mode of to executable # chmod 755 ./qt-opensource-linux-x64-5.4.1.run 4) Run qt-opensource-linux-x64-5.4.1.run to start installation process # ./qt-opensource-linux-x64-5.4.1.run
  • 9. P.9
  • 10. P.10
  • 11. P.11
  • 12. P.12 Note If the GCC(g++ / c++ compiler) version does not support C++10 (or above) standard, it will show below error messages.
  • 13. P.13 It could use commands to check if there have needed C++ libraries in the system. # strings /usr/lib64/libstdc++.so.6 | grep GLIBC Below shows CentOS 6.5 original C++ libraries. If you ever upgrade GCC to a newer version, it would show more libraries (here is the case that it had upgrade GCC to v4.9.0).
  • 14. P.14 5) Add Qt commands to PATH (e.g. qmake). Ex: export PATH=$PATH :/home/william/Qt5.4.1/5.4/gcc_64/bin 6) Run qmake -version to verify the version. 7) Copy built Qt 5.4.1 library’s pkg-config(package configuration) file (.pc) to system library folder for 64-bit, /usr/lib64/pkgconfig. su cd /usr/lib64/ cp -r ./pkgconfig ./ pkgconfig_org cd ./pkgconfig cp /home/william/Qt5.4.1/5.4/gcc_64/lib/pkgconfig/* ./
  • 15. P.15 Note /home/william/Qt5.4.1 is Qt 5.4.1 installation path. About pkg-config, please see its official site: http://www.freedesktop.org/wiki/Software/pkg-config/ Reference * https://wiki.qt.io/How-to-Install-Qt-5-and-Qwt-on-CentOS-6 * https://rajivpandit.wordpress.com/2013/11/15/install-qt5-on-centos-6-4-and-fix-glibcxx_3-4-15-not-found-error-in-qt5-install/