Homebrew installation of libimobiledevice from HEAD fails with missing package libimobiledevice-glue-1.0

This issue has been tracked since 2021-09-21.

Trying to install libimobiledevice from HEAD on macOS Big Sur version 11.6 fails:

~ % brew install --HEAD libimobiledevice
==> Cloning https://git.libimobiledevice.org/libimobiledevice.git
Updating /Users/164485/Library/Caches/Homebrew/libimobiledevice--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at bd2e446 [github-actions] Add an explicit apt-get update before attempting to install packages on ubuntu
==> ./autogen.sh
Last 15 lines from /Users/164485/Library/Logs/Homebrew/libimobiledevice/01.autogen.sh:
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 libusbmuxd-2.0 >= 2.0.2... 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.

felipemengatto wrote this answer on 2021-09-22

Does anyone have any idea how to solve this?

mexmer wrote this answer on 2021-09-22

you need to install libimobiledevice-glue ... no idea if it's available on homebrew, but it is available on github
https://github.com/libimobiledevice/libimobiledevice-glue

nikias wrote this answer on 2021-09-22

The brew formulae are outdated, and there isn't one for libimobiledevice-glue yet.

felipemengatto wrote this answer on 2021-09-22

In our case, we cloned the project and did the build/install manually. For now let's keep this workaround.
Thanks @edugaedke for your help.

image

ewscripps-jb wrote this answer on 2021-09-22

So should Homebrew be used to install the dependencies (libusbmuxd, libplist, etc.) or should each project be downloaded, then build and install? Will a combination of brew installs and local builds possibly cause confusion?

~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libimobiledevice-glue-1.0.0.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/libimobiledevice-glue/collection.h
/usr/local/include/libimobiledevice-glue/socket.h
/usr/local/include/libimobiledevice-glue/termcolors.h
/usr/local/include/libimobiledevice-glue/thread.h
/usr/local/include/libimobiledevice-glue/utils.h

Warning: Unbrewed '.la' files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.la' files:
/usr/local/lib/libimobiledevice-glue-1.0.la

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.pc' files:
/usr/local/lib/pkgconfig/libimobiledevice-glue-1.0.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libimobiledevice-glue-1.0.a

ewscripps-jb wrote this answer on 2021-09-29

@felipemengatto How did you get libplist to see that libimobiledevice-glue-1.0 was installed? Is there another step after make and make install?

felipemengatto wrote this answer on 2021-10-04

There is no longer any command, we just installed other libraries that we used and everything worked fine. @ewscripps-jb

          - brew install libplist || echo 'fails because libimobiledevice-glue is missing'
          - git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
          - cd libimobiledevice-glue
          - ./autogen.sh
          - make
          - sudo make install
          - cd ..
          - brew install librsvg
          - brew install imagemagick
          - brew upgrade node
          - cd ios
          - RBENV_VERSION=2.5.1 pod install
ewscripps-jb wrote this answer on 2021-10-06

@felipemengatto - Thank you for your time! I will give it another try to see if I can get libimobiledevice --HEAD installed on macOS Big Sur.

ewscripps-jb wrote this answer on 2021-10-07

Any assistance would be appreciated. Even after installing libimobiledevice-glue from source, I am getting No package 'libimobiledevice-glue-1.0' found message when trying to install other libimobiledevice packages. I set the PKG_CONFIG_PATH to where libimobiledevice-glue-1.0.pc file was located as seen below.

% export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

~ % brew install --HEAD libusbmuxd
==> Cloning https://github.com/libimobiledevice/libusbmuxd.git
Updating /Users/164485/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/164485/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.

sindujaramaraj wrote this answer on 2021-10-07

+1

tomriddly wrote this answer on 2021-10-12

Any assistance would be appreciated. Even after installing libimobiledevice-glue from source, I am getting No package 'libimobiledevice-glue-1.0' found message when trying to install other libimobiledevice packages. I set the PKG_CONFIG_PATH to where libimobiledevice-glue-1.0.pc file was located as seen below.

% export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

~ % brew install --HEAD libusbmuxd ==> Cloning https://github.com/libimobiledevice/libusbmuxd.git Updating /Users/164485/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/164485/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.

You may have to do this manually

