Skip to content

specify CoreFoundation framework flag on Mac #7

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattcg
Copy link

@mattcg mattcg commented Mar 8, 2024

Without this flag, testdisk won't compiled on Mac, with make producing the error Undefined symbols for architecture x86_64: "_CFRelease" [...].

Without this flag, testdisk won't compiled on Mac.
@cgsecurity
Copy link
Owner

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

@mattcg
Copy link
Author

mattcg commented Mar 9, 2024

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

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

Successfully merging this pull request may close these issues.

2 participants