BrunoLevy / GraphiteThree

Experimental 3D modeler
GNU General Public License v2.0
213 stars 18 forks source link

Compiling issues with Mac M1 #1

Closed mlivesu closed 2 years ago

mlivesu commented 2 years ago

Hi Bruno, I am trying to build Graphite for my new MacBook Pro M1 but I am getting tons of errors like

/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier 'builtin_ia32_emms'; did you mean 'builtin_isless'? __builtin_ia32_emms();

I did my google searches and this seems to be a common issue for codes that use SSE instructions on x86. Do you have any plan to support ARM architectures in the future releases of Geogram/Graphite?

Thanks! Marco

BrunoLevy commented 2 years ago

Hi Marco, Yes, Geogram (and probably Graphite) can work under ARM, There is probably in Geogram something that includes the X86 intrinsics when compiling for MACOS, Would you try compiling Geogram on your Mac and sending me the error log, then I'll fix it (probably easy to fix) Best, -- Bruno

mlivesu commented 2 years ago

Sure, thank you so much! I don't want to steal too much of your time though. This is absolutely not urgent, so please assign a very low priority to this task :)

log.txt (the log was too long to fit this message)

BrunoLevy commented 2 years ago

No problem ! It is super useful (I do not have a Mac M1, and I'm always interested in adding support for a new architecture). I've just pushed an update, would you retry and send me the log ? (even if it works, I'd be interested in the log, because I'm fixing all the warnings) Cheers, -- B

mlivesu commented 2 years ago

here it is, there is still some error log2.txt

BrunoLevy commented 2 years ago

Hi Marco, I've just pushed a new revision (making progress, I think we are nearly there !). Would you retry ?

mlivesu commented 2 years ago

almost there, one more :) log3.txt

BrunoLevy commented 2 years ago

Pushed new revision (I'm stupid !)

mlivesu commented 2 years ago

it works! :) I attach the full log for helping you with warnings log4.txt

btw: since grogram is included in graphite as a submodule you should also update the module's version to make sure that git clone --recursive downloads the fixed version

BrunoLevy commented 2 years ago

Thank you for your feedback Marco ! I'll update the submodule as well (as soon as I know how to do that :-) Best, -- B P.S. I've pushed a new revision that fixes (nearly) all the warnings.

mlivesu commented 2 years ago

it turned out it is not necessary, if you clone with git clone --recurse-submodules instead of git clone --recursive everything works just fine.

Thanks!