实际上,我是在第二次编译libimobiledevice。我很久以前就用过了。但这次我遇到了如下所示的错误:
Configuration for libimobiledevice 1.3.1:
-------------------------------------------
Install prefix: .........: /usr/local
Debug code ..............: no
Python bindings .........: yes
SSL support backend .....: OpenSSL
Now type 'make' to build libimobiledevice 1.3.1,
and then 'make install' for installation.
make all-recursive
make[1]: Entering directory '/home/ghosthackz/ios/libimobiledevice'
Making all in common
make[2]: Entering directory '/home/ghosthackz/ios/libimobiledevice/common'
CC socket.lo
CC thread.lo
CC debug.lo
CC userpref.lo
CC utils.lo
CCLD libinternalcommon.la
make[2]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/common'
Making all in src
make[2]: Entering directory '/home/ghosthackz/ios/libimobiledevice/src'
CC idevice.lo
CC service.lo
CC property_list_service.lo
CC device_link_service.lo
CC lockdown.lo
CC afc.lo
afc.c: In function ‘afc_make_link’:
afc.c:1012:11: warning: unused variable ‘type’ [-Wunused-variable]
1012 | uint64_t type = htole64(linktype);
| ^~~~
CC file_relay.lo
CC notification_proxy.lo
CC installation_proxy.lo
CC sbservices.lo
CC mobile_image_mounter.lo
CC screenshotr.lo
CC mobilesync.lo
CC mobilebackup.lo
CC house_arrest.lo
CC mobilebackup2.lo
CC misagent.lo
CC restore.lo
CC diagnostics_relay.lo
CC heartbeat.lo
CC debugserver.lo
debugserver.c: In function ‘debugserver_client_set_argv’:
debugserver.c:582:3: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
582 | asprintf(&prefix, ",%d,%d,", (int)strlen(argv[i]) * 2, i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debugserver.c:603:3: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
603 | asprintf(&prefix, ",%d,%d,", arg_hexlen, i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC webinspector.lo
CC mobileactivation.lo
CC preboard.lo
CC companion_proxy.lo
CC syslog_relay.lo
CCLD libimobiledevice-1.0.la
make[2]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/src'
Making all in include
make[2]: Entering directory '/home/ghosthackz/ios/libimobiledevice/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/include'
Making all in cython
make[2]: Entering directory '/home/ghosthackz/ios/libimobiledevice/cython'
/usr/bin/cython -I/usr/local/include/plist/cython -I../src -o imobiledevice.c imobiledevice.pyx
/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/ghosthackz/ios/libimobiledevice/cython/imobiledevice.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: imobiledevice.pxd:6:4: Exception already a builtin Cython type
make all-am
make[3]: Entering directory '/home/ghosthackz/ios/libimobiledevice/cython'
CC imobiledevice_la-imobiledevice.lo
CCLD imobiledevice.la
make[3]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/cython'
make[2]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/cython'
Making all in tools
make[2]: Entering directory '/home/ghosthackz/ios/libimobiledevice/tools'
CC idevice_id-idevice_id.o
CCLD idevice_id
CC ideviceinfo-ideviceinfo.o
CCLD ideviceinfo
CC idevicename-idevicename.o
CCLD idevicename
CC idevicepair-idevicepair.o
CCLD idevicepair
CC idevicesyslog-idevicesyslog.o
CCLD idevicesyslog
CC ideviceimagemounter-ideviceimagemounter.o
CCLD ideviceimagemounter
CC idevicescreenshot-idevicescreenshot.o
CCLD idevicescreenshot
/usr/bin/ld: idevicescreenshot-idevicescreenshot.o: undefined reference to symbol 'log10@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:769: idevicescreenshot] Error 1
make[2]: Leaving directory '/home/ghosthackz/ios/libimobiledevice/tools'
make[1]: *** [Makefile:455: all-recursive] Error 1
make[1]: Leaving directory '/home/ghosthackz/ios/libimobiledevice'
make: *** [Makefile:385: all] Error 2我使用bash脚本实现自动化:
#!/bin/bash
function build() {
libs=( "libplist" "libusbmuxd" "libimobiledevice" "usbmuxd" "libirecovery" \
"ideviceinstaller" "libideviceactivation" "idevicerestore" "ifuse" )
buildlibs() {
for i in "${libs[@]}"
do
git clone https://github.com/libimobiledevice/${i}.git
cd $i
./autogen.sh
make && sudo make install
cd ..
done
}
buildlibs
if [[ -e $(which ldconfig) ]]; then
ldconfig
else
echo "done"
fi
}
build
if [[ $(uname) == 'Linux' ]]; then
sudo ldconfig
fi我已经安装了以下构建包:
sudo apt-get install \
build-essential \
checkinstall \
git \
autoconf \
automake \
libtool-bin \
libplist-dev \
libusbmuxd-dev \
libssl-dev \
usbmuxd \
cython我做错了什么?你能帮帮我吗?这是我的第一个问题。如果我的问题包含了太多的细节,我很抱歉。
发布于 2020-12-15 21:46:10
libimobiledevice中有一个bug,需要它链接到libm。那是fixed a couple of days ago,所以我建议你从GitHub获取最新的源代码,然后再试一次。这应该可以解决这个问题。
https://stackoverflow.com/questions/65266359
复制相似问题