Windows build deps

Discussion related to the LuxCore functionality, implementations and API.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Windows build deps

Post by Fox »

What is going wrong?
ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
exist in the project.

Code: Select all

**************************************************************************
* Building libPNG
**************************************************************************
The system cannot find the file specified.
-- The C compiler identification is MSVC 19.16.27030.1
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at CMakeLists.txt:42 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable ZLIB_ROOT is set to:

    D:\CP\luxcorerender\deps\x64\zlib-1.2.11

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found ZLIB: D:/CP/luxcorerender/BuiltDeps/x64/Release/lib/zlib1.lib (found version "1.2.11")
-- Performing Test HAVE_LD_VERSION_SCRIPT
-- Performing Test HAVE_LD_VERSION_SCRIPT - Failed
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT - Failed
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BOOST_ROOT
    Boost_USE_STATIC_LIBS
    CMAKE_INCLUDE_PATH
    QT_QMAKE_EXECUTABLE


-- Build files have been written to: D:/CP/luxcorerender/deps/x64/libpng-1.6.37/build
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
D:\CP\luxcorerender\deps\x64\libpng-1.6.37\build\ZERO_CHECK.vcxproj : error MSB4057: The target "png16_static" does not
 exist in the project.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Windows build deps

Post by Dade »

Are you running the wrong .bat ? It looks like the one to compile the libraries :idea:

You have to run "cmake-build-x64.bat" :?:
Support LuxCoreRender project with salts and bounties
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

Yes i got curious how to compile libraries.
I updated the getdeps.bat so it downloaded all the latest libraries.

But the libpng won't build :roll:
EDIT
Same error with openjpeg.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

Got the libpng and openjpeg built.
Now easy part: QT, OpenImageIO, FreeImage.
User avatar
nigec
Posts: 141
Joined: Mon Mar 11, 2019 8:50 am

Re: Windows build deps

Post by nigec »

did you do this when you cloned WindowsCompileDeps:
NOTE: you need git LFS extension (https://git-lfs.github.com) to clone WindowsCompileDeps repository. Or you can install and use https://desktop.github.com to clone the repositories.
you need to run
git lfs install
git clone https://github.com/LuxCoreRender/WindowsCompileDeps

The first time I tried I got all sorts of errors because I missed this, but anyway this is how I went wrong :D

https://github.com/LuxCoreRender/WindowsCompile
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

Yes i have GitHubDesktop.
The problem was few new addon libs had different names in CMakeLists.txt, where the build-deps-x64.bat links somewhere after the naming /target:"

OMG the QT is 315 000 files :o , my drive will die before successful build.

Where do i link in openimageio the addon libs, it even want's it's own QT and a lot more.

I have left to go:
FreeImage3180
oiio-Release-2.0.7
qt-everywhere-src-5.12.3
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

How is the correct way to link for cmake? :oops:
The way i did, it does not like.

This is for OpenImageIO
How To Link.png
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

I leave it be for now, it seems to be over my head little bit.
The build-deps-x64.bat seems to apply some old patches from WindowsCompile\support folder on top of new libraries. Some errors were unnoticed, at first, they were not in red or yellow text.

Found the cmake-gui.exe and fiddled around with OpenImageIO 2.0.7, i was able to link to all missing libraries and programs. But the cmake-gui.exe was not able to actually build anything.

I will rest and then maybe i look into building with visual studio, i found very specific tutorial how to build old version of OpenImageIO with VS.

The latest openjpeg didn't actually build correctly, also the ilmbase-openexr, had to use older version, but OpenImageIO complained the openexr 2.2.1 is 1.x and unsupported :lol:

The freeimage was another librarie with thousands lines of errors.

BigTIFF did not build, had to go back to newer version of official libtiff.
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: Windows build deps

Post by acasta69 »

Fox wrote: Sat Apr 27, 2019 1:48 pm The build-deps-x64.bat seems to apply some old patches from WindowsCompile\support folder on top of new libraries.
The build-deps-x64.bat applies patches that are meant to be used for the deps versions downloaded by the getdeps.bat.
If you update getdeps.bat to download latest versions, you also have to review all related patches. Many of them are likely no more needed, other could have to be modifed.

Many deps are not at their latest version to keep them aligned with the Linux deps, so that Linux and Windows versions of LuxCore are all built on the same deps. There are 2-3 exceptions to this.

Moreover, there could be something not working perfectly, also depending on the exact version of VS2017 you are using. I update those two files every now and then, not really on a regular basis:
The getdeps.bat and build-deps-x64.bat scripts are used mainly as a reference
for developers and are not guaranteed to be always up-to-date.
For example, it does not yet consider Qt5.
Fox wrote: Fri Apr 26, 2019 11:55 am I have left to go:
FreeImage3180
oiio-Release-2.0.7
qt-everywhere-src-5.12.3
As far as I understood, Qt5 needs a lot of dependencies of its own to be built. Do you really need to build it?
An alternative could be to check out the Qt5 branch of WindowsCompileDeps: it has the Qt5 modules needed to build LuxMark.
In the luxmark_qt5 branch of WindowsCompile you can find a cmake-build-x64.bat modified to use it.
If you need more modules, I strongly suggest that you download a binary distribution and install the VS2017 x64 version.
Fox wrote: Sat Apr 27, 2019 1:48 pm Found the cmake-gui.exe and fiddled around with OpenImageIO 2.0.7, i was able to link to all missing libraries and programs. But the cmake-gui.exe was not able to actually build anything.
But isn't it possible for this new version to disable those libs, since they are not needed for LuxCore? Like this, from the build-deps-x64.bat:

Code: Select all

cmake %CMAKE_OPTS% -D LINKSTATIC=1 -D USE_FFMPEG=0 -D USE_PYTHON=0 -D USE_TBB=0 -D USE_OPENGL=0 -D USE_QT=0 -D USE_GIF=0 -D USE_OPENJPEG=0 -D USE_OPENSSL=0 -D USE_FIELD3D=0 -D USE_OCIO=0 -D USE_OPENCV=0 -D OIIO_BUILD_TOOLS=0 -D OIIO_BUILD_TESTS=0 ..
Sorry that I can't help more, I didn't really dive into specifics of all libs, just tried to keep the LuxCore version working...
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Windows build deps

Post by Fox »

Thank you acasta69 for the info. I will dig into this.

I only need luxcore ui to be up to date, many libraries are not needed perhaps.
I found out about the vcpkg for windows, it auto builds everything, almost like linuxlike :P I just got done building full boost librarie in 29 minutes.
Post Reply