Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dependecy on other fuse tab #6

Closed
benjioh5 opened this issue Sep 26, 2022 · 15 comments
Closed

Adding dependecy on other fuse tab #6

benjioh5 opened this issue Sep 26, 2022 · 15 comments

Comments

@benjioh5
Copy link

benjioh5 commented Sep 26, 2022

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 gromgit/homebrew-fuse#41 and could you check out dependency and Interoperability of macfuse formula?

@benjioh5
Copy link
Author

benjioh5 commented Sep 26, 2022

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
Copy link
Author

$ 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
Copy link
Author

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

@d235j
Copy link

d235j commented Oct 16, 2022

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
Copy link
Owner

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

@d235j
Copy link

d235j commented Oct 17, 2022

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
Copy link
Owner

Interesting, I will look into it

@d235j
Copy link

d235j commented Oct 17, 2022

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
Copy link

d235j commented Dec 27, 2022

@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
Copy link
Owner

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

@d235j
Copy link

d235j commented Feb 7, 2023

@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
Copy link
Owner

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

@macos-fuse-t
Copy link
Owner

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
Copy link

$ ./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
Copy link

d235j commented Dec 26, 2023

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

or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants