Azure / azure-storage-fuse

A virtual file system adapter for Azure Blob storage
Other
654 stars 206 forks source link

Build on MacOS #986

Open GuillaumeDesforges opened 1 year ago

GuillaumeDesforges commented 1 year ago

I'm trying to build blobfuse2 on MacOS.

I'm hitting an error:

In file included from component/libfuse/libfuse_handler.go:43:
./libfuse_wrapper.h:42:10: fatal error: 'linux/fs.h' file not found
#include <linux/fs.h>
         ^~~~~~~~~~~~
1 error generated.

It seems to come from this line: https://github.com/Azure/azure-storage-fuse/blob/04107526750a10018ac8b1ec15f6aa5945198200/component/libfuse/libfuse_wrapper.h

Would it be possible to make blobfuse2 build on MacOS?

vibhansa-msft commented 1 year ago

As of now we do not support blobfuse on MacOS. One possible way to do this is to use docker container. Refer this if you are interested in that.

GuillaumeDesforges commented 1 year ago

FYI there is https://osxfuse.github.io/. I haven't tried it though.

vibhansa-msft commented 1 year ago

Yes I am aware of OsxFuse but integration with that and making rest of the code compile on MacOS will need some changes in the code base. As of now we do not have enough resources to make that effort. We have this item in our backlog though.

GuillaumeDesforges commented 1 year ago

Thanks a lot, will look forward to it. 💯

AvivAvital2 commented 1 year ago

As of now we do not support blobfuse on MacOS. One possible way to do this is to use docker container. Refer this if you are interested in that.

In Linux, you would eventually use the /dev/fuse descriptor, while in Mac it is not enough. I tried using -privileged -dt --device /dev/fuse, running on a root user, installing osxfuse and other solutions. To the best of my knowledge, blobfuse simply does not work on Mac without building it from scratch.

vibhansa-msft commented 1 year ago

We also publish a Ubn-22 based container for blobfuse2, may be you can try that if that solves your problem. For native support on Mac team has to investigate and invest some time on it to work.