RenderKit / oidn

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

Building on macOS might require -stdlib=libc++ #3

Closed fsiddi closed 5 years ago

fsiddi commented 5 years ago

When trying to build on macOS 10.13.6 (High Sierra), the make command returned the following error:

fsiddi@mbp  (master) $ make
Scanning dependencies of target OpenImageDenoise_sse42
[  1%] Building CXX object CMakeFiles/OpenImageDenoise_sse42.dir/core/network.cpp.o
In file included from /Users/fsiddi/Developer/oidn/core/network.cpp:17:
In file included from /Users/fsiddi/Developer/oidn/core/upsample.h:19:
In file included from /Users/fsiddi/Developer/oidn/core/node.h:19:
In file included from /Users/fsiddi/Developer/oidn/core/common.h:19:
/Users/fsiddi/Developer/oidn/common/platform.h:28:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/OpenImageDenoise_sse42.dir/core/network.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenImageDenoise_sse42.dir/all] Error 2
make: *** [all] Error 2

By adding -stdlib=libc++ to CMAKE_CXX_FLAGS I could build without errors.

atafra commented 5 years ago

Thanks, I'll have a look soon! The binaries were compiled on Mojave and there was no such issue.

lateralpunk commented 5 years ago

I had the same problem as @fsiddi and fixed it in a similar manner. ccmake .. -DCMAKE_CXX_FLAGS=-stdlib=libc++ I'm on a 2012 Mac mini running Mojave 10.14.2 and clang-1000.11.45.5.

atafra commented 5 years ago

Fixed in devel, will be released soon in v0.8.1. Thanks!