Parity-ethereum: Android binary depends on libc++_shared

Created on 31 Jul 2018  路  5Comments  路  Source: openethereum/parity-ethereum

Right now the Parity binary depends on libc++_shared.so, which means that it fails to start on an Android device. After investigation, this is caused by these lines. The correct fix is to remove them, but doing so breaks non-Android platforms for a reason that should be investigated.

The other action item that should be done is verify in CI that we don't depend on libc++_shared.so. This is done by running arm-linux-androideabi-objdump -x ./target/armv7-linux-androideabi/parity | grep libc++_shared and making sure that there's no result.

A3-stale 馃崈 M0-build 馃彈 M1-ci 馃檳 P5-sometimesoon 馃尣

All 5 comments

I don't get it, shouldn't those lines cause it to link against libstdc++? What should we do for Android then? I don't know much about it but the NDK docs seem to suggest that the provided C++ library is actually libc++. Does it work if you just remove the linking lines?

For Android to work properly, we should explicitly not link to anything.

The cc-rs crate handles linking to the C++ standard library if necessary, and that can be overridden with an environment variable, which we do in Parity's Android build.

It is unclear why building snappy-sys doesn't work on Linux/Mac without these lines. This needs investigating the code of cmake-rs.

Got it. In the meantime I can patch snappy-sys and rocksdb-sys to not explicitly link on Android. Does iOS have any restrictions as well?

Does iOS have any restrictions as well?

I don't know but I don't think so.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacogr picture jacogr  路  4Comments

vmenond picture vmenond  路  3Comments

gaoxiangxyz picture gaoxiangxyz  路  3Comments

retotrinkler picture retotrinkler  路  3Comments

dukei picture dukei  路  3Comments