Windows Build FAILED

Discussion related to the LuxCore functionality, implementations and API.
acasta69
Developer
Posts: 305
Joined: Tue Jan 09, 2018 3:45 pm

Re: Windows Build FAILED

Post by acasta69 » Fri May 22, 2020 12:45 pm

Dade wrote:
Fri May 22, 2020 10:45 am
@Acasta69, I'm starting to think that compilation problem on Azure is due to the use of a Linux OpenCL SDK on Windows. The error seems to suggest that and the compilation on Windows works fine here.
You should check the OpenCL headers, the definition of "cl_ulong" type should be like:

Code: Select all

typedef unsigned __int64        cl_ulong;
I think I'm using this OpenCL SDK: https://github.com/GPUOpen-LibrariesAnd ... K/releases
I was using the same SDK, but since I installed the CUDA SDK, NVIDIA OpenCL is found and used.
The definition in 'cl_platform.h' in both SDKs matches the one you posted above.

Compilation with OpenCL and with CUDA is ok, the problem is when OpenCL is disabled.
The cl headers are not loaded in that case, even if 'ocl.h' is included, so 'cl_ulong' is not defined.

Can it be that there's a typo in here:

Code: Select all

#if defined(SLG_OPENCL_KERNEL)
	unsigned long pixelsIndex;
#else
	cl_ulong pixelsIndex;	
#endif
Are we using an OpenCL type even if we are not in an OpenCL kernel (i.e. defined(SLG_OPENCL_KERNEL) is false)?
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87

User avatar
Dade
Developer
Posts: 4221
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Windows Build FAILED

Post by Dade » Fri May 22, 2020 1:08 pm

acasta69 wrote:
Fri May 22, 2020 12:45 pm
Compilation with OpenCL and with CUDA is ok, the problem is when OpenCL is disabled.
Ah, ok, it makes sense, I was thinking the error was when compiling the OpenCL enabled version. Indeed, cl_ulong is an OpenCL data type and it is not defined when OpenCL is not enabled.

I pushed a fix.
Support LuxCoreRender project with salts and bounties

kintuX
Posts: 558
Joined: Wed Jan 10, 2018 2:37 am

Re: Windows Build FAILED

Post by kintuX » Fri May 22, 2020 9:10 pm

acasta69 wrote:
Fri May 22, 2020 7:53 am
kintuX wrote:
Thu May 21, 2020 11:40 pm
So where are caches stored, so I can clear/ delete all & make proper comparison?
For LuxCore 2.3 it should be:

Code: Select all

C:\Users\<username>\AppData\Local\Temp\kernel_cache
For v2.4 there are two locations:

Code: Select all

C:\Users\<username>\AppData\Local\Temp\cuda_kernel_cache
C:\Users\<username>\AppData\Local\Temp\ocl_kernel_cache
Dade wrote:
Fri May 22, 2020 1:08 pm
acasta69 wrote:
Fri May 22, 2020 12:45 pm
Compilation with OpenCL and with CUDA is ok, the problem is when OpenCL is disabled.
Ah, ok, it makes sense, I was thinking the error was when compiling the OpenCL enabled version. Indeed, cl_ulong is an OpenCL data type and it is not defined when OpenCL is not enabled.

I pushed a fix.
TYVM to both 8-)
---------------------------
Commit 93de16134

Code: Select all

Build succeeded.

Post Reply