Mac M1 Pro Build Issues

Issue #53 new
Eric Wolf created an issue

I’m trying to build from source. I installed Qt 5.11.2 specifically as mentioned in the instructions, as well as all the dependencies and whatnot. Here’s my issue:

 % qmake main.pro CONFIG+=release && make                   
cd Builds/QtCreator/Ember/ && ( test -e Makefile || /Users/ericwolf/Qt/5.11.2/clang_64/bin/qmake -o Makefile /Users/ericwolf/fractorium/Builds/QtCreator/Ember/Ember.pro CONFIG+=release ) && /Library/Developer/CommandLineTools/usr/bin/make -f Makefile 
Makefile:977: warning: overriding commands for target `install_target'
Makefile:967: warning: ignoring old commands for target `install_target'
Makefile:982: warning: overriding commands for target `uninstall_target'
Makefile:972: warning: ignoring old commands for target `uninstall_target'
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -D_M_X64 -D_CONSOLE -D_USRDLL -march=k8 -fPIC -fpermissive -pedantic -std=c++14 -Wnon-virtual-dtor -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Winline -Wunreachable-code -Wswitch-enum -Wswitch-default -Wmain -Wfatal-errors -Wall -fpermissive -Wold-style-cast -Wno-unused-parameter -Wno-unused-function -Wold-style-cast -mmacosx-version-min=10.10 -arch x86_64 -stdlib=libc++ -BUILDING_EMBER -O2 -O2 -DNDEBUG -fomit-frame-pointer -std=gnu++1y  -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.10 -w -fPIC  -I. -I../../include/vendor -I../../../Source/Ember -I../../../Source/EmberCL -I../../../Source/EmberCommon -I/usr/local/include -I/usr/include/GL -I/usr/local/include/GL -I/usr/include/glm -I/usr/include/tbb -I/usr/include/Imath -I/usr/include/OpenEXR -I/usr/local/opt/libxml2/include/libxml2 -I../../../../Qt/5.11.2/clang_64/mkspecs/macx-clang -o Affine2D.o ../../../Source/Ember/Affine2D.cpp
In file included from ../../../Source/Ember/Affine2D.cpp:1:
../../../Source/Ember/EmberPch.h:71:11: fatal error: 'tbb/parallel_for.h' file not found
        #include <tbb/parallel_for.h>
                 ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Affine2D.o] Error 1
make: *** [sub-Builds-QtCreator-Ember-make_first-ordered] Error 2

I’m not sure if this is a Fractorium issue or a TBB issue. I’m not even sure where TBB lives on my system, maybe the makefile assumes incorrectly?

This is all on a fresh MacOS install.

Comments (5)

  1. Eric Wolf reporter

    I think this is where the file(s) live(s)

    /System/Volumes/Data/opt/homebrew/Cellar/tbb/2021.4.0/include/tbb/parallel_for.h
    

  2. Eric Wolf reporter

    Okay so I think the Ember build files are looking in /usr/local/ and /usr/include but all homebrew stuff is in /opt/homebrew since M1

  3. Matt Feemster repo owner

    Glad to hear you got your new system, it shouldn’t be too much work to get this to build.

    tbb is Intel Threading Building Blocks. In linux, you install it as a dev package, which will install the libs and the headers. In Windows, you have to manually download the source and build it, which the makedeps.bat script does.

    For Apple, I am not sure if it’s included with the OS, or you need to install it as a package. Regardless, it sounds like you’ve found the location of it.

    I think you will need to edit the paths in Builds\QtCreator\defaults.pri to point to the proper place.

    If you can get it all working, then make a pull request, that’d be nice.

  4. Log in to comment