macos-fuse-t / fuse-t

Other
816 stars 3 forks source link

Adding dependecy on other fuse tab #6

Closed benjioh5 closed 1 year ago

benjioh5 commented 1 year ago

Thx for #3 issue.

Most macfuse users used this homebrew tab https://github.com/gromgit/homebrew-fuse

And using this tab, macfuse users easily add few fses. e.g. https://github.com/s3fs-fuse/s3fs-fuse#installation

brew install --cask osxfuse
brew install gromgit/fuse/s3fs-mac

but, if I use macos-fuse-t, error occured.

sshfs-mac: This formula requires macFUSE. Please run `brew install --cask macfuse` first.
Error: sshfs-mac: An unsatisfied requirement failed this build.

I opened Issus on https://github.com/gromgit/homebrew-fuse/issues/41 and could you check out dependency and Interoperability of macfuse formula?

benjioh5 commented 1 year ago

I have no time to checkout whole code of https://github.com/macos-fuse-t/sshfs and https://github.com/osxfuse/sshfs . So, I think check out all of macfuse components before adding dependency.

Same as these formulas.

gromgit/fuse/afuse-mac
gromgit/fuse/archivemount-mac
gromgit/fuse/avfs-mac
gromgit/fuse/bindfs-mac
gromgit/fuse/btfs-mac
gromgit/fuse/cryfs-mac
gromgit/fuse/curlftpfs-mac
gromgit/fuse/dislocker-mac
gromgit/fuse/encfs-mac
gromgit/fuse/ext2fuse-mac
gromgit/fuse/ext4fuse-mac
gromgit/fuse/fuse-zip-mac
gromgit/fuse/gcsfuse-mac
gromgit/fuse/gitfs-mac
gromgit/fuse/gocryptfs-mac
gromgit/fuse/goofys-mac
gromgit/fuse/ifuse-mac
gromgit/fuse/mp3fs-mac
gromgit/fuse/ntfs-3g-mac
gromgit/fuse/rclone-mac
gromgit/fuse/rofs-filtered-mac
gromgit/fuse/s3-backer-mac
gromgit/fuse/s3fs-mac
gromgit/fuse/s3ql-mac
gromgit/fuse/securefs-mac
gromgit/fuse/simple-mtpfs-mac
gromgit/fuse/squashfuse-mac
gromgit/fuse/sshfs-mac
gromgit/fuse/tup-mac
gromgit/fuse/unionfs-fuse
gromgit/fuse/wdfs-mac
gromgit/fuse/xmount-mac
benjioh5 commented 1 year ago
$ ext4fuse --help
dyld[7824]: Library not loaded: '/usr/local/lib/libfuse.2.dylib'
  Referenced from: '/opt/homebrew/Cellar/ext4fuse-mac/0.1.3/bin/ext4fuse'
  Reason: tried: '/libfuse.2.dylib' (no such file), '/usr/local/lib/libfuse.2.dylib' (no such file), '/usr/lib/libfuse.2.dylib' (no such file)
fish: Job 1, 'ext4fuse --help' terminated by signal SIGABRT (Abort)
$ cd /usr/local/lib
$ ln -s libfuse-t-1.0.0.a libfuse.2.a
$ ln -s libfuse-t-1.0.2.dylib libfuse.2.dylib
$ ext4fuse --help
Version: 3.3.9-168-g5ed2e8642
Usage: ext4fuse <disk> <mountpoint>

I think just sym-linking libfuse-t to libfuse works.

benjioh5 commented 1 year ago

I saw you change linking options on make file. If just it only matters, adding symbolic link on /usr/local/lib would be better. https://github.com/macos-fuse-t/apfs-fuse/commit/0b67e89c293fd3f9f9c751a4355df49cb2ef446e

d235j commented 1 year ago

Hmm. Following up on this and #8 — what if fuse-t was distributed as a framework that could be embedded in an FS bundle? That would simplify things at least somewhat.

macos-fuse-t commented 1 year ago

I don't think a framework distribution is possible because fuse-t comes with a server and not only shared library.

d235j commented 1 year ago

Many Apple frameworks contain servers or support processes. They would go in Resources or SharedSupport inside the .framework and would be started as needed by the library (I’m assuming that’s how the server is currently being started).

Not having files in /usr/local greatly simplifies things.

macos-fuse-t commented 1 year ago

Interesting, I will look into it

d235j commented 1 year ago

You should be able to use RPATH or a similar mechanism to identify the base path of the library and use relative paths to locate the server executable.

Python and Mono are some of the larger projects that are distributed as frameworks containing executables but they’re not the only ones.

d235j commented 1 year ago

@macos-fuse-t have you had a chance to look into this possibility? My main interest here is in the context of https://github.com/thejoelpatrol/fusehfs and the related FuseMFS. It would be nice to only have to distribute a .fs bundle with everything self-contained and nothing else needing to be system-installed.

macos-fuse-t commented 1 year ago

It requires some work to package properly. I'll take a look at it next month.

d235j commented 1 year ago

@macos-fuse-t any updates on this? It would be nice to embed the library and server in the FS bundle, at least for the open source filesystems such as FuseHFS.

macos-fuse-t commented 1 year ago

Yes, it's on my TODO list, will try to allocate time for that.

macos-fuse-t commented 1 year ago

Try this pre-release which adds a framework in /Library/Frameworks/fuse_t.framework https://github.com/macos-fuse-t/fuse-t/releases/download/1.0.13a/fuse-t-macos-installer-1.0.13a.pkg

brandonros commented 7 months ago
$ ./ext4fuse ~/Desktop/file.raw /mnt
dyld[15740]: Library not loaded: @rpath/libfuse-t.dylib
  Referenced from: <C09E3A2C-4492-33B9-B69C-E13BB533FF31> /Users/brandon/Desktop/ext4fuse/ext4fuse
  Reason: no LC_RPATH's found
Abort trap: 6

Slightly similar Library not loaded error, just putting here for anybody else if they stumble on it while I try to figure out solution/what I did wrong.

d235j commented 7 months ago

Try doing install_name_tool -add_rpath /usr/local/lib ext4fuse

or similar.