libimobiledevice / libimobiledevice-glue

A library with common code used by libraries and tools around the libimobiledevice project
GNU Lesser General Public License v2.1
86 stars 69 forks source link

usbmuxd does not find libimobiledevice-glue #8

Closed man4567890 closed 1 year ago

man4567890 commented 2 years ago

I tried building libimobiledevice-glue by doing the following

user@MiniMac ~ % git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
Cloning into 'libimobiledevice-glue'...
remote: Enumerating objects: 116, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 116 (delta 59), reused 92 (delta 35), pack-reused 0
Receiving objects: 100% (116/116), 55.27 KiB | 1.23 MiB/s, done.
Resolving deltas: 100% (59/59), done.
user@MiniMac ~ % cd libimobiledevice-glue
user@MiniMac libimobiledevice-glue % ./autogen.sh
glibtoolize: putting auxiliary files in '.'.
glibtoolize: linking file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: linking file 'm4/libtool.m4'
glibtoolize: linking file 'm4/ltoptions.m4'
glibtoolize: linking file 'm4/ltsugar.m4'
glibtoolize: linking file 'm4/ltversion.m4'
glibtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:27: installing './compile'
configure.ac:30: installing './config.guess'
configure.ac:30: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
src/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking build system type... x86_64-apple-darwin21.1.0
checking host system type... x86_64-apple-darwin21.1.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.1.0 file names to x86_64-apple-darwin21.1.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.1.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.1.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libplist-2.0 >= 2.2.0... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for asprintf... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking for stpcpy... yes
checking for vasprintf... yes
checking for getifaddrs... yes
checking for platform-specific build settings... darwin21.1.0
checking how to run the C preprocessor... gcc -E
checking whether gcc is Clang... yes
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for pthread_once... yes
checking for pthread_cancel... yes
checking wether the C compiler supports constructor/destructor attributes... yes
checking for struct dirent.d_type... yes
checking for supported compiler flags...  -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/libimobiledevice-glue-1.0.pc
config.status: creating include/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration for libimobiledevice-glue 1.0.0:
-------------------------------------------

  Install prefix: .........: /usr/local

  Now type 'make' to build libimobiledevice-glue 1.0.0,
  and then 'make install' for installation.

user@MiniMac libimobiledevice-glue % make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
  CC       glue.lo
  CC       socket.lo
  CC       thread.lo
  CC       utils.lo
  CC       collection.lo
  CC       termcolors.lo
  CCLD     libimobiledevice-glue-1.0.la
Making all in include
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all-am'.
user@MiniMac libimobiledevice-glue % sudo make install
Password:
Making install in src
 .././install-sh -c -d '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libimobiledevice-glue-1.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libimobiledevice-glue-1.0.0.dylib /usr/local/lib/libimobiledevice-glue-1.0.0.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libimobiledevice-glue-1.0.0.dylib libimobiledevice-glue-1.0.dylib || { rm -f libimobiledevice-glue-1.0.dylib && ln -s libimobiledevice-glue-1.0.0.dylib libimobiledevice-glue-1.0.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libimobiledevice-glue-1.0.lai /usr/local/lib/libimobiledevice-glue-1.0.la
libtool: install: /usr/bin/install -c .libs/libimobiledevice-glue-1.0.a /usr/local/lib/libimobiledevice-glue-1.0.a
libtool: install: chmod 644 /usr/local/lib/libimobiledevice-glue-1.0.a
libtool: install: ranlib /usr/local/lib/libimobiledevice-glue-1.0.a
 .././install-sh -c -d '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libimobiledevice-glue-1.0.pc '/usr/local/lib/pkgconfig'
Making install in include
make[2]: Nothing to be done for `install-exec-am'.
 .././install-sh -c -d '/usr/local/include'
 .././install-sh -c -d '/usr/local/include/libimobiledevice-glue'
 /usr/bin/install -c -m 644  libimobiledevice-glue/socket.h libimobiledevice-glue/thread.h libimobiledevice-glue/utils.h libimobiledevice-glue/collection.h libimobiledevice-glue/termcolors.h '/usr/local/include/libimobiledevice-glue'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
user@MiniMac libimobiledevice-glue % 

But when I use brew to install usbmuxd, it does not find libimobiledevice-glue

user@MiniMac libimobiledevice-glue % brew install --HEAD usbmuxd                                                                                               
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 16 formulae.
==> Updated Casks
Updated 13 casks.

==> Cloning https://github.com/libimobiledevice/libusbmuxd.git
Updating /Users/diginetiot/Library/Caches/Homebrew/libusbmuxd--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 2ec5354 [github-actions] macOS: build for arm64 too
==> ./autogen.sh
Last 15 lines from /Users/diginetiot/Library/Logs/Homebrew/libusbmuxd/01.autogen.sh:
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libplist-2.0 >= 2.2.0... yes
checking for libimobiledevice-glue-1.0 >= 1.0.0... no
configure: error: Package requirements (libimobiledevice-glue-1.0 >= 1.0.0) were not met:

No package 'libimobiledevice-glue-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables limd_glue_CFLAGS
and limd_glue_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

READ THIS: https://docs.brew.sh/Troubleshooting

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
user@MiniMac libimobiledevice-glue

Please does anyone have any ideas?

MarSoft commented 2 years ago

Check which arguments and environment variables does pkg-config get when called by usbmuxd build in Homebrew. Pay attention to PKG_CONFIG and PKG_CONFIG_PATH. In general, this issue has nothing to do with libimobiledevice-glue itself, it is an issue with either Homebrew script or your system configuration.

nikias commented 1 year ago

What @MarSoft said.