2017-02-01 8 views
4

Ubuntu 16.04.1 x64でOpenSSLを使ってQt5.8.0を構築しようとしていました。Ubuntu 16.04.1でOpenSSLを使ってQtをビルドできません

まず、OpenSSL v1.0.2kのソースをダウンロードしました。それから私は、私はtheeseコマンドを実行すると

./Configure --prefix=$PWD/dist -shared linux-x86_64 

コマンドで構成された一つずつ:だから私はOpenSSLが/home/user/openssl-OpenSSL_1.0.2k/dist

に取り付けてしまった

make depend 
make 
make install 

は、その後、私はその後、私はコマンドを使用して設定しようとした公式サイトからのQtをダウンロードして、ソースとそれをインストールし、そのソースは/home/user/Qt5.8.0/5.8/Src に位置してい

OPENSSL_LIBS='-L/home/user/openssl-OpenSSL_1_0_2k/dist/lib -lssl -lcrypto' ./configure -prefix /home/user/qt5_static -opensource -confirm-license -release -nomake examples -nomake tests -static -openssl-linked -I /home/user/openssl-OpenSSL_1_0_2k/dist/include/openssl -L /home/user/openssl-OpenSSL_1_0_2k/dist/lib 

しかしtheeseエラーしまった:私は何を

ERROR: Feature 'openssl' was enabled, but the pre-condition '!features.securetransport && tests.openssl' failed.

ERROR: Feature 'openssl-linked' was enabled, but the pre-condition 'features.openssl && libs.openssl' failed.

を間違っている、とどのようにこの問題を解決するのですか?

ありがとう、私の悪い英語のために申し訳ありません。

+0

Qtをどのように取得しましたか?私はUbuntu 16 VMを稼働させています.Qtに関連する手順を提供すれば素早く参照できます。また、 './Configure ... linux-x86_64'は、正しく推測されるため、おそらく必要ないでしょう。また、 'enable-ec_nistp_64_gcc_128'を適用することを検討してください。 OpenSSL wikiの[コンパイルとインストール](https://wiki.openssl.org/index.php/Compilation_and_Installation)も参照してください。 – jww

答えて

0

私は静的にOpenSSLをリンクしようとしたときに同じ問題を抱えていたし、解決策以下のが見つかりました:

1)openSSLの

sudo apt-get update && sudo apt-get install libssl-dev 

2をインストールします)の設定と、-openssl-linkedオプションを含め、ソースからの私の構成例をQTを構築:静的にQTを構築するための

/home/someuser/Qt/5.8/Src/configure -c++std c++11 -static -release -platform linux-g++-64 -prefix /home/someuser/Qt/StaticRelease58 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-xcb -make libs -openssl-linked -nomake tools -nomake examples -nomake tests -opensource -confirm-license -skip qtwayland -skip qtwebview -skip qtwebengine -skip qtwebchannel -no-qml-debug 

注意、あなたもここで説明する他のパッケージをインストールしている必要があります。

http://doc.qt.io/qt-5/linux-requirements.html

http://doc.qt.io/qt-5/linux-deployment.html

P.S. QT5.8からopenSSLに動的にリンクすると、デフォルトの設定でうまく動作します。

関連する問題