View topic - Yafaray 3.2.0 Visual Studio VS2013 x64 build

Yafaray 3.2.0 Visual Studio VS2013 x64 build

Ask here your questions about development and about raytracing theory & implementation. Here you can post your patches for review.

Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Tue May 02, 2017 9:03 am

Hi, I'm trying to build Yafaray 3.2.0 source with VS2013 for x64 configuration, added all required dependencies to it, build process is successful but when i'm trying to launch executable using yafaray
on it, it stucks at startup, I did debug and application's main function isn't called, there isn't any dll load or library missing error, just launchs and stucks on ~2mb in operating memory(checked from task manager);
Can you please tell me what could be wrong there? Thanks in advance!
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 X64 Build

Post Tue May 09, 2017 7:48 am

Hello,

Please will you describe the process you used to build it and how did you obtain its dependency libraries?

Please if you could send me your build (or share it with me in Google Drive or similar) it would be good.

Thanks!
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 X64 Build

Post Fri May 12, 2017 6:46 pm

Hi,

Here's my build, I uploaded it to google drive:
https://drive.google.com/open?id=0B1xVo ... 3lTLW9XYk0

Thanks for your help, hope it's not a big issue...
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 X64 Build

Post Sun May 14, 2017 7:02 pm

Hello,

I could not fully test this as I don't have the same versions of the dependencies that you have, but I got to the point where it complained about a missing opencv dll, etc, so it looks like an improvement, so perhaps this could help you:

From my experience with VS2013, the problem is that when you build and just try to execute yafaray-xml, the files are not in the locations YafaRay expects.

So, even when it's a pain in the ***, you might have to make some kind of script that copies/moves files around this way: you should have a folder called "yafaray_v3" or similar with the files:
* yafaray-xml.exe
* yafaray_v3_core.dll
* yafaray_v3_plugin.dll
* And all the .dll files from all dependencies, such as OpenCV, etc, etc...

Also within this folder you should have another subfolder called "plugins" where you should copy all other .dll files generated during the build process in the "make" VS2013/src folder. I believe that when you make the "INSTALL" target this gets done more or less automatically.

However if you just run the yafaray-xml from within Visual Studio 2013, it executes the built one but not the one you installed with the correct folder structure and dependencies, so it fails.

Then the process should be:
* Build
* Make "INSTALL" target. Hopefully it will create somewhere the folders/DLL right.
* Copy all dependency DLL to the "installed" yafaray folder, in the same place you have yafaray-xml.exe, yafaray_v3_core.dll and yafaray_v3_plugin.dll.
* Manually execute yafaray-xml.exe and hope for the best ;-)

I hope this helps.
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 X64 Build

Post Fri May 19, 2017 9:03 pm

Hi,

Thanks for your reply! I disabled all plugins like opencv/jpeg/png and did fresh build with VS2013, did rebuild with install configuration and it created yafaray folder in program files directory, added all dependency dlls in bin directory and trying to launch yafaray-xml.exe but same problem there,
app is stucked during startup... Can you send me your dependencies when you did successful build with my solution? I'm using 64 bit version of boost 1.59.0 and x64 build for latest libxml2, Thanks once agan,

Regards, Zuba
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 20, 2017 7:27 am

Hello,

I think it's easier just to share my Visual Studio 2013 building system with you. You can download this from here. It includes all dependencies so you can do a full build.
https://github.com/DavidBluecame/YafaRay---unofficial-Builds/releases/download/unofficial/UNOFFICIAL.DavidBluecame.YafaRay.v3.building.system.with.Visual.Studio.2013.for.Windows.64bit.-.2017-05-20.zip

You only need to do this:
* Decompress this folder and move the "yafa-dev" folder to the C:\ drive. The path should be "C:\yafa-dev"
* Download and install Swig v3.0.12 into the folder "C:\swigwin-3.0.12"
* Then go to the folder "C:\yafa-dev\make" and open the file "yafaray.sln" with Visual Studio 2013.
* Build the target INSTALL
* The generated "yafaray_v3" folder, ready to be used within Blender, will appear in the folder "C:\yafa-dev\build\blender\yafaray_v3"

