The goal of efficiency is more slack.

Wednesday, January 07, 2026

Compiling ntfs-3g on macOS 15

Compiling ntfs-3g on macOS 15

This guide shows how to install fuse-t and build ntfs-3g from source on macOS 15.


0️⃣ Install dependencies and clone the repository

# Tap the macOS fuse-t cask repository brew tap macos-fuse-t/homebrew-cask # Install fuse-t and build tools brew install mounty fuse-t git automake autoconf libtool libgcrypt pkg-config gnutls # Clone the ntfs-3g repository git clone https://github.com/macos-fuse-t/ntfs-3g cd ntfs-3g

1️⃣ Prepare the system for fuse-t headers

sudo mkdir -p /usr/local/include sudo ln -s "/Library/Application Support/fuse-t/include/fuse" /usr/local/include/

2️⃣ Set compiler and linker flags

export CFLAGS='-I/usr/local/include/fuse -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -mmacosx-version-min=15.0' export LDFLAGS="-L/usr/local/lib -lfuse-t -Wl,-rpath,/usr/local/lib" export MACOSX_DEPLOYMENT_TARGET=15.0
  • CFLAGS ensures headers are found and proper FUSE version is used.  
  • LDFLAGS tells the linker where to find libfuse-t.dylib and sets the runtime path.
  • Ensure there are no spaces in the paths specified in the -I and -L arguments. That's why we symlinked the directory previously.
  • MACOSX_DEPLOYMENT_TARGET ensures the correct macOS API level. (Not sure if this is needed.)

3️⃣ Prepare the build system

./autogen

4️⃣ Configure build directories

./configure \ --prefix=/usr/local \ --exec-prefix=/usr/local \ --with-fuse=external \ --sbindir=/usr/local/bin \ --bindir=/usr/local/bin
  • -=prefix / --exec-prefix → install libraries and headers under /usr/local
  • --bindir / --sbindir → install binaries under /usr/local/bin (avoid /bin)
  • --with-fuse=external → use the installed fuse-t headers/libraries 

5️⃣ Patch Makefile (macOS-only)

Comment out the Linux-specific library move in libntfs-3g/Makefile:

# if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ # $(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)"; \ # fi
  • macOS uses .dylib, not .so → this step is unnecessary and fails due to SIP.


6️⃣ Build and install

make -j$(sysctl -n hw.ncpu) sudo make install
  • Binaries → /usr/local/bin (ntfs-3g, lowntfs-3g)
  • Headers → /usr/local/include/ntfs-3g
  • Libraries → /usr/local/lib/libntfs-3g.dylib

7️⃣ Verify installation

/usr/local/bin/ntfs-3g --version
  • If you get a missing library error for libfuse-t.dylib, temporarily set:

export DYLD_LIBRARY_PATH=/usr/local/lib

ntfs-3g is now compiled and installed with fuse-t on macOS 15.


Alternate instructions: Mounty App

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Powered by Blogger.
Scroll To Top