タイトルの通りだが,問題は以下の通り.
(1) IC Compiler が QT4 を必要とする.
% icc_shell
galaxy_icc_exec: error while loading shared libraries: libQtScript.so.4: cannot open shared object file: No such file or directory
(2) RPMで入れようとすると古い libc などが必要となって依存関係を解決できない.
(3) ということでQt4をソースから入れてみる.4.8.7が最終らしい.
https://download.qt.io/archive/qt/4.8/4.8.7/
(4) 結論として,Alma Linux 9 では IC Compiler は起動するようになったがすぐにセグフォでクラッシュしてしまう.
(a) Qt を入れる
Qt4.8.7 を解凍して,手順通りに ./configure → make → make install
% ./configure
% make
ssl/qsslcertificate.cpp:504:36: エラー: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
504 | } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
エラーがでる,古い OpenSSL (1.0.1系より前) のAPIを使っているため,古い OpenSSL を落としてくる.(セキュリティー的にどうよ)
https://openssl-library.org/source/old/1.0.1/
ただ,試したときに configure のオプションに -no-openssl というのがあったので,そっちにしてみよう.
% ./configure -no-openssl
% gmake
dialogs/qprintdialog_unix.cpp:281:19: エラー: ‘class Ui::QPrintPropertiesWidget’ has no member named ‘cupsPropertiesPage’
281 | delete widget.cupsPropertiesPage;
| ^~~~~~~~~~~~~~~~~~
https://forum.qt.io/topic/142527/qt-4-8-7-compilation-fails-qprint-errors/4
コードにバグがあるから直せとのこと.
qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h
の2500行目の break を continue にする.もなおらないなぁ,次の記事だと,cups 関係だから --no-cups にすればよいとのこと.
https://blog.csdn.net/weixin_43777852/article/details/125395832
別のエラーが発生する.
% ./configure -no-openssl --no-cups
% gmake
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: エラー: ‘std::tr1’ has not been declared
std::tr1 は C++11 のプレビュー版にあって,2011 年以降デフォルトでサポートしていない,とのこと.
https://forum.qt.io/topic/94118/attempting-to-deal-with-qtbug-41361/2
Windows だと mkspecs\win32-g++\qmake.conf に
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98
を書き足せとのこと.
https://stackoverflow.com/questions/52061472/installing-qt-from-source-v-4-8-6
https://stackoverflow.com/questions/10354371/stdtr1-has-not-been-declared
こいつは Linux なんだよなぁ,ということで調べたら
mkspecs/linux-g++-32/qmake.conf
mkspecs/linux-g++-64/qmake.conf
があったのでそれぞれ
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98
と書き足してみる.しかしうまくいかない ($$を$にしてもだめ).
パッチがあるらしい.
https://hg.slitaz.org/wok-current/rev/03352f30e977
以下の二つのファイルに上記オプション相当を書き足してみる.
qt-everywhere-opensource-src-4.8.6/src/script/script.pro
qt-everywhere-opensource-src-4.8.7/src/plugins/accessible/widgets/widgets.pro
% ./configure -no-openssl --no-cups
% gmake
また別のエラー
messagemodel.cpp:186:61: エラー: ordered comparison of pointer with integer zero (‘MessageItem*’ and ‘int’)
パッチがあるみたい.
https://aur.archlinux.org/packages/qt4?O=30
以下のファイルを書き換える.
tools/linguist/linguist/messagemodel.cpp
% ./configure -no-openssl --no-cups
% gmake
% sudo make install
Qt4 はいったぞ.
% icc_shell
galaxy_icc_exec: error while loading shared libraries: libQtScript.so.4: cannot open shared object file: No such file or directory
シェアードオブジェクトが PATH にないみたい.Qt4 については以下にあるようだ.
% ls /usr/local/**/libQtScript.so.4
/usr/local/Trolltech/Qt-4.8.7/lib/libQtScript.so.4
LD_LIBRARY_PATHに書いてあげる.
https://qiita.com/Alaska_Panda/items/7b34e8236696039f6f42
% export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/Trolltech/Qt-4.8.7/lib
再実行
% icc_shell
(略)
icc_shell>
ようやく起動した,長い戦いであった.
と思っていたのだが,すごく遅い上にものすごい高確率でセグメンテーションフォルトで死ぬので実質使えないかも….
---その2---
Qt の問題について gcc のバージョンを変えろとある.
https://gcc.gnu.org/pipermail/gcc/2020-May/232481.html
https://discuss.getsol.us/d/8439-qt487
gcc-75 にしてみる.
https://bigsearcher.com/mirrors/gcc/releases/gcc-7.5.0/
解凍,gcc ディレクトリで以下を実行して gmp,mpfr,mpc,islをダウンロード.
./contrib/download_prerequisites
解凍,build ディレクトリを掘って configure
% ../configure --program-suffix=-7.5.0 --disable--multilib
/usr/bin/ld: cannot find crt1.o: No such file or directory
i686 の glibc がいるみたい.(--disable-multilibが効かない?)
このあたりを参考にした.
http://blog.livedoor.jp/itukano/archives/51848514.html
https://nextremer-nbo.blogspot.com/2018/09/fedora28gcc73.html
https://stackoverflow.com/questions/6329887/how-to-fix-linker-error-cannot-find-crt1-o
% sudo dnf install glibc-devel.i686
% ../configure --program-suffix=-7.5.0 --disable--multilib
% make
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:157:10: fatal error: linux/cyclades.h: そのようなファイルやディレクトリはありません
Bug 100379 - cyclades.h is removed from linux kernel header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379
コードを書き換えろとのこと.変更点は次の通り.
https://github.com/easybuilders/easybuild-easyconfigs/pull/14453/commits/e495b58ff4c4a95fdffd9bef635cf05205626ec2
また止まる
% make
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:261:72: error: size of array ‘assertion_failed__1139’ is negative
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105029
古いバージョンはもうメンテしていないから自分で直せとのこと.変更点は次の通り.
https://gcc.gnu.org/cgit/gcc/commit/?id=75003cdd23c310
% make
なんかコンパイルできたぞ.
% sudo make install
% which gcc-7.5.0
/usr/local/bin/gcc-7.5.0
古い GCC を使うようにリンクを張り替える.これでいいのかよくわからない.
sudo mv /usr/bin/gcc /usr/bin/gcc-11
sudo mv /usr/bin/gcc-ar /usr/bin/gcc-ar-11
sudo mv /usr/bin/gcc-nm /usr/bin/gcc-nm-11
sudo mv /usr/bin/gcc-ranlib /usr/bin/gcc-ranlib-11
sudo mv /usr/bin/g++ /usr/bin/g++-11
sudo ln -s /usr/local/bin/gcc-7.5.0 /usr/bin/gcc
sudo ln -s /usr/local/bin/gcc-ar-7.5.0 /usr/bin/gcc-ar
sudo ln -s /usr/local/bin/gcc-nm-7.5.0 /usr/bin/gcc-nm
sudo ln -s /usr/local/bin/gcc-ranlib-7.5.0 /usr/bin/gcc-ranlib
sudo ln -s /usr/local/bin/g++-7.5.0 /usr/bin/g++
(a) に戻る.
% ./configure -no-openssl --no-cups
% gmake
% sudo make install
再実行
% icc_shell -gui
(略)
icc_shell>
やっぱりウィンドウ立ち上げたりするとすぐにセグフォでクラッシュしてしまう.これはだめかもしれん.
---OMAKE---
IC Compiler II は以下のトラブルがあった.
% icc2_shell
bin/icc2_exec: symbol lookup error: /lib64/libkrb5.so.3: undefined symbol: krb5int_c_deprecated_enctype, version k5crypto_3_MIT
これもググっても調べてわからなかったのだが,結局
% dnf provides libkrb5.so.3
krb5-libs-1.21.1-8.el9_6.i686 : The non-admin shared libraries used by Kerberos 5
Repo : baseos
一致:
提供する : libkrb5.so.3
krb5-libs-1.21.1-8.el9_6.i686 : The non-admin shared libraries used by Kerberos 5
Repo : baseos
一致:
提供する : libkrb5.so.3
ということで,krb5-libs-1.21.1-8.el9_6.x84_64 を入れたらちゃんと起動した.ICC2 は QT4 をつかっていないのね.Primewave も起動した.
0 件のコメント:
コメントを投稿