Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Undefined symbols for architecture x86_64' when compiling #144

Closed
antonioag95 opened this issue Oct 13, 2019 · 14 comments
Closed

'Undefined symbols for architecture x86_64' when compiling #144

antonioag95 opened this issue Oct 13, 2019 · 14 comments

Comments

@antonioag95
Copy link

macOS 10.14.6

MacBook-di-Antonio:tsschecker antonio$ make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in tsschecker
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-tsschecker.o -MD -MP -MF .deps/tsschecker-tsschecker.Tpo -c -o tsschecker-tsschecker.o `test -f 'tsschecker.c' || echo './'`tsschecker.c
tsschecker.c:817:18: warning: data argument not used by format string
      [-Wformat-extra-args]
                 devVals->deviceBoard, devVals->deviceModel, BbGoldCertI...
                 ^
./debug.h:14:28: note: expanded from macro 'info'
#define info(a ...) printf(a)
                           ^
tsschecker.c:1097:2: warning: print devices function doesn't actually check if
      devices are sorted. it assues they are sorted in json [-W#warnings]
#warning print devices function doesn't actually check if devices are so...
 ^
2 warnings generated.
mv -f .deps/tsschecker-tsschecker.Tpo .deps/tsschecker-tsschecker.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-tss.o -MD -MP -MF .deps/tsschecker-tss.Tpo -c -o tsschecker-tss.o `test -f 'tss.c' || echo './'`tss.c
tss.c:673:7: warning: implicit declaration of function '_plist_dict_get_bool' is
      invalid in C99 [-Wimplicit-function-declaration]
                if (_plist_dict_get_bool(parameters, "_OnlyFWComponents")) {
                    ^
tss.c:724:24: warning: implicit declaration of function '_plist_dict_get_uint'
      is invalid in C99 [-Wimplicit-function-declaration]
        uint64_t bb_chip_id = _plist_dict_get_uint(parameters, "BbChipID");
                              ^
tss.c:1267:11: warning: implicit declaration of function '_plist_dict_get_uint'
      is invalid in C99 [-Wimplicit-function-declaration]
        u64val = _plist_dict_get_uint(parameters, "Rap,BoardID");
                 ^
tss.c:1281:9: warning: implicit declaration of function '_plist_dict_get_bool'
      is invalid in C99 [-Wimplicit-function-declaration]
        bval = _plist_dict_get_bool(parameters, "Rap,ProductionMode");
               ^
tss.c:1356:11: warning: implicit declaration of function '_plist_dict_get_uint'
      is invalid in C99 [-Wimplicit-function-declaration]
        u64val = _plist_dict_get_uint(parameters, "BMU,BoardID");
                 ^
tss.c:1367:9: warning: implicit declaration of function '_plist_dict_get_bool'
      is invalid in C99 [-Wimplicit-function-declaration]
        bval = _plist_dict_get_bool(parameters, "ProductionMode");
               ^
6 warnings generated.
mv -f .deps/tsschecker-tss.Tpo .deps/tsschecker-tss.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-download.o -MD -MP -MF .deps/tsschecker-download.Tpo -c -o tsschecker-download.o `test -f 'download.c' || echo './'`download.c
mv -f .deps/tsschecker-download.Tpo .deps/tsschecker-download.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-main.o -MD -MP -MF .deps/tsschecker-main.Tpo -c -o tsschecker-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/tsschecker-main.Tpo .deps/tsschecker-main.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT libjssy_a-jssy.o -MD -MP -MF .deps/libjssy_a-jssy.Tpo -c -o libjssy_a-jssy.o `test -f '../external/jssy/jssy/jssy.c' || echo './'`../external/jssy/jssy/jssy.c
mv -f .deps/libjssy_a-jssy.Tpo .deps/libjssy_a-jssy.Po
rm -f libjssy.a
ar cru libjssy.a libjssy_a-jssy.o 
ranlib libjssy.a
/bin/sh ../libtool  --tag=CC   --mode=link gcc -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -L/usr/local/lib -lplist -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib -lfragmentzip -lzip -lcurl -lz -lcurl  -L/usr/local/lib -lirecovery -lm  -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o -L/usr/local/lib -lplist -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib -lfragmentzip -lzip -lcurl -lz -lcurl  -L/usr/local/lib -lirecovery -lm libjssy.a 
libtool: link: gcc -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include -I/usr/local/include -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o  -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib /usr/local/lib/libplist.dylib /usr/local/lib/libfragmentzip.dylib -lzip -lz -lcurl /usr/local/lib/libirecovery.dylib -lm libjssy.a -framework CoreFoundation -framework IOKit -pthread
Undefined symbols for architecture x86_64:
  "__plist_dict_get_bool", referenced from:
      _tss_request_add_ap_tags in tsschecker-tss.o
      _tss_request_add_rose_tags in tsschecker-tss.o
      _tss_request_add_veridian_tags in tsschecker-tss.o
  "__plist_dict_get_uint", referenced from:
      _tss_request_add_baseband_tags in tsschecker-tss.o
      _tss_request_add_rose_tags in tsschecker-tss.o
      _tss_request_add_veridian_tags in tsschecker-tss.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tsschecker] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
MacBook-di-Antonio:tsschecker antonio$
@s0uthwest
Copy link
Contributor

s0uthwest commented Oct 13, 2019

Are you compiling with latest version of libplist and other depends?

@antonioag95
Copy link
Author

antonioag95 commented Oct 13, 2019

Yes, libplist and other dependencies are updated

EDIT: Tried also on Ubuntu 18.04

antonio@antonio:~/tsschecker$ make
make  all-recursive
make[1]: Entering directory '/home/antonio/tsschecker'
Making all in tsschecker
make[2]: Entering directory '/home/antonio/tsschecker/tsschecker'
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT libjssy_a-jssy.o -MD -MP -MF .deps/libjssy_a-jssy.Tpo -c -o libjssy_a-jssy.o `test -f '../external/jssy/jssy/jssy.c' || echo './'`../external/jssy/jssy/jssy.c
mv -f .deps/libjssy_a-jssy.Tpo .deps/libjssy_a-jssy.Po
rm -f libjssy.a
ar cru libjssy.a libjssy_a-jssy.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libjssy.a
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-tsschecker.o -MD -MP -MF .deps/tsschecker-tsschecker.Tpo -c -o tsschecker-tsschecker.o `test -f 'tsschecker.c' || echo './'`tsschecker.c
In file included from tss.h:33:0,
                 from tsschecker.h:20,
                 from tsschecker.c:19:
tsschecker.c: In function ‘tss_populate_random’:
tsschecker.c:742:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
     debug("[TSSR] ecid=%llu\n",devVals->ecid);
           ^                    ~~~~~~~~~~
debug.h:17:55: note: in definition of macro ‘debug’
 #define debug(a ...) if (idevicerestore_debug) printf(a)
                                                       ^
tsschecker.c: In function ‘tssrequest’:
tsschecker.c:816:18: warning: too many arguments for format [-Wformat-extra-arg]
             info("\n[TSSR] Found undocumented baseband\n\n",
                  ^
debug.h:14:28: note: in definition of macro ‘info’
 #define info(a ...) printf(a)
                            ^
tsschecker.c: At top level:
tsschecker.c:1097:38: warning: missing terminating ' character
 #warning print devices function doesn't actually check if devices are sorted. it assues they are sorted in json
                                      ^
tsschecker.c:1097:2: warning: #warning print devices function doesn't actually check if devices are sorted. it assues they are sorted in json [-Wcpp]
 #warning print devices function doesn't actually check if devices are sorted. it assues they are sorted in json
  ^~~~~~~
tsschecker.c: In function ‘getFirmwareJson’:
tsschecker.c:238:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
     fread(fJson, fsize, 1, f);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
tsschecker.c: In function ‘getOtaJson’:
tsschecker.c:254:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
     fread(fJson, fsize, 1, f);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
tsschecker.c: In function ‘getBuildManifest’:
tsschecker.c:526:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
     fread(buildmanifest, fsize, 1, f);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tsschecker.c: In function ‘isManifestSignedForDevice’:
tsschecker.c:985:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
     fread(bufManifest, fsize, 1, fmanifest);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/tsschecker-tsschecker.Tpo .deps/tsschecker-tsschecker.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-tss.o -MD -MP -MF .deps/tsschecker-tss.Tpo -c -o tsschecker-tss.o `test -f 'tss.c' || echo './'`tss.c
tss.c: In function ‘tss_request_add_ap_tags’:
tss.c:673:7: warning: implicit declaration of function ‘_plist_dict_get_bool’; did you mean ‘plist_dict_get_item’? [-Wimplicit-function-declaration]
   if (_plist_dict_get_bool(parameters, "_OnlyFWComponents")) {
       ^~~~~~~~~~~~~~~~~~~~
       plist_dict_get_item
tss.c: In function ‘tss_request_add_baseband_tags’:
tss.c:724:24: warning: implicit declaration of function ‘_plist_dict_get_uint’; did you mean ‘plist_dict_get_size’? [-Wimplicit-function-declaration]
  uint64_t bb_chip_id = _plist_dict_get_uint(parameters, "BbChipID");
                        ^~~~~~~~~~~~~~~~~~~~
                        plist_dict_get_size
tss.c: In function ‘tss_request_add_savage_tags’:
tss.c:1058:27: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
         *component_name = strdup(comp_name);
                           ^~~~~~
                           strcmp
tss.c:1058:25: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         *component_name = strdup(comp_name);
                         ^
mv -f .deps/tsschecker-tss.Tpo .deps/tsschecker-tss.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-download.o -MD -MP -MF .deps/tsschecker-download.Tpo -c -o tsschecker-download.o `test -f 'download.c' || echo './'`download.c
mv -f .deps/tsschecker-download.Tpo .deps/tsschecker-download.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -MT tsschecker-main.o -MD -MP -MF .deps/tsschecker-main.Tpo -c -o tsschecker-main.o `test -f 'main.c' || echo './'`main.c
In file included from download.h:14:0,
                 from main.c:24:
main.c: In function ‘main’:
main.c:337:18: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
             info("[TSSC] manually specified ecid to use, parsed \"%s\" to dec:%lld hex:%llx\n",ecid,devVals.ecid,devVals.ecid);
                  ^                                                                                  ~~~~~~~~~
debug.h:14:28: note: in definition of macro ‘info’
 #define info(a ...) printf(a)
                            ^
main.c:337:18: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
             info("[TSSC] manually specified ecid to use, parsed \"%s\" to dec:%lld hex:%llx\n",ecid,devVals.ecid,devVals.ecid);
                  ^                                                                                               ~~~~~~~~~
debug.h:14:28: note: in definition of macro ‘info’
 #define info(a ...) printf(a)
                            ^
main.c:298:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
         fread(buf, 1, bufSize, f);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/tsschecker-main.Tpo .deps/tsschecker-main.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu  -I/usr/local/include -I/usr/include/libusb-1.0  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -L/usr/local/lib -lplist -L/usr/local/lib -lfragmentzip -lzip -lcurl -lz -lcurl -lcrypto -L/usr/local/lib -lirecovery -lm  -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o -L/usr/local/lib -lplist -L/usr/local/lib -lfragmentzip -lzip -lcurl -lz -lcurl -lcrypto -L/usr/local/lib -lirecovery -lm libjssy.a 
libtool: link: gcc -I/usr/local/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/usr/include/libusb-1.0 -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o  -L/usr/local/lib /usr/local/lib/libplist.so /usr/local/lib/libfragmentzip.so -lzip -lz /usr/lib/x86_64-linux-gnu/libcurl.so -lcrypto /usr/local/lib/libirecovery.so -lm libjssy.a -pthread
tsschecker-tss.o: In function `tss_request_add_ap_tags':
/home/antonio/tsschecker/tsschecker/tss.c:673: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:675: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:675: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:675: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:675: undefined reference to `_plist_dict_get_bool'
tsschecker-tss.o: In function `tss_request_add_baseband_tags':
/home/antonio/tsschecker/tsschecker/tss.c:724: undefined reference to `_plist_dict_get_uint'
tsschecker-tss.o: In function `tss_request_add_rose_tags':
/home/antonio/tsschecker/tsschecker/tss.c:1267: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1270: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1273: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1281: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:1284: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1287: undefined reference to `_plist_dict_get_bool'
tsschecker-tss.o: In function `tss_request_add_veridian_tags':
/home/antonio/tsschecker/tsschecker/tss.c:1356: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1359: undefined reference to `_plist_dict_get_uint'
/home/antonio/tsschecker/tsschecker/tss.c:1367: undefined reference to `_plist_dict_get_bool'
/home/antonio/tsschecker/tsschecker/tss.c:1370: undefined reference to `_plist_dict_get_uint'
collect2: error: ld returned 1 exit status
Makefile:519: recipe for target 'tsschecker' failed
make[2]: *** [tsschecker] Error 1
make[2]: Leaving directory '/home/antonio/tsschecker/tsschecker'
Makefile:408: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/antonio/tsschecker'
Makefile:340: recipe for target 'all' failed
make: *** [all] Error 2

@s0uthwest
Copy link
Contributor

s0uthwest commented Oct 13, 2019

Strange, I pushed latest TSS changes from libimobiledevice…
It’s a problem with libplist dependency, I think…

@riotdream
Copy link

and so? what's the solution? update libplist?

@kasiimh1
Copy link
Contributor

Latest changes pulled for the dependencies


Making all in tsschecker
/bin/sh ../libtool  --tag=CC   --mode=link gcc -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include   -I/usr/local/include  -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -L/usr/local/lib -lplist -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib -lfragmentzip -lzip -lcurl -lz -lcurl  -L/usr/local/lib -lirecovery -lm  -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o -L/usr/local/lib -lplist -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib -lfragmentzip -lzip -lcurl -lz -lcurl  -L/usr/local/lib -lirecovery -lm libjssy.a 
libtool: link: gcc -I/usr/local/include -I/usr/local/include -I/usr/local/Cellar/libzip/1.5.2/include -I/usr/local/include -I../external/jssy/jssy/ -g -O2 -std=c11 -D TSSCHECKER_VERSION_COUNT=\"294\" -D TSSCHECKER_VERSION_SHA=\"04c4044893513248c46a45ef250de544856d9a9e\" -o tsschecker tsschecker-tsschecker.o tsschecker-tss.o tsschecker-download.o tsschecker-main.o  -L/usr/local/lib -L/usr/local/Cellar/libzip/1.5.2/lib /usr/local/lib/libplist.dylib /usr/local/lib/libfragmentzip.dylib -lzip -lz -lcurl /usr/local/lib/libirecovery.dylib -lm libjssy.a -framework CoreFoundation -framework IOKit -pthread
Undefined symbols for architecture x86_64:
  "__plist_dict_get_bool", referenced from:
      _tss_request_add_ap_tags in tsschecker-tss.o
      _tss_request_add_rose_tags in tsschecker-tss.o
      _tss_request_add_veridian_tags in tsschecker-tss.o
  "__plist_dict_get_uint", referenced from:
      _tss_request_add_baseband_tags in tsschecker-tss.o
      _tss_request_add_rose_tags in tsschecker-tss.o
      _tss_request_add_veridian_tags in tsschecker-tss.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@s0uthwest
Copy link
Contributor

Changes in TSS file dropped by libimobiledevice. I’m seeing the problem, but it’s dependency, yes — libplist…

@badheli
Copy link

badheli commented Oct 17, 2019

update libplist is not work!

__plist_dict_get_bool and __plist_dict_get_uint can be found in idevicerestore

  • idevicerestore/src/common.c

uint64_t _plist_dict_get_uint(plist_t dict, const char *key)
{
	uint64_t uintval = 0;
	char *strval = NULL;
	uint64_t strsz = 0;
	plist_t node = plist_dict_get_item(dict, key);
	if (!node) {
		return (uint64_t)-1LL;
	}
	switch (plist_get_node_type(node)) {
	case PLIST_UINT:
		plist_get_uint_val(node, &uintval);
		break;
	case PLIST_STRING:
		plist_get_string_val(node, &strval);
		if (strval) {
			uintval = strtoull(strval, NULL, 0);
			free(strval);
		}
		break;
	case PLIST_DATA:
		plist_get_data_val(node, &strval, &strsz);
		if (strval) {
			if (strsz == 8) {
				uintval = le64toh(*(uint64_t*)strval);
			} else if (strsz == 4) {
				uintval = le32toh(*(uint32_t*)strval);
			} else if (strsz == 2) {
				uintval = le16toh(*(uint16_t*)strval);
			} else if (strsz == 1) {
				uintval = strval[0];
			} else {
				error("%s: ERROR: invalid size %d for data to integer conversion\n", __func__, strsz);
			}
			free(strval);
		}
		break;
	default:
		break;
	}
	return uintval;
}

uint8_t _plist_dict_get_bool(plist_t dict, const char *key)
{
	uint8_t bval = 0;
	uint64_t uintval = 0;
	char *strval = NULL;
	uint64_t strsz = 0;
	plist_t node = plist_dict_get_item(dict, key);
	if (!node) {
		return 0;
	}
	switch (plist_get_node_type(node)) {
	case PLIST_BOOLEAN:
		plist_get_bool_val(node, &bval);
		break;
	case PLIST_UINT:
		plist_get_uint_val(node, &uintval);
		bval = (uint8_t)uintval;
		break;
	case PLIST_STRING:
		plist_get_string_val(node, &strval);
		if (strval) {
			if (strcmp(strval, "true")) {
				bval = 1;
			} else if (strcmp(strval, "false")) {
				bval = 0;
			}
			free(strval);
		}
		break;
	case PLIST_DATA:
		plist_get_data_val(node, &strval, &strsz);
		if (strval) {
			if (strsz == 1) {
				bval = strval[0];
			} else {
				error("%s: ERROR: invalid size %d for data to boolean conversion\n", __func__, strsz);
			}
			free(strval);
		}
		break;
	default:
		break;
	}
	return bval;
}

The temporary solution: copy it to tss.c file and rebuild!

@s0uthwest
Copy link
Contributor

s0uthwest commented Oct 17, 2019

Oh… I’ll push the changes later after update to macOS Catalina, thanks…

@Siguza
Copy link
Contributor

Siguza commented Oct 28, 2019

Paging @s0uthwest, can @badheli's solution be merged? Seems like that simple change makes it compile...

@cvanelteren
Copy link

What's the fix for linux user?

@kasiimh1
Copy link
Contributor

kasiimh1 commented Nov 3, 2019

@Siguza @s0uthwest Yeah can confirm it compiles and works after making that change.

@s0uthwest
Copy link
Contributor

@kasiimh1, create a pull request

@kasiimh1
Copy link
Contributor

kasiimh1 commented Nov 4, 2019

@kasiimh1, create a pull request

Done! @s0uthwest

@s0uthwest
Copy link
Contributor

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants