Compiling NTFS-3G for OS X

5.4k views Asked by At

After noticing that the recommended installation of NTFS-3G is the five years old 2010.10.2 because it was conveniently available as .pkg, I wanted to give a try at compiling latest 2015.3.14 from official website. Please note that I do not want to install it from Brew or Macports, but install it manually

So I tried:

./configure && make && sudo make install

But it told me pkg-config was not installed, so I installed it from http://www.freedesktop.org/wiki/Software/pkg-config/ using ./configure --with-internal-glib; make; sudo make install and I got:

[...]
Making install in .
 ./install-sh -c -d '/usr/local/bin'
  /bin/sh ./libtool   --mode=install /usr/bin/install -c pkg-config '/usr/local/bin'
libtool: install: /usr/bin/install -c pkg-config /usr/local/bin/pkg-config
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
cd /usr/local/bin && ln pkg-config x86_64-apple-darwin15.0.0-pkg-config
ln: x86_64-apple-darwin15.0.0-pkg-config: File exists
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

I ignored it and I tried again to install NTFS-3G:

./configure && make && sudo make install

But this time I got:

[...]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-compat.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-debug.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-realpath.o) has no symbols
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
if [ ! "/lib" -ef "/usr/local/lib" ]; then \
        /bin/mv -f "//usr/local/lib"/libntfs-3g.so* "//lib";  \
    fi
mv: rename //usr/local/lib/libntfs-3g.so* to //lib/libntfs-3g.so*: No such file or directory
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

Then I tried:

./configure --exec-prefix=/ && make && sudo make install

But I got:

[...]
install: //bin/ntfsfix: Operation not permitted
make[2]: *** [install-binPROGRAMS] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

Then I tried:

./configure --exec-prefix=/usr/local && make && sudo make install

But I got:

[...]
install: chmod 755 /sbin: Operation not permitted
ln -s -f /usr/local/sbin/mkntfs /sbin/mkfs.ntfs
ln: /sbin/mkfs.ntfs: Operation not permitted
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

I'm using OS X 10.11 El Capitan.

1

There are 1 answers

1
Cœur On BEST ANSWER

It appears it was an issue from source. Erik Larsson made a fix for it on 23rd June 2015. Thank you very much. Now it is possible to compile from edge source git://git.code.sf.net/p/ntfs-3g/ntfs-3g

Preferably, get brew from http://brew.sh then install:

brew install automake
brew install libtool
brew install libgcrypt
brew install pkg-config

Then you can compile and install NTFS-3G (from its folder):

./autogen.sh
./configure --prefix=/usr/local --mandir=/usr/local/share/man --exec_prefix=/usr/local
make
sudo make install

One drawback: both brew and ntfs-3g compete for folder /usr/local/.