aws / aws/aws-sdk-cpp

Cross compiled OpenSSL and Curl android dependencies are not "installed"

オープン
#995 コメント 11 件 リアクション 5 件 担当者 0 名 GitHub で見る
feature-request p2
主要言語
C++
スター
2.2k
フォーク
1.2k
平均マージ
4日 11時間
マージ済み PR(30日)
13

説明

### What platform/OS are you using?
OSX 10.13.6 (and Ubuntu 16.04)
### What compiler are you using? what version?
Clang 6.0.2 via Android NDK r17c
(with some modifications to pass the right args & guess the version correctly)
### What's your CMake arguments?

export BUILD_ABI=arm64-v8a
export EXTRA_AWS_OPTIONS=" -DTARGET_ARCH=ANDROID -DANDROID_ABI=$BUILD_ABI "
cmake \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DCMAKE_RULE_MESSAGES:BOOL=OFF \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DFORCE_SHARED_CRT:BOOL=OFF \
$EXTRA_AWS_OPTIONS \
-DBUILD_ONLY='logs;core;iam;access-management;identity-management;cognito-identity;cognito-idp;s3;kinesis;sts' \
$PROJECTHOME/aws-sdk-cpp "

### Can you provide a TRACE level log? (sanitize any sensitive information)

After taring up the install directory, when moving to another machine linking against the installed files fails with:

/opt/work/test/../aws-sdk-cpp/lib/libaws-cpp-sdk-core.a(CryptoImpl.cpp.o): In function `Aws::Utils::Crypto::OpenSSL::init_static_state()':
CryptoImpl.cpp:(.text._ZN3Aws5Utils6Crypto7OpenSSL17init_static_stateEv+0xc): undefined reference to `ERR_load_CRYPTO_strings'
CryptoImpl.cpp:(.text._ZN3Aws5Utils6Crypto7OpenSSL17init_static_stateEv+0x10): undefined reference to `OPENSSL_add_all_algorithms_noconf'

And a bunch more, and some curl references.

The root cause appears to be that the libcurl.a and libssl.a live in the build directory and make install doesn't put the dependencies where aws can find them.

It would be nice if make install could install the special built components required (they exist in the build directory, but would prefer not to archive that.)
aws-sdk-cpp/external/curl/lib/libcurl.a
aws-sdk-cpp/external/openssl/lib/libssl.a
aws-sdk-cpp/external/openssl/lib/libcrypto.a
aws-sdk-cpp/external/zlib/lib/libz.a

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

記載された CMake 引数で Android arm64-v8a ビルドを再現し、その後 make install と external/curl/lib、external/openssl/lib、external/zlib/lib 配下の依存関係パスを確認します。ビルドディレクトリなしで、インストールされた SDK を別のマシン上でリンクできるか確認します。必要な curl、OpenSSL、zlib の依存関係が正しくインストールまたは参照されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, cmake, cpp
領域
build-system, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。