Skip to content
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

precompiled binaries for OS X aren't 64bit #14

Open
laserpilot opened this issue Jan 7, 2016 · 2 comments
Open

precompiled binaries for OS X aren't 64bit #14

laserpilot opened this issue Jan 7, 2016 · 2 comments

Comments

@laserpilot
Copy link
Contributor

Last pull request lets ofxFFT work properly with OF 0.9.0 but the precompiled libraries for OSX are dated and seem to only work if you build in 32bit - throws these errors on 64bit - might need to just make updates to those libraries and hope it doesn't break much? http://www.fftw.org

ld: warning: ignoring file ../../../addons/ofxFft/libs/fftw/lib/osx/fftw3f.a, file was built for archive which is not the architecture being linked (x86_64): ../../../addons/ofxFft/libs/fftw/lib/osx/fftw3f.a Undefined symbols for architecture x86_64: "_fftwf_destroy_plan", referenced from: ofxFftw::~ofxFftw() in ofxFftw.o "_fftwf_plan_r2r_1d", referenced from: ofxFftw::setup(int, fftWindowType) in ofxFftw.o "_fftwf_cleanup", referenced from: ofxFftw::~ofxFftw() in ofxFftw.o "_fftwf_malloc", referenced from: ofxFftw::setup(int, fftWindowType) in ofxFftw.o "_fftwf_free", referenced from: ofxFftw::~ofxFftw() in ofxFftw.o "_fftwf_execute", referenced from: ofxFftw::executeFft() in ofxFftw.o ofxFftw::executeIfft() in ofxFftw.o ld: symbol(s) not found for architecture x86_64

@realadissu
Copy link

I faced the same issue and found a solution. As mentioned by @laserpilot, just go to http://www.fftw.org. Download the latest files and compile them on your own. I used the following commands from the terminal.

sudo ./configure --disable-shared --enable-static --enable-float --enable-threads CC="gcc -arch x86_64" CXX="g++ -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E"
sudo make install

This creates 4 libraries at /usr/local/lib and their .la part. I copied them all into the ofxFft/libs/fftw/lib folder, replacing the old ones. In addition, I also replaced the fftw3.h file in ofxFft/libs/fftw/lib with the one from /usr/local/include.

Once this is done, I executed the following command in the project root folder:
xattr -cr
and made a Clean in XCode.

Then the compiling worked.

Please note, if you compile the libraries on e.g. Mojave you might get a lot of compiler warnings that the libraries have been compiled for a newer version of macOS if your target version is lower. I assume that there is another command to force to compile for an older version of macOS but I did not yet dive into this.

Maybe the ofxFft can be updated to fix this issue.

@Daandelange
Copy link

Daandelange commented May 4, 2023

(note that both commands above don't need sudo)
To target another osx SDK, I used this command : ./configure --disable-shared --enable-static --enable-float --enable-threads CFLAGS="-arch x86_64 -mmacosx-version-min=10.9"

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

No branches or pull requests

3 participants