1

我想使用 ndk 将 libimobiledevice 移植到 android,以使 android 设备能够与 iphone 通信,并将数据从 iphone 导入到 android 设备。我发现这个项目使用 autoconf。所以我使用以下命令进行交叉编译

./configure --build=x86_64-pc-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi CPPFLAGS="-I$ANDROID_NDK/platforms/android-14/arch-arm/usr/include -I$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -I$ANDROID_NDK/sources/crystax/include" CFLAGS="-nostdlib" LDFLAGS="-Wl,-rpath-link=$ANDROID_NDK/platforms/android-14/arch-arm/usr/lib -L$ANDROID_NDK/platforms/android-14/arch-arm/usr/lib" LIBS="-lc"

但遇到一些错误,找不到 pthread python。

checking for pthread_create, pthread_mutex_lock in -lpthread... no
configure: error: libpthread is required to build libimobiledevice


checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python2.7
checking for Python library path... -L/usr/lib/python2.7 -lpython2.7
checking for Python site-packages path... /usr/lib/python2.7/site-packages
checking python extra libraries...  -ldl
checking python extra linking flags...
checking consistency of all components of python development environment... no
configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================
4

0 回答 0