Luxcore build error

Use this forum for general user support and related questions.
Post Reply
Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Luxcore build error

Post by Luxart » Thu Mar 28, 2019 8:00 am

Hi,
I tried building Luxcore based on the instructions in GitHub (WindowsCompile).
I got the following error.
Cmake Error.png
VS 2017 community edition is installed in my computer.
Any help is greatly appreciated :) .

acasta69
Developer
Posts: 200
Joined: Tue Jan 09, 2018 3:45 pm

Re: Luxcore build error

Post by acasta69 » Thu Mar 28, 2019 8:30 am

Hi, it seems that for some reason cmake cannot find a C/C++ compiler.
Could it be that you have installed Visual Studio, but without selecting C/C++ development components?
You could try to run the installer again and verify that something like "Desktop development with C++" is selected.
Support LuxCoreRender project with salts and bounties

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

Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Luxcore build error

Post by Luxart » Thu Mar 28, 2019 9:56 am

Windows Desktop application in Visual C++ is installed.
VS C++ installed.png
Previously, I was adding source files directly to the VS IDE, and build pyluxcore from it (as I need to change some source files according to my needs).
But from version 2.1 the OpenCL code are moved to .cl files. The .cl files are converted to .cpp files during the preprocess section of the build process.
So I just run the build process to collect the opencl files in .cpp fomat and use it in my VS project.

I think the below two files are mainly involved in generating .cl to .cpp files.

\luxcorerender\LuxCore\cmake\KernelPreprocess
\luxcorerender\LuxCore\cmake\Scripts\PreprocessKernel

I don't know how to use cmake and batch scripts.

Could you please provide me a batch script just to convert the .cl files in .cpp format, so that i don't need to run the entire build process and don't worry about the above error. Thanks :) .

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

Re: Luxcore build error

Post by Dade » Thu Mar 28, 2019 10:17 am

Luxart wrote:
Thu Mar 28, 2019 9:56 am
Could you please provide me a batch script just to convert the .cl files in .cpp format, so that i don't need to run the entire build process and don't worry about the above error.
Fix the real problem, don't do additional work to just work around. There must be a reason why for you (and only for you) cmake does't detect VisualC++: https://stackoverflow.com/questions/516 ... ual-studio
Support LuxCoreRender project with salts and bounties

acasta69
Developer
Posts: 200
Joined: Tue Jan 09, 2018 3:45 pm

Re: Luxcore build error

Post by acasta69 » Thu Mar 28, 2019 10:27 am

Dade wrote:
Thu Mar 28, 2019 10:17 am
Fix the real problem, don't do additional work to just work around. There must be a reason why for you (and only for you) cmake does't detect VisualC++: https://stackoverflow.com/questions/516 ... ual-studio
I agree, and the most likely solution is in the link posted by Dade.
Once that works, the easiest way to generate the files you need is:

Code: Select all

cmake-build-x64.bat /cmake-only
This will run only the cmake preprocessing, including generation of VS solution and kernel CPP files, without running the actual build.
Support LuxCoreRender project with salts and bounties

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

Luxart
Posts: 49
Joined: Tue Feb 13, 2018 10:14 am

Re: Luxcore build error

Post by Luxart » Thu Mar 28, 2019 1:19 pm

acasta69 wrote:
Thu Mar 28, 2019 10:27 am
Dade wrote:
Thu Mar 28, 2019 10:17 am
Fix the real problem, don't do additional work to just work around. There must be a reason why for you (and only for you) cmake does't detect VisualC++: https://stackoverflow.com/questions/516 ... ual-studio
I agree, and the most likely solution is in the link posted by Dade.
Once that works, the easiest way to generate the files you need is:

Code: Select all

cmake-build-x64.bat /cmake-only
This will run only the cmake preprocessing, including generation of VS solution and kernel CPP files, without running the actual build.
Yes, After installing the "Visual C++ tools for CMake" feature, the kernel files are generated and all source files are compiled.

But, got this error after object files are generated
Build Error.png
I got the required Kernel files for my project. So I can skip the rest of build process (no problem). But if the error can be corrected, let me know so that I can correct that too.

Thanks for the info Dade and acasta69 :D .

Fox
Posts: 318
Joined: Sat Mar 31, 2018 11:17 am

Re: Luxcore build error

Post by Fox » Thu Mar 28, 2019 2:02 pm

I may have had the same MSB6006 error.
Then i had to redo this:

pip install pyinstaller
press enter

pip install PySide2
press enter

pip install numpy
press enter
---------------
EDIT
If you have nVidia GPU, then CUDA toolkit has to be installed.
Last edited by Fox on Thu Mar 28, 2019 2:08 pm, edited 1 time in total.

acasta69
Developer
Posts: 200
Joined: Tue Jan 09, 2018 3:45 pm

Re: Luxcore build error

Post by acasta69 » Thu Mar 28, 2019 2:04 pm

I'm glad it's working now. :)
Luxart wrote:
Thu Mar 28, 2019 1:19 pm
But if the error can be corrected, let me know so that I can correct that too.
Do you have a working Python3 with PySide2 also installed?
If not, that's the most likely cause: the pyluxcoretools cmake script deletes some files in order to regenerate them with the available PySide version. If PySide is not found, these files will be missing.

Anyway, you only need this if you want to have working pyluxcoretools.
All other binaries should have been built correctly.
Support LuxCoreRender project with salts and bounties

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

Post Reply