testdisk_documentation
testdisk_documentation copied to clipboard
specify CoreFoundation framework flag on Mac
Without this flag, testdisk won't compiled on Mac, with make producing the error Undefined symbols for architecture x86_64: "_CFRelease" [...].
Which version of Mac OS X are you using (copy/paste "sw_vers" output) ?
I have no problem on my old VM
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H15
Another solution may be to modify the configure.ac script, something like
# tweak platform specific flags
case "$host" in
*darwin*)
LDFLAGS="${LDFLAGS} --framework CoreFoundation"
;;
esac
But it may break compilation on systems older than 10.15
This is on Monterey (macOS 12).
One thing I also noticed is that LDFLAGS="-L/usr/local/lib -lintl" ./configure --disable-ntfs-3g --disable-nfconv is the only way ntfs-3g will configure, otherwise I get the following error (on both OS X 12 and 14):
libtool: link: gcc -g -O2 -Wall -o .libs/ntfsfix ntfsfix.o utils.o ../libntfs-3g/.libs/libntfs-3g.dylib -lc
Undefined symbols for architecture x86_64:
"_libintl_setlocale", referenced from:
_utils_set_locale in utils.o
_utils_set_locale in utils.o