Заставьте idevicerestore не работать (event-> type == IRECV_DEVICE_ADD) - PullRequest
0 голосов
/ 31 марта 2020

Я хочу установить Idevice restore на машину Kali Linux. Мой ./autogen.sh работает отлично, все библиотеки установлены в / usr / local / lib, но мой make не работает, вот сообщение об ошибке:

**adrenokrome@Adrenokrome:~/idevicerestore$ make**
make  all-recursive
make[1] : on entre dans le répertoire « /home/adrenokrome/idevicerestore »
Making all in src
make[2] : on entre dans le répertoire « /home/adrenokrome/idevicerestore/src »
  CC       idevicerestore-idevicerestore.o
In file included from dfu.h:32,
                 from idevicerestore.c:41:
common.h:110:2: error: unknown type name ‘irecv_device_event_context_t’
  110 |  irecv_device_event_context_t irecv_e_ctx;
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
idevicerestore.c:245:34: error: unknown type name ‘irecv_device_event_t’
  245 | static void irecv_event_cb(const irecv_device_event_t* event, void *userdata)
      |                                  ^~~~~~~~~~~~~~~~~~~~
idevicerestore.c: In function ‘irecv_event_cb’:
idevicerestore.c:248:11: error: request for member ‘type’ in something not a structure or union
  248 |  if (event->type == IRECV_DEVICE_ADD) {
      |           ^~
idevicerestore.c:248:21: error: ‘IRECV_DEVICE_ADD’ undeclared (first use in this function); did you mean ‘IDEVICE_DEVICE_ADD’?
  248 |  if (event->type == IRECV_DEVICE_ADD) {
      |                     ^~~~~~~~~~~~~~~~
      |                     IDEVICE_DEVICE_ADD
idevicerestore.c:248:21: note: each undeclared identifier is reported only once for each function it appears in
idevicerestore.c:250:24: error: request for member ‘device_info’ in something not a structure or union
  250 |    client->ecid = event->device_info->ecid;
      |                        ^~
idevicerestore.c:252:28: error: request for member ‘device_info’ in something not a structure or union
  252 |   if (client->ecid && event->device_info->ecid == client->ecid) {
      |                            ^~
idevicerestore.c:254:17: error: request for member ‘mode’ in something not a structure or union
  254 |    switch (event->mode) {
      |                 ^~
idevicerestore.c:274:18: error: request for member ‘type’ in something not a structure or union
  274 |  } else if (event->type == IRECV_DEVICE_REMOVE) {
      |                  ^~
idevicerestore.c:274:28: error: ‘IRECV_DEVICE_REMOVE’ undeclared (first use in this function); did you mean ‘IDEVICE_DEVICE_REMOVE’?
  274 |  } else if (event->type == IRECV_DEVICE_REMOVE) {
      |                            ^~~~~~~~~~~~~~~~~~~
      |                            IDEVICE_DEVICE_REMOVE
idevicerestore.c:275:28: error: request for member ‘device_info’ in something not a structure or union
  275 |   if (client->ecid && event->device_info->ecid == client->ecid) {
      |                            ^~
idevicerestore.c: In function ‘idevicerestore_start’:
idevicerestore.c:312:2: warning: implicit declaration of function ‘irecv_device_event_subscribe’; did you mean ‘idevice_event_subscribe’? [-Wimplicit-function-declaration]
  312 |  irecv_device_event_subscribe(&client->irecv_e_ctx, irecv_event_cb, client);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |  idevice_event_subscribe
idevicerestore.c: In function ‘idevicerestore_client_free’:
idevicerestore.c:1399:3: warning: implicit declaration of function ‘irecv_device_event_unsubscribe’; did you mean ‘idevice_event_unsubscribe’? [-Wimplicit-function-declaration]
 1399 |   irecv_device_event_unsubscribe(client->irecv_e_ctx);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   idevice_event_unsubscribe
make[2]: *** [Makefile:538: idevicerestore-idevicerestore.o] Error 1
make[2] : on quitte le répertoire « /home/adrenokrome/idevicerestore/src »
make[1]: *** [Makefile:432: all-recursive] Error 1
make[1] : on quitte le répertoire « /home/adrenokrome/idevicerestore »
make: *** [Makefile:364: all] Error 2

Я подозреваю, что путь к среде проблема, пожалуйста, помогите мне!

Ответы [ 2 ]

0 голосов
/ 02 апреля 2020

Спасибо за ваш ответ. Я решил свою проблему, переустановив все пакеты, как показано ниже:

sudo apt update
# sudo apt upgrade
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config
git clone https://github.com/libimobiledevice/libirecovery
git clone https://github.com/libimobiledevice/idevicerestore
git clone https://github.com/libimobiledevice/usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libplist

cd libplist && ./autogen.sh --without-cython && sudo make install && cd ..
cd libusbmuxd && ./autogen.sh && sudo make install && cd ..
cd libimobiledevice && ./autogen.sh --without-cython && sudo make install && cd ..
cd usbmuxd && ./autogen.sh && sudo make install && cd ..
cd libirecovery && ./autogen.sh && sudo make install && cd ..
cd idevicerestore && ./autogen.sh && sudo make install && cd ..
sudo ldconfig

возможно, пакет не обновлен или неправильно настроен путь.

0 голосов
/ 01 апреля 2020

Ваши ошибки: Может быть, вы скачали самую старую версию idevicerestore?

Реф. https://github.com/libimobiledevice: git clone https://github.com/libimobiledevice/idevicerestore.git

Предположим, что {libirecovery libplist libusbmuxd libimobiledevice} все установлено (в указанном порядке) с ./configure --prefix=/usr

cd idevicerestore/ && ./autogen.sh && ./configure && make
      ### No errors

Примечание 1: Есть могут возникнуть проблемы при создании скрипта idevicerestore / configure (из ./autogen.sh) с ОС Debian. Тогда, пожалуйста, используйте это https://www.dropbox.com/s/90zys4fbs9dq3yk/idevicerestore__configure.gz?dl=0

Примечание 2: Использовался компилятор g cc -8: 8.3.0

Установленные предварительные требования для сборки были ...

# apt install git g++ make autoconf libtool-bin pkg-config libreadline-dev libusb-1.0-0-dev libpython-all-dev libpython3-dev libssl-dev libzip-dev libcurl4-openssl-dev
...