# load all brew pkgconfig
export PKG_CONFIG_PATH=$(find /usr/local/Cellar -name 'pkgconfig' -type d | grep lib/pkgconfig | tr '\n' ':' | sed s/.$//)
# load glue pkgconfig
export PKG_CONFIG_PATH={where glue pkginfo}:$PKG_CONFIG_PATH

Then, you have to enter ~/Library/Caches/Homebrew/libusbmuxd--git, get first 7 digits of commit hash from latest commit.
image

./autogen.sh --prefix=/usr/local/Cellar/libusbmuxd/HEAD-2ec5354
make
make install
brew link --overwrite libusbmuxd

Use the same operation on libimobiledevice with --prefix=/usr/local/Cellar/libimobiledevice/HEAD-{hash}. You will have to clone repo manually due to error repo on brew.

topeerz wrote this answer on 2022-01-10
21

I was able to make it work on my machine ... There seem to be two issues to be addressed;
1) The installation of libimobiledevice-glue.
There seem to be no brew formula for that yet.
This may be addressed by downloading & building library separately of brew OR by creating new brew rule via

brew create "https://github.com/libimobiledevice/libimobiledevice-glue.git"
brew edit libimobiledevice-glue
brew install --HEAD libimobiledevice-glue

My crude rule looks like this (it should be optimised and I removed inline comments here hence weird line numbers).

  4 class LibimobiledeviceGlue < Formula
  5   desc ""
  6   homepage ""
  7   license ""
  8   head "https://github.com/libimobiledevice/libimobiledevice-glue.git"
 11
 12   depends_on "autoconf" => :build
 13   depends_on "automake" => :build
 14   depends_on "libtool" => :build
 15   depends_on "pkg-config" => :build
 16   depends_on "libplist"
 17
 18   def install
 22     system "./autogen.sh", "--prefix=#{prefix}"
 30     system "make", "install"
 31   end
 32
 33 end

2 Installation of libimobiledevice head
In order to do that I have updated original recipe by adding reference to libimobiledevice-glue I have just installed as dependance. The brew seems to create custom PKG_CONFIG_PATH which overrides the system one so without this step I was seeing pkg tool errors (as described in previous comments).

brew edit libimobiledevice

 31   depends_on "libimobiledevice-glue"

At this point I was able to run successfully (please note you may need to unlink previous version of libimobiledevice if it has been already installed)

brew install --HEAD libimobiledevice

Debugging
I was able to get some details by running

brew install --HEAD libimobiledevice --verbose --debug
Once build failed I have select 5 (shell). Then I was able to call
pkg-config libimobiledevice-glue-1.0 --modversion
to verify lib is found as well as version visible to brew ...

tomriddly wrote this answer on 2022-01-10
tomriddly wrote this answer on 2022-01-11

This is a much easier way approved to be useful.

PS:
depends_on "libimobiledevice-glue"
libusbmuxd will also need this line.

annazolkieve wrote this answer on 2022-01-28

install:

$ make install
Making install in src
 /opt/local/bin/gmkdir -p '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /opt/local/bin/ginstall -c   libimobiledevice-glue-1.0.la '/usr/local/lib'
libtool: install: /opt/local/bin/ginstall -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: /opt/local/bin/ginstall -c .libs/libimobiledevice-glue-1.0.lai /usr/local/lib/libimobiledevice-glue-1.0.la
libtool: install: /opt/local/bin/ginstall -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
 /opt/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
 /opt/local/bin/ginstall -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'.
 /opt/local/bin/gmkdir -p '/usr/local/include'
 /opt/local/bin/gmkdir -p '/usr/local/include/libimobiledevice-glue'
 /opt/local/bin/ginstall -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'.

then:

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.

why? how to fix?

tomriddly wrote this answer on 2022-01-28
-3
annazolkieve wrote this answer on 2022-01-28

@annazolkieve fixed with export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

Guest wrote this answer on 2021-12-27

 brew install libimobiledevice

More Details About Repo
Owner Name libimobiledevice
Repo Name libimobiledevice
Full Name libimobiledevice/libimobiledevice
Language C
Created Date 2013-02-13
Updated Date 2022-09-26
Star Count 5197
Watcher Count 236
Fork Count 1124
Issue Count 620

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date