SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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/

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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
 

Similar a 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
 

Más 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
 

Más 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)
 

Último

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

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/