SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
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/

Contenu connexe

Tendances

Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294IkiArif1
 
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 ServiceAndi Sugandi
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-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-wikiyaranusa
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup晓东 杜
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake TutorialFu 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 2021Jian-Hong Pan
 
Docker e postgresql
Docker e postgresqlDocker e postgresql
Docker e postgresqlFernando 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 generatorAnne 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 TechnologyNugroho Gito
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with AugeasPuppet
 
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 DevelopmentMohammed 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 linedotCloud
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odpghessler
 

Tendances (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
 

Similaire à 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.3Angie 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
 
oSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfoSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfAdrianSchrter1
 
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 SystemLinaro
 
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 zeroSoheilSabzevari2
 
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 IndiaArun 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
 
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 CentOSDevin 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 kernelsSZ 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-fedoraLalatendu 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
 
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 DrushPantheon
 

Similaire à 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
 

Plus de 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 WalkerWilliam Lee
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding WindowWilliam 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 ChooserWilliam Lee
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserWilliam Lee
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASPWilliam Lee
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginWilliam Lee
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationWilliam 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.5William 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 PageWilliam Lee
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 UsageWilliam 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 & OBBWilliam 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
 

Plus de 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)
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

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/