Re: [osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-20 Thread Stuart Mentzer

  
  
Hi Chris,
Here's what I've got. You probably need to adjust the bat for
  your PATH setup. It isn't polished for general use yet so let me
  know if you have questions. I have only verified it with osgviewer
  so far: VC++ is (still!) too broken for MI + covariant returns to
  build my application so I have to refactor a bit before I can go
  further.
[The batch file is embedded in the text: most email systems block
  bat files.]

Stuart
--
  
Stuart G Mentzer
Objexx Engineering
Office  1.781.455.1150 x11
Mobile 1.781.708.3872

  
On 4/20/2016 5:23 PM, Chris Hanson
  wrote:


  
​Stuart, I am about to build OSG with VS2015 Community. Is your
build cookbook available somewhere so I'm not reinventing the
wheel?
  
  
  
  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



  

OSG VC++ 2015 Build on Windows

Notes:
 mcd is a script for md then cd
 A subset of optional dependencies was used for this first try

cmake.VC.r.bat: (installs OSG to C:\OSG) (without /arch arg for build that 
works on generic CPU)
@echo off
setlocal
set 
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\bin;C:\MinGW\bin;C:\Git\cmd;C:\CMake\bin
set INCLUDE=
set LIB=
set LIBPATH=
call setVC14.64.bat
set CC=cl
set CXX=cl
del CMakeCache.txt >nul 2>nul
C:\CMake\bin\cmake.exe -G "MinGW Makefiles" -DCMAKE_COLOR_MAKEFILE:BOOL=0 
-DCMAKE_INSTALL_PREFIX="C:/OSG" -DCMAKE_BUILD_TYPE=RELEASE 
-DCMAKE_CXX_FLAGS_RELEASE="/nologo /EHsc /DNOMINMAX /DWIN32_LEAN_AND_MEAN 
/DNDEBUG /O2 /GS- /MD" -DCMAKE_C_FLAGS_RELEASE="/nologo /EHsc /DNOMINMAX 
/DWIN32_LEAN_AND_MEAN /DNDEBUG /O2 /GS- /MD" %*
make -j%NUMBER_OF_PROCESSORS% VERBOSE=true
make install
endlocal


zlib:
mcd zlib_build
..\cmake.VC.r.bat ../zlib
copy zconf.h ..\zlib

minizip: (after zlib)
option(USE_AES "enables building of aes library" OFF)
mcd minizip_build
..\cmake.VC.r.bat -DZLIB_LIBRARY:FILEPATH="../zlib_build/zlib.lib" 
-DZLIB_INCLUDE_DIR:PATH="../zlib" ../minizip

curl:
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." ON)
mcd curl_build
..\cmake.VC.r.bat ../curl

freetype:
mcd freetype_build
..\cmake.VC.r.bat /I ../freetype

giflib:
copy osg-3rdparty-cmake\giflib\* giflib
mcd giflib_build
..\cmake.VC.r.bat -DGIFLIB_SOURCE_DIR:PATH="../giflib" -DSKIP_INSTALL_ALL=1 
../giflib

glut:
copy osg-3rdparty-cmake\glut\* glut
mcd glut_build
..\cmake.VC.r.bat -DGLUT_SOURCE_DIR:PATH="../glut" -DSKIP_INSTALL_ALL=1 ../glut

jpeg:
copy osg-3rdparty-cmake\libjpeg\* jpeg
mcd jpeg_build
..\cmake.VC.r.bat -DLIBJPEG_SOURCE_DIR:PATH="../jpeg" -DSKIP_INSTALL_ALL=1 
../jpeg

lpng: (after zlib)
mcd lpng_build
..\cmake.VC.r.bat -DZLIB_INCLUDE_DIR:PATH="../zlib" 
-DZLIB_LIBRARY:FILEPATH="../zlib_build/zlib" -DPNG_STATIC=1 ../lpng

tiff:
mcd tiff_build
..\cmake.VC.r.bat -DCMAKE_PREFIX_PATH:PATH=".." ../tiff
(not finding zlib, jpeg, ... packages)

Collect all 3rd party libraries in 3rdparty\lib directory and rename them:
freetype.lib
giflib.lib
glut32.lib
jpeg.lib
libcurl.lib
libcurl.dll
libcurl.dll.manifest
libpng16.lib(rename from libpng16_static.lib)
libpng16.dll
libpng16.dll.manifest
minizip.lib
tiff.lib
tiff.dll
tiff.dll.manifest
zlib.lib

Collect all 3rd party library headers in 3rdparty\include

OSG:

Put OSG 3.4.0 source in OSG directory

Top-level CMakeLists.txt:
 IF(MSVC) block (Use newest Windows Kits directory):
# Objexx
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} 
/LIBPATH:\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x64\"" 
CACHE INTERNAL "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
/LIBPATH:\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x64\"" 
CACHE INTERNAL "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} 
/LIBPATH:\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x64\"" 
CACHE INTERNAL "" FORCE)
include_directories(AFTER "C:/Projects/OSG/freetype/include")
 Enable packages on this line and add C:\CMake\bin to PATH so cpack is found:
OPTION(BUILD_OSG_PACKAGES "Set to ON to generate CPack configuration files 
and packaging targets" ON)

mcd OSG_build
..\cmake.VC.r.bat ../OSG___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-20 Thread Chris Hanson
​Stuart, I am about to build OSG with VS2015 Community. Is your build
cookbook available somewhere so I'm not reinventing the wheel?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-18 Thread Sebastian Messerschmidt

Am 18.04.2016 um 15:56 schrieb Stuart Mentzer:

Thanks Sebastian.

Good reminder about /arch:AVX2. I can post a separate binary package built with 
this for people with newer CPUs if it shows a good performance gain.

Ok. Be aware not all modern CPUs support this though.


I'll also experiment with /fp:fast and see what the performance gain is, but it 
sounds like it might not be a good idea for an OSG distribution package.

I'll try to get the Intel C++ builds working and I'll report back if I have any 
interesting findings. The docs claim binary compatibility with VC++ 2015 with 
/Qvc14. If there is interest in the CMake additions to support Intel C++ I can 
push them to a GitHub branch.

Ok, I wasn't aware of this. Maybe it is a newer feature. Keep us posted.


If anyone can point me to good performance benchmarks that would be helpful in 
sorting out the VC++ and Intel C++ options and performance.
You won't find something like this, at least not for what you are after. 
When it comes to OSG we propably have to do this ourselves.


Thanks,
Stuart


Cheers
Sebastian


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66861#66861





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-18 Thread Stuart Mentzer
Thanks Sebastian.

Good reminder about /arch:AVX2. I can post a separate binary package built with 
this for people with newer CPUs if it shows a good performance gain.

I'll also experiment with /fp:fast and see what the performance gain is, but it 
sounds like it might not be a good idea for an OSG distribution package.

I'll try to get the Intel C++ builds working and I'll report back if I have any 
interesting findings. The docs claim binary compatibility with VC++ 2015 with 
/Qvc14. If there is interest in the CMake additions to support Intel C++ I can 
push them to a GitHub branch.

If anyone can point me to good performance benchmarks that would be helpful in 
sorting out the VC++ and Intel C++ options and performance.

Thanks,
Stuart

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66861#66861





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-18 Thread Sebastian Messerschmidt

Am 18.04.2016 um 08:59 schrieb Stuart Mentzer:

Hi,

After some struggle I have managed to make a cookbook for building OSG with 
Visual C++ 2015. This is very exciting because I should finally be able to 
build our structural impact modeling application on Windows. There are a few 
items that would be great to get some feedback on:

For best (release build) performance would it make sense to use /fp:fast (along 
with /O2 /GS-) or could this create problems with propagation of the NaNs that 
can arise in OSG?
That might cause precision problems at least I think I noticed some 
rounding errors when using geocentric databases.




Would trying to build with Intel C++ likely to give significantly better 
performance? This is probably a question of whether OSG would benefit from its 
better auto-vectorization.
It makes more to activate AVX. This gave me some noticeable speed-up 
even with the MS-compiler. It will totally depend on your scene-graph 
too. So without benchmarking it is hard to tell.

If I stick with the VC++ 2015 OSG build I should be OK linking my application 
built with Intel C++ 2016 to it since they seem to be binary compatible, right?
Usually the Intel compiler beats the MS-compiler by a few percent, but 
they use different ABI (at least they did a year ago), If they are still 
incompatible you cannot link them. You have to build everything with the 
same compiler chain.



Since I'll need to build future OSG releases I am willing to host the Windows 
OSG (starting with 3.4.0) binary packages on our company website if someone on 
the OSG team wants to add a link to it on the Stable Releases page. Just let me 
know who best to contact.




Thank you!

Cheers,
Stuart[/list]


Cheers
Sebastian


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66848#66848





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [build] OSG 3.4.0 Build with Visual C++ 2015

2016-04-18 Thread Stuart Mentzer
Hi,

After some struggle I have managed to make a cookbook for building OSG with 
Visual C++ 2015. This is very exciting because I should finally be able to 
build our structural impact modeling application on Windows. There are a few 
items that would be great to get some feedback on:

For best (release build) performance would it make sense to use /fp:fast (along 
with /O2 /GS-) or could this create problems with propagation of the NaNs that 
can arise in OSG?

Would trying to build with Intel C++ likely to give significantly better 
performance? This is probably a question of whether OSG would benefit from its 
better auto-vectorization.

If I stick with the VC++ 2015 OSG build I should be OK linking my application 
built with Intel C++ 2016 to it since they seem to be binary compatible, right?


Since I'll need to build future OSG releases I am willing to host the Windows 
OSG (starting with 3.4.0) binary packages on our company website if someone on 
the OSG team wants to add a link to it on the Stable Releases page. Just let me 
know who best to contact.

Thank you!

Cheers,
Stuart[/list]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66848#66848





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org