Build QT 5.9.9 Dari Source Code Di Centos7.9
Build QT 5.9.9 Dari Source Code Di Centos7.9
9 64 Bit
https://www.programmersought.com/article/87537107920/
https://forum.qt.io/topic/91073/failed-to-build-qt-5-11-0-from-source-on-centos-7-but-no-problem-
with-qt-5-10-1/8
Tools :
Dependensi : Perl minimal versi 5.8 & Python minimal versi 2.7
Jika lupa memilih saat instalasi bisa dengan yum group install “Development Tools” dari repo setelah
instalasi Linux Centos 7.9 selesai
1. Setting Repo
Buat file repo yang baru Isi file : vim /etc/yum.repos.d/dvd.repo, isi file-nya sbb :
[dvd-repo]
Name=Centos-$releasever-RepoDVD
Baseurl= file:///media/
gpgcheck=0
enabled=1
Instal paket OpenGL devel ini adalah paket dependensi yang diperlukan QT 5.9.9
2. Mengecek Perl
Jika belum diinstal, instal paket perl : yum install perl
3. Mengecek Python
Proses kompilasi source code, tunggu sampai selesai. Laptop dengan prosesor Intel Core i7 Quad Core &
RAM 8GB DDR3 dengan system operasi Linux Centos 7.9, proses kompilasi selesai kira2 3 jam
8. Instalasi QT 5.9.9
Jika sedang login dengan user non administrative privilege, login dulu dengan root untuk menginstal QT
5.9.9
Proses instalasi, tunggu sampai selesai
Instalasi selesai
Tulis /usr/local/Qt-5.9.9/bin/designer untuk menjalankan QT Designer. Huruf2 menu dsb tidak tampil
karena huruf2nya tidak disiapkan oleh QT
Login root, copy huruf yang sudah ada di sistem ke QT : cp /usr/share/fonts /usr/local/Qt-5.9.9/lib
Pastikan folder fonts masuk ke folder instalasi QT
Setting environment variable untuk huruf dan utility lain seperti assistant, designer, dsb dsb supaya bisa
dipanggil dari folder mana saja. Penting : QT_QPA_FONTDIR harus ditulis 100% sama, tidak bisa diubah
Tulis gmake install_docs, atau make install_docs, untuk instalasi dokumentasi diperlukan user dengan
hak administratif
Proses instalasi dokumentasi QT
12. Pengujian
Error baris 32 : #error This file requires compiler and library support for the ISO C++ 2011 standard
Error baris 1135 : "You must build your code with position independent code if Qt was built with
-reduce-relocations”. Compile your code with -fPIC (-fPIE is not enough).
Klik Build options
Pilih C++11 GNU atau C++11 ISO & Position Independent Code di mode Debug & Release
Lampiran
Error 1
Error: unrecognized command line option –ffunction-sections terjadi karena source code yang akan
dikonfigurasi adalah source code untuk Windows
Selesai
Created By : C/C++ Coder Di Jakarta