Windows Build FAILED

Discussion related to the LuxCore functionality, implementations and API.
acasta69
Developer
Posts: 360
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: 4813
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: 594
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.

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

Re: Windows Build FAILED

Post by kintuX » Tue Jun 02, 2020 7:59 pm

Me again :roll: and a new problem :oops:

Code: Select all

Build FAILED.

       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\LuxRays.sln" (default target) (1) ->
       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\samples\luxcorescenedemo\luxcorescenedemo.vcxproj.metaproj"
        (default target) (15) ->
       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\samples\luxcorescenedemo\luxcorescenedemo.vcxproj" (default
        target) (24) ->
       (Link target) ->
         C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.tar
       gets(720,5): error MSB6006: "link.exe" exited with code -1073741819. [C:\luxcorerender\WindowsCompile\Build_CMak
       e\LuxCore\samples\luxcorescenedemo\luxcorescenedemo.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:03:26.63
--- FATAL ERROR RUNNING CMAKE ---
What to do? :?

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

Re: Windows Build FAILED

Post by kintuX » Wed Jun 03, 2020 1:48 pm

Compiling after latest commits (772e5eed4 & 1e5801c63):
Build succeeded
8-)

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

--- FATAL ERROR RUNNING CMAKE ---

Post by kintuX » Fri Jun 12, 2020 7:30 pm

w/ latest commit (4cb96ab42)

Code: Select all

Build FAILED.

       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\LuxRays.sln" (default target) (1) ->
       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\samples\luxcoredemo\luxcoredemo.vcxproj.metaproj" (default
       target) (13) ->
       "C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\samples\luxcoredemo\luxcoredemo.vcxproj" (default target) (
       19) ->
       (Link target) ->
         c:\luxcorerender\luxcore\src\slg\core\sphericalfunction\sphericalfunction.cpp(130): fatal error C1001: An inte
       rnal error has occurred in the compiler. [C:\luxcorerender\WindowsCompile\Build_CMake\LuxCore\samples\luxcoredem
       o\luxcoredemo.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:03:45.01
--- FATAL ERROR RUNNING CMAKE ---

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

Re: Windows Build FAILED

Post by Dade » Fri Jun 12, 2020 9:07 pm

It is the same error than before: "An internal error has occurred in the compiler". Your compiler is broken (or you have an hardware problem).

The build on Azure is working fine: https://dev.azure.com/LuxCoreRender/Lux ... 34e5207e1b
Support LuxCoreRender project with salts and bounties

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

Re: Windows Build FAILED

Post by kintuX » Fri Jun 12, 2020 9:58 pm

Dade wrote:
Fri Jun 12, 2020 9:07 pm
It is the same error than before: "An internal error has occurred in the compiler". Your compiler is broken (or you have an hardware problem).

The build on Azure is working fine: https://dev.azure.com/LuxCoreRender/Lux ... 34e5207e1b
OK. After restarting Windows "Build succeeded."
Indeed, something got corrupt on my side & now I at least know what to do, if it happens again, so: "Thank you for the note."
:D

Post Reply