corellium / usbfluxd

Redirects the standard usbmuxd socket to allow connections to local and remote usbmuxd instances so remote devices appear connected locally.
GNU General Public License v2.0
352 stars 48 forks source link

/opt/libplist/src/plist.c:1236: undefined reference to `fmin' #5

Closed copperpanda closed 3 years ago

copperpanda commented 3 years ago

After installing the dependencies, I can successfully run ./autogen. When running make I get an error around a reference to fmin. Running on Ubuntu 20.10.

mobile@mobileVM:/opt/usbfluxd$ sudo make
make  all-recursive
make[1]: Entering directory '/opt/usbfluxd'
Making all in usbfluxd
make[2]: Entering directory '/opt/usbfluxd/usbfluxd'
  CC       usbfluxd-client.o
  CC       usbfluxd-socket.o
  CC       usbfluxd-usbmux_remote.o
usbmux_remote.c:944:7: warning: no previous declaration for ‘check_remote_func’ [-Wmissing-declarations]
  944 | void *check_remote_func(void* data)
      |       ^~~~~~~~~~~~~~~~~
  CC       usbfluxd-log.o
  CC       usbfluxd-utils.o
  CC       usbfluxd-main.o
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from main.c:30:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
  CCLD     usbfluxd
/usr/bin/ld: /usr/local/lib/libplist-2.0.a(plist.o): in function `plist_real_val_compare':
/opt/libplist/src/plist.c:1236: undefined reference to `fmin'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:417: usbfluxd] Error 1
make[2]: Leaving directory '/opt/usbfluxd/usbfluxd'
make[1]: *** [Makefile:413: all-recursive] Error 1
make[1]: Leaving directory '/opt/usbfluxd'
make: *** [Makefile:345: all] Error 2
strazzere commented 3 years ago

Which version of libplist have you installed? I believe the one in most of the apt repositories are not the correct one. I've utilized the one from https://github.com/libimobiledevice/libplist and it worked for me. Though I'm also not running 20.10

copperpanda commented 3 years ago

I installed libplist from the link in the README.

Just removed any libplist using apt-get remove libplist* Reinstalled libplist-2.0 from the link in the README. Same error on make in usbfluxd

strazzere commented 3 years ago

This seems relevant to your error; https://github.com/libimobiledevice/libplist/issues/157

If you're still unable to get plist to work - we also have releases pinned.

strazzere commented 3 years ago

@copperpanda Can you please repull from https://github.com/corellium/usbfluxd/commit/56e79095064e4972b7468c6a091dad3c0aa7996f ?

I was able to reproduce this issue by forcing libplist to use gcc vs clang (Oddly they do this which was hiding it from me https://github.com/libimobiledevice/libplist/issues/190 ). Then when compiling usbfluxd I hit the same issue. I've added the search for libm for the fmin function so it should be automatically linked now when needed.

Thanks for reporting this issue! Let me know if it doesn't work.

copperpanda commented 3 years ago

That seemed to do it! Thank you very much for the quick turn around on this issue, much appreciated!