GPUOpen-LibrariesAndSDKs / RadeonProRender-Baikal

MIT License
334 stars 78 forks source link

Break on BaikalStandalone (Linux) #115

Closed addeps3 closed 6 years ago

addeps3 commented 6 years ago

Hello.

Am trying to build this. When Building BaikalStandalone: ==== Building BaikalStandalone (release_x64) ==== app_utils.cpp application.cpp In file included from /usr/include/GL/glx.h:30:0, from Application/application.cpp:36: /usr/include/OpenImageIO/simd.h:374:24: error: expected unqualified-id before numeric constant static const bool4 False (); ^ /usr/include/OpenImageIO/simd.h:377:24: error: expected unqualified-id before numeric constant static const bool4 True (); ^ /usr/include/OpenImageIO/simd.h:504:24: error: expected unqualified-id before numeric constant static const bool8 False (); ^ /usr/include/OpenImageIO/simd.h:507:24: error: expected unqualified-id before numeric constant static const bool8 True (); ^ /usr/include/OpenImageIO/simd.h:2008:37: error: expected unqualified-id before numeric constant OIIO_FORCEINLINE const bool4 bool4::False () { ^ /usr/include/OpenImageIO/simd.h:2016:37: error: expected unqualified-id before numeric constant OIIO_FORCEINLINE const bool4 bool4::True () { ^ /usr/include/OpenImageIO/simd.h: In function ‘OpenImageIO::v1_7::simd::bool4 OpenImageIO::v1_7::simd::operator!(const OpenImageIO::v1_7::simd::bool4&)’: /usr/include/OpenImageIO/simd.h:2044:41: error: expected unqualified-id before numeric constant return _mm_xor_ps (a.simd(), bool4::True()); ^ /usr/include/OpenImageIO/simd.h: In function ‘OpenImageIO::v1_7::simd::bool4 OpenImageIO::v1_7::simd::operator~(const OpenImageIO::v1_7::simd::bool4&)’: /usr/include/OpenImageIO/simd.h:2090:41: error: expected unqualified-id before numeric constant return _mm_xor_ps (a.simd(), bool4::True()); ^ /usr/include/OpenImageIO/simd.h: At global scope: /usr/include/OpenImageIO/simd.h:2313:37: error: expected unqualified-id before numeric constant OIIO_FORCEINLINE const bool8 bool8::False () { ^ /usr/include/OpenImageIO/simd.h:2322:37: error: expected unqualified-id before numeric constant OIIO_FORCEINLINE const bool8 bool8::True () { ^

OS: Antergos, GPU: Nvidia 770, glfw-X11 and cuda package form Arch repo's, installed.. openimage.. I don't really know what to invent.. Would love to try new RadeonRays + baikal-thing, don't really know what it is, but am confident it's cool.

yozhijk commented 6 years ago

Hi @addeps3 ,

We are regularly testing Baikal on Jenkins CI on Linux, so most likely something is wrong with your config. What Linux version are you using?

LordReg commented 6 years ago

I also tried to build on Arch Linux (latest official packages) and had the same errors. The errors are caused by True and False already being defined in /usr/include/X11/Xlib.h prior to including OpenImageIO/imageio.h.

It builds with this modification to BaikalStandalone/Application/application.cpp:

#undef True
#undef False
#include <OpenImageIO/imageio.h>
addeps3 commented 6 years ago

Builds fine with LordReg's fix.

Thank you.