RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.74k stars 160 forks source link

Unable to compile on M1 Mac #130

Closed iPerKard closed 2 years ago

iPerKard commented 2 years ago

My attempts to compile oidn on the Apple arm64 architectures fails with this issue:

[  1%] Building CXX object common/CMakeFiles/common.dir/platform.cpp.o
[  3%] Building CXX object common/CMakeFiles/common.dir/tasking.cpp.o
[  5%] Building CXX object common/CMakeFiles/common.dir/thread.cpp.o
[  7%] Linking CXX static library ../libcommon.a
[  7%] Built target common
[  9%] Generating CXX source files from blob /Users/.../oidn/weights/rtlightmap_hdr.tza
[ 10%] Building ISPC object /Users/.../oidn/build/local__core/color.dev.o
Error: Invalid architecture "aarch64" 
       Options: x86-64, x86. 
/tmp/ispc-20211028-61646-wt3ld2/ispc-1.16.1/src/ispc.cpp(1181): FATAL ERROR: Problem with target (neon-i32x8)
***
*** Please file a bug report at https://github.com/ispc/ispc/issues
*** (Including as much information as you can about how to reproduce this error).
*** You have apparently encountered a bug in the compiler that we'd like to fix!

Here are the ccmake configuration:

CMAKE_BUILD_TYPE                 Release                                                                   
 CMAKE_INSTALL_PREFIX             /usr/local                                                                
 CMAKE_OSX_ARCHITECTURES                                                                                    
 CMAKE_OSX_DEPLOYMENT_TARGET                                                                                
 CMAKE_OSX_SYSROOT                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel
 OIDN_API_NAMESPACE                                                                                         
 OIDN_APPS                        ON                                                                        
 OIDN_APPS_OPENIMAGEIO            OFF                                                                       
 OIDN_FILTER_RT                   ON                                                                        
 OIDN_FILTER_RTLIGHTMAP           ON                                                                        
 OIDN_NEURAL_RUNTIME              BNNS                                                                      
 OIDN_STATIC_LIB                  OFF                                                                       
 tbb_LIBRARY_DEBUG                tbb_LIBRARY_DEBUG-NOTFOUND 
atafra commented 2 years ago

This is very strange. How did you install ISPC? Is it from the official site or perhaps Homebrew? It should definitely work from these two sources.

iPerKard commented 2 years ago

Hi Attila,

I checked the version of the ISPC binary that is installed on my machine and it is effectively a x86_64 version (a recent one 1.17.0)... To be honest I don't remember how I installed it... Surely from the ISPC download page (https://ispc.github.io/downloads.html). I downloaded it again from that page, and the linked binary was x86_64 only.

I will try to compile ISPC from GitHub.

iPerKard commented 2 years ago

Installing an arm64 version of ISPC (I finally used homebrew) solved the problem! I also had a similar issue with libtbb... Surely side effects of prior unclean installations.

Sorry for the inconvenience Attila, thanks for the help, and this exceptional lib!