1

I built an executable for MacOS using Brew but when I run it, it tries to access Homebrew packages/paths.

Library not loaded: /Applications/MyApp.app/Contents/Resources/homebrew/opt/libimobiledevice/lib/libimobiledevice-1.0.6.dylib

Is there a way you to build ifuse as a standalone executable to run on MacOS?

See the install steps here for ifuse: https://github.com/libimobiledevice/ifuse#installation--getting-started

Here is the Brew formula:

{
    "name": "ifuse",
    "full_name": "ifuse",
    "tap": "homebrew/core",
    "oldname": null,
    "aliases": [],
    "versioned_formulae": [],
    "desc": "FUSE module for iOS devices",
    "license": "LGPL-2.1",
    "homepage": "https://www.libimobiledevice.org/",
    "versions": {
        "stable": "1.1.4",
        "head": "HEAD",
        "bottle": true
    },
    "urls": {
        "stable": {
            "url": "https://github.com/libimobiledevice/ifuse/archive/1.1.4.tar.gz",
            "tag": null,
            "revision": null
        }
    },
    "revision": 0,
    "version_scheme": 0,
    "bottle": {
        "stable": {
            "rebuild": 0,
            "cellar": ":any",
            "prefix": "/usr/local",
            "root_url": "https://homebrew.bintray.com/bottles",
            "files": {
                "catalina": {
                    "url": "https://homebrew.bintray.com/bottles/ifuse-1.1.4.catalina.bottle.tar.gz",
                    "sha256": "cdce9fc5dbaf44641743b4a77434d340ae11cb8ed98f17b1a86a5653d2b6e1a2"
                },
                "mojave": {
                    "url": "https://homebrew.bintray.com/bottles/ifuse-1.1.4.mojave.bottle.tar.gz",
                    "sha256": "e14e4f8e0f73324dc662b47f091261f682eddc73961e3d71a07bfeb62826a1f8"
                },
                "high_sierra": {
                    "url": "https://homebrew.bintray.com/bottles/ifuse-1.1.4.high_sierra.bottle.tar.gz",
                    "sha256": "ff5577f28749cf18671eecd953e96f0c52a06dccf827dcf08e2d64f894dfdd5e"
                }
            }
        }
    },
    "keg_only": false,
    "bottle_disabled": false,
    "options": [],
    "build_dependencies": [
        "autoconf",
        "automake",
        "libtool",
        "pkg-config"
    ],
    "dependencies": [
        "glib",
        "libimobiledevice",
        "libplist"
    ],
    "recommended_dependencies": [],
    "optional_dependencies": [],
    "uses_from_macos": [],
    "requirements": [
        {
            "name": "osxfuse",
            "cask": "osxfuse",
            "download": "https://osxfuse.github.io/",
            "version": null,
            "contexts": []
        }
    ],
    "conflicts_with": [],
    "caveats": null,
    "installed": [],
    "linked_keg": null,
    "pinned": false,
    "outdated": false,
    "deprecated": true,
    "deprecation_date": "2020-11-10",
    "deprecation_reason": "requires FUSE",
    "disabled": false,
    "disable_date": null,
    "disable_reason": null,
    "analytics": {
        "install": {
            "30d": {
                "ifuse": 333,
                "ifuse --HEAD": 154
            },
            "90d": {
                "ifuse": 1176,
                "ifuse --HEAD": 268
            },
            "365d": {
                "ifuse": 8644,
                "ifuse --HEAD": 1295
            }
        },
        "install_on_request": {
            "30d": {
                "ifuse": 333,
                "ifuse --HEAD": 154
            },
            "90d": {
                "ifuse": 1176,
                "ifuse --HEAD": 268
            },
            "365d": {
                "ifuse": 8604,
                "ifuse --HEAD": 1297
            }
        },
        "build_error": {
            "30d": {
                "ifuse": 0
            }
        }
    },
    "generated_date": "2021-03-29"
}
tripleee
  • 175,061
  • 34
  • 275
  • 318
Mikeumus
  • 3,570
  • 9
  • 40
  • 65
  • Looks like this may be possible with a untar'd install of brew along with changing brew's cache/install paths: https://apple.stackexchange.com/questions/84403/how-to-use-homebrew-to-install-local-archive – Mikeumus Mar 29 '21 at 20:48

2 Answers2

5

You can now install ifuse using Homebrew, without needing to compile it, using this tap: https://github.com/gromgit/homebrew-fuse

brew install gromgit/fuse/ifuse-mac

Before you do this, ensure that you've removed osxfuse and installed macfuse (succeeds osxfuse as of v4.0.0):

brew uninstall osxfuse && \
brew install --cask macfuse
evan.bovie
  • 270
  • 2
  • 13
0

Update*

This still references osxfuse at /usr/local:

file system sandbox blocked open() of \'/usr/local/lib/libosxfuse.2.dylib

Was able to install ifuse with brew all in one folder via the following steps:

  • Install untar'd brew in a new folder:
  • copy custom brew.sh into your ./homebrew/Library/Homebrew/brew.sh, removing sudo check
  • export HOMEBREW_PREFIX="./"
  • export HOMEBREW_CACHE="./"
  • sudo ./homebrew/bin/brew install -s -f ifuse

See Brew Prefix and Cache docs here:

Mikeumus
  • 3,570
  • 9
  • 40
  • 65