Keep in mind this is very unofficial! Honestly, I rarely use it because YafaRay built with Visual Studio 2013 is around 30% slower than YafaRay built with MinGW... In any case I hope this helps you and others as well to build YafaRay in Windows :-)
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 20, 2017 7:47 am

Thanks a lot! I'll try to build it and let's see if it will work for me...
EDIT: I tried your build on my machine with windows 7 environment and it has same problem,
then tried with another machine with windows 10 and both your and mine builds work,
so it's platform specific issue? Can't I use VS2013 build of yafa in Win 7 environment? thanks!
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 20, 2017 11:44 am

There should not be differences... I will take a look.

Do you have an anti virus software that could be blocking YafaRay or some dependency dll?
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 20, 2017 12:11 pm

You are right, there is something about building in VS2013 that requires Windows 8 API or higher. I'm not sure if that's some kind of setting in Visual Studio or something that needs to be set in the header files, etc.

Also, not sure if it could be affecting the dependency libraries I uploaded earlier or not... I would have to investigate but this will take time.
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 20, 2017 1:27 pm

Hi, thanks for your time, no I don't have any anti virus on my system, I'll do little more
research on it, it's interesting which library isn't available for windows 7 environment...
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Mon May 22, 2017 9:42 pm

Can you please tell me which old version of yafa would work in Win 7 environment with VS2013 x64 build?
Thanks in advance...
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Tue May 23, 2017 6:57 pm

Hello,

Older versions of YafaRay were built differently and I don't know how easy/difficult would it be to build them in VS2013.

My suspicion is that some library might be using an API higher than the Windows 7 API. For example I already found out that zlib 1.2.8 was using Windows 8.1 API by default and I had to change some things in a header to force it to use Windows 7 API. Unfortunately that didn't solve the problem for me yet.

I suspect perhaps boost or libxml2 but I cannot work on YafaRay for the next days, I might be able to investigate more this weekend, I hope.

YafaRay up to v2.1.1 didn't use Boost and they are more likely to work, but I cannot guarantee it as I don't know yet what the problem is with VS2013 builds and Windows 7.
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Tue May 23, 2017 7:35 pm

Hi, I tried to use boost 1.59.0 which works on win7 in other projects but same problem issued in yafa
so i'll try to use older versions of libxml, thanks for your help!
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Wed May 24, 2017 10:04 pm

One more thing, I tried to build yafa 3.2.0 using VS2010 but without success - getting error
"fatal error C1083: Cannot open include file: 'thread': No such file or directory", this means
yafa 3.2.0 uses C++ 11 standard which is supported from VS2012 and later, those versions of VS
use Win8/8.1 SDKs...
zZUBAa
 
Posts: 8
Joined: Tue May 02, 2017 8:56 am

Re: Yafaray 3.2.0 Visual Studio VS2013 x64 build

Post Sat May 27, 2017 7:10 pm

Hello,

After quite some investigation (this was really a difficult one!) I think I found the problem.

The "logging" component that shows the messages and saves the log files uses thread mutexes to avoid "mixing" and merging messages from different threads. For some reason in Windows 7 (when built with Visual Studio 2013) that was handled differently (still don't know why!?) and the logging thread was locked immediately after the object was created, causing a full lockup of the entire YafaRay.

Therefore I've made a change so when building with Visual Studio, the Logging object will not be locked. This solves the hanging problem and the only side effect is that some logging messages from different threads could be shown merged together, but that should not affect the rendering anyway.

For your information the changes are described here:
https://github.com/YafaRay/Core/commit/ ... 8b056e8aec

So, the only you need to do now is:
* Download (or pull) the latest YafaRay Core from github that has the fix in place.
* Build YafaRay either using your system or my system.
* If you use my system to build yafaray, the included zlib.dll and zlibwapi.dll files in my system would cause an error in Windows 7 asking for a function CreateFile2. To solve that, use the ".dll" files from the attached zip file instead to put them into the yafaray_v3 folder.

Please let me know if this solves the problem for you. It worked for me in Windows 7.
Attachments
zlib_dlls_windows7.zip
(100.46 KiB) Downloaded 1 time
User avatar
David Bluecame
 
Posts: 375
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain


Return to Developers' Corner



Who is online

Users browsing this forum: No registered users and 3 guests