Open liumu96 opened 1 year ago
Hey. The OIDN (OpenImageDenoise) library (v1.2.4) that this project uses probably doesn't support Apple Silicon and I haven't looked into the newer releases for the library.
For now, you can try disabling the denoiser. The dev branch has code that moves the denoiser behind a cmake option (defaulted to OFF)
Does that mean this error won't happen if I run this program at the dev branch? I'm not familiar with these code so I didn't find the code that moves the denoiser behind a cmake option.
Does that mean this error won't happen if I run this program at the dev branch?
Yes, and to confirm, you can try compiling the code from the dev branch and see if the linker error pops up again.
I tried compiling the code from the dev branch and there was a new error, the compile failed.
mkdir build && cd build
cmake build -DCMAKE_BUILD_TYPE=RELEASE ..
make
Error
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [PathTracer] Error 1
make[1]: *** [CMakeFiles/PathTracer.dir/all] Error 2
make: *** [all] Error 2
Do you have SDL2 installed?
https://github.com/knightcrawler25/GLSL-PathTracer/blob/master/INSTALL-MAC.txt
Yeah, I installed sdl2 and open-image-denoise. The sdl2 version is 2.26.5.
brew install sdl2
Warning: sdl2 2.26.5 is already installed and up-to-date.
To reinstall 2.26.5, run:
brew reinstall sdl2
I've encountered the same problem in M2 chip. I've tried to build it in dev mode, which yields the following error info:
ld: Undefined symbols: _oidnCommitDevice, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnCommitFilter, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnExecuteFilter, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnGetDeviceError, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnNewDevice, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnNewFilter, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnReleaseDevice, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o oidn::DeviceRef::~DeviceRef() in Renderer.cpp.o _oidnReleaseFilter, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o oidn::FilterRef::~FilterRef() in Renderer.cpp.o _oidnSetFilter1b, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o _oidnSetSharedFilterImage, referenced from: GLSLPT::Renderer::Update(float) in Renderer.cpp.o GLSLPT::Renderer::Update(float) in Renderer.cpp.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [PathTracer] Error 1 make[1]: *** [CMakeFiles/PathTracer.dir/all] Error 2 make: *** [all] Error 2
How can I deal with it? Thanks.
Im on an x86 mac, running MacOS 13.6.4 and I'm getting the same issue as the original poster. Thinking it was somehow not picking the OIDN from homebrew, I manually cloned and compiled it but that lead to even more errors.
Wondering if anyone else has made any progress on this?
I was able to build on an M2 with OIDN:
set(OIDN_LIBDIR /opt/homebrew/lib)
include_directories(/opt/homebrew/include)
deleted all the backslash junk starting with foreach(f ${SRCS}) ... endforeach() This isn't needed, and I think it contributed to lldb trouble loading the symbols
Commented out this, it isn't needed, and it looked like it was wiping out the debug flag -g
Hi! I tried running this program on macOS with Apple Silicon (M2) Chip, but when running make I got an error:
I guess it doesn't work yet on macOS with Apple Silicon (M1) Chip? Any recommendations how to bypass that?