①安装 gmp
cd ../gmp-6.0.0
./configure --prefix=/usr/local/gmp
make && make install
②安装 mpfr
cd ../mpfr-3.1.1
./configure --prefix=/usr/local/mpfr --with-gmp=/usr/local/gmp/
make && make install
③安装 mpc
cd ../mpc-1.0.1
./configure --prefix=/usr/local/mpc --with-gmp=/usr/local/gmp/ --with-mpfr=/usr/local/mpfr/
make && make install
④安装 freetype
./configure --prefix=/usr/local/freetype
make && make install
⑤安装(只编译,引用库,直接install会导致黑屏无法启动)dbus
./configure --prefix=/usr/local/dbus
make
⑥ 将 4 5步骤中的so带链接关系,复制到qt*.run的文件夹下进行安装,安装完成过后,再放入到home/kylin/Qt5.12.8/Tools/QtCreator/lib/Qt/lib文件夹下
/home/kylin/app/freetype-2.10.0/objs/.libs/libfreetype.so
/home/kylin/app/dbus-1.14.0/dbus/.libs/libdbus-1.so
⑦ 临时使用环境变量
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
否则在运行run文件的时候,会报错
[kylin@localhost app]$ ./qt-opensource-linux-x64-5.12.8.run
[0] Warning: Qt Account settings file [/home/kylin/.local/share/Qt/qtaccount.ini] does not exist.
./qt-opensource-linux-x64-5.12.8.run: relocation error: ./qt-opensource-linux-x64-5.12.8.run: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference
⑧运行run 安装文件
sudo chmod 777 qt-opensource-linux-x64-5.12.8.run
./qt-opensource-linux-x64-5.12.8.run (切记不能用sudo权限,否则会有很多问题)
⑨ 进入到bin文件夹下,双击启动qt creator
⑩qt creator启动没问题,再进行gcc的编译
cd ../gcc-4.8.5
yum install glibc-devel.i686
./configure --prefix=/usr/local/gcc --with-gmp=/usr/local/gmp/ --with-mpfr=/usr/local/mpfr/ --with-mpc=/usr/local/mpc/ --disable-multilib -enable-languages=c,c++
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
make && make install
11. 升级gcc
27 gcc -v
28 cd /usr/bin
29 sudo mv gcc gcc.bak
30 sudo mv g++ g++.bak
31 sudo ln -s /usr/local/gcc/bin/gcc gcc
32 sudo ln -s /usr/local/gcc/bin/g++ g++
33 gcc -v
12.等待编译的时候进行代码的克隆 git clone kylin@172.18.3.110:/home/kylin/newyth
13.yum 安装opengl的库
sudo yum install libglvnd-devel
sudo yum install freeglut*
sudo yum install glew
** 发现 3 个已存在的 RPM 数据库问题, 'yum check' 输出如下:
clang-libs-4.0.1-5.nd7.1.x86_64 有缺少的需求 compiler-rt(x86-64) >= ('0', '4.0.1', None)
mesa-libEGL-devel-18.1.1-4.nd7.1.x86_64 有缺少的需求 libglvnd-devel(x86-64)
mesa-libGL-devel-18.1.1-4.nd7.1.x86_64 有缺少的需求 libglvnd-devel(x86-64)
14 qt creator 加载工程代码,进行qmake 构建,记得配置环境变量,否则会导致不能正确加载
LD_LIBRARY_PATH /usr/local/gcc/lib64/:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/:/home/kylin/app/TimeScaledb/openssl-1.1.1k:/home/kylin/code/newyth/Publish/libs/InnerLib/QtLibs
g++ 编译器报错,运行引擎的时候会报错 stdc++的错误
Maybe you forgot to setup the environment?
Error while parsing file /home/kylin/code/newyth/other/MonitorControl/MonitorControl.pro. Giving up.
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Maybe you forgot to setup the environment?
Error while parsing file /home/kylin/code/newyth/other/MonitorControl/MonitorControl.pro. Giving up.
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Maybe you forgot to setup the environment?
Error while parsing file /home/kylin/code/newyth/DataReplay/DataReplay.pro. Giving up.
/home/kylin/code/newyth/Publish/DataEngineKernel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/Publish/DataEngineKernel)
/home/kylin/code/newyth/Publish/DataEngineKernel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/DataEngineProject/DataEngineKernel/../../Publish/libs/InnerLib/QtLibs/redis++/libredis++.so.1)
sudo find / -name libstdc++.so.6
编译数据引擎:
所有插件均能正常初始化,但是收不到指定源的数据,需要关闭centos的防火墙
[kylin@localhost 桌面]$ systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since 二 2022-04-19 06:14:08 CST; 2h 1min ago
Main PID: 724 (firewalld)
CGroup: /system.slice/firewalld.service
└─724 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
135 systemctl status firewalld
systemctl disable firewalld.service
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
137 systemctl stop firewalld
138 systemctl status firewalld
15 编译monitor的错误
/home/kylin/code/newyth/other/build-MonitorControl-Desktop_Qt_5_12_8_GCC_64bit-Debug/MonitorControl: relocation error: /home/kylin/Qt5.12.8/5.12.8/gcc_64/lib/libQt5DBus.so.5: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference
需要将编译的新版本的dbus 放入到环境变量 LD_LIBRARY_PATH /home/kylin/app:/usr/local/gcc/lib64/:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_init_ssl
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_init_crypto
qt.network.ssl: QSslSocket: cannot resolve ASN1_STRING_get0_data
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_reset
qt.network.ssl: QSslSocket: cannot resolve RSA_bits
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_new_null
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_push
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_free
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_num
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_value
qt.network.ssl: QSslSocket: cannot resolve DH_get0_pqg
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_options
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_ciphersuites
qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot resolve SSL_get_client_random
qt.network.ssl: QSslSocket: cannot resolve SSL_SESSION_get_master_key
qt.network.ssl: QSslSocket: cannot resolve SSL_session_reused
qt.network.ssl: QSslSocket: cannot resolve SSL_set_options
qt.network.ssl: QSslSocket: cannot resolve TLS_method
qt.network.ssl: QSslSocket: cannot resolve TLS_client_method
qt.network.ssl: QSslSocket: cannot resolve TLS_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get0_chain
qt.network.ssl: QSslSocket: cannot resolve X509_getm_notBefore
qt.network.ssl: QSslSocket: cannot resolve X509_getm_notAfter
qt.network.ssl: QSslSocket: cannot resolve X509_get_version
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_set_ex_data
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_get_ex_data
qt.network.ssl: QSslSocket: cannot resolve OpenSSL_version_num
qt.network.ssl: QSslSocket: cannot resolve OpenSSL_version
qt.network.ssl: Incompatible version of OpenSSL
WebSocket connected
需要重新编译安装更高版本的openssl(注意使用步骤⑦的临时环境变量,否则会使make 报错)
openssl编译没有问题,但是在install的时候出现了问题
link /usr/local/openssl/lib/libcrypto.so -> /usr/local/openssl/lib/libcrypto.so.1.1
install libcrypto.so -> /usr/local/openssl/lib/libcrypto.so
install libcrypto.so.1.1 -> /usr/local/openssl/lib/libcrypto.so
ar: /usr/local/openssl/lib/libcrypto.so: File format not recognized
ar: /usr/local/openssl/lib/libcrypto.so.new: File format not recognized
Makefile:358: recipe for target 'install_dev' failed
make: *** [install_dev] Error 1
sudo find / -name libssl.so*
sudo find / -name libcrypto.so*
16 编译YTH
/home/kylin/code/newyth/Publish/libs/ThirdParts/lib/libavfilter.so:-1: error: undefined reference to `powf@GLIBC_2.27'
主要是对incds.pro 和pageprocess.pro的三方库进行了注释
LIBS += -L$$PWD/../../Publish/libs/ThirdParts/lib -lavutil -lpostproc -lswresample -lswscale
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
151 sudo yum install libxkbcommon-x11-devel
158 sudo yum install libxkbcommon-x11-devel.i686
sudo yum install libxkbcommon-devel.i686
/usr/lib64/libGL.so
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.7.0
strings /usr/lib64/libstdc++.so.6 | grep GLIBC 主要查看libstdc++库所支持的版本
主要对INCDS.pro 里的这两个系统自带库进行了注释
编译通过,但是运行会出现此错误
/home/kylin/code/newyth/Publish/YTH_Display: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/Publish/YTH_Display)
/home/kylin/code/newyth/Publish/YTH_Display: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/YTH/INCDS/../../Publish/libs/InnerLib/YTH/libmathematics.so.1)
17 编译designer
yum 安装wps 解决freetable的error问题 sudo yum install wps-office.x86_64 sudo yum install wps-office.i686(错误源)
/home/kylin/code/newyth/Publish/designer: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/Publish/designer)
/home/kylin/code/newyth/Publish/designer: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/TaskPrepareTool/designer/src/designer/../../../../Publish/libs/ThirdParts/lib/libprotobuf.so.21)
/home/kylin/code/newyth/Publish/designer: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/code/newyth/TaskPrepareTool/designer/src/designer/../../../../Publish/libs/ThirdParts/lib/liblog4cplus-2.0.so.3)
/home/kylin/code/newyth/Publish/designer: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/kylin/Qt5.12.8/5.12.8/gcc_64/lib/libQt5DesignerComponents.so.5)
数据引擎: /usr/local/gcc/lib64/:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/:/home/kylin/code/newyth/Publish/libs/InnerLib/QtLibs
monitor:/home/kylin/app:/usr/local/gcc/lib64/:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib
datareplay:/home/kylin/app:/usr/local/gcc/lib64/:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
Designer: /usr/local/gcc/lib64:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib:/home/kylin/code/newyth/Publish/libs/InnerLib/QtLibs:/home/kylin/Qt5.12.8/5.12.8/gcc_64/lib:/home/kylin/app/gcc-5.4.0/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/:/home/kylin/app
YTH_INTERFACE::::/home/kylin/code/newyth/YTH
YTH: /usr/local/gcc/lib64:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib:/home/kylin/Qt5.12.8/Tools/QtCreator/lib/Qt/lib/
[kylin@localhost 桌面]$ ./qt-opensource-linux-x64-5.12.8.run
[1] Warning: Qt Account settings file [/home/kylin/.local/share/Qt/qtaccount.ini] does not exist.
./qt-opensource-linux-x64-5.12.8.run: relocation error: ./qt-opensource-linux-x64-5.12.8.run: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference
[root@localhost 桌面]
[root@localhost 桌面]
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
[1] Warning: Qt Account settings file [/root/.local/share/Qt/qtaccount.ini] does not exist.
./qt-opensource-linux-x64-5.12.8.run: symbol lookup error: ./qt-opensource-linux-x64-5.12.8.run: undefined symbol: FT_Get_Font_Format
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
./qtcreator - 快捷方式: symbol lookup error: /home/kylin/Qt5.12.8/Tools/QtCreator/lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format
|