View Issue Details

IDProjectCategoryView StatusLast Update
0023447Open CASCADEOCCT:Codingpublic2013-04-29 15:21
ReportervtnAssigned Tobugmaster  
PriorityhighSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.5.3 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023447: Sometimes devenv hangs up during compilation of OCCT by VC 2010 (32 and 64 bit).
DescriptionThe compilation is made by attached script. It assumes the OS_TYPE variable is set to Windows-32-VC10 or Windows-64-VC10, DEPENDS variable it empty, the PRODUCTS_PROPERTIES_WINDOWS variable is set to path of OCCT 3rd party. For example:

set "OCCT3RDPARTY=...\occt-3rdparty"
set "TBBDIR=%OCCT3RDPARTY%\tbb30_018oss"
set "TCLHOME=%OCCT3RDPARTY%\tcltk-85-%ARCH%"
set "FTDIR=%OCCT3RDPARTY%\freetype-2.4.10-%VCVER%-%ARCH%"
set "FTGLDIR=%OCCT3RDPARTY%\ftgl-2.1.3-%VCVER%-%ARCH%"
set "GL2PSDIR=%OCCT3RDPARTY%\gl2ps-1.3.5-%VCVER%-%ARCH%"
set "FREEIMAGEDIR=%OCCT3RDPARTY%\freeimage-%VCVER%-%ARCH%"
Steps To ReproduceThe problem was reproduced using Jenkins jobs, i.e. the script was executed in offline mode (the user desktop is not available).

NOTE:
The MSBuild error log is attached.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • build.bat (5,602 bytes)
  • MSBuild.log (2,140 bytes)
  • build_msbuild.bat (6,003 bytes)
  • build_msbuild_2.bat (6,079 bytes)
  • build_msbuild_3.bat (6,038 bytes)
  • build_msbuild_4.bat (6,930 bytes)

Activities

vtn

2012-09-26 16:55

developer  

build.bat (5,602 bytes)

vtn

2012-09-26 16:56

developer  

MSBuild.log (2,140 bytes)

vtn

2012-09-26 17:05

developer   ~0021570

The build script contain the following strings:

rem Disable parallel build of MSBuild tool for VC10 in order to avoid hang-up
set "BuildInParallel=false"

It was considered as a workaround, but is it not work actually. These strings may be deleted.

abv

2012-09-28 09:07

manager   ~0021590

Let's first try to reproduce the problem outside of Jenkins environment...

ibs

2012-10-02 09:40

developer   ~0021610

Last edited: 2012-10-02 10:05

So far I don't able to reproduce the problem using the attached script.

The script has been ran on two computers about 7-9 times. First computer had a dual cores (c2d e8200); second had a four cores (i5-2310).

Windows 7 SP1
Visual Studion 2010 v. 10.0.40219.1 SP1Rel
MS .Net FrameWork v. 4.0.30319 SP1Rel

vtn

2012-10-02 12:07

developer   ~0021615

:(

abv

2012-10-02 13:41

manager   ~0021619

Lets try to make script to build OCCT using MSBuild directly (instead of running devenv). It is desirable to run it in mutithreaded mode and save a log to file.

ibs

2012-10-02 16:18

developer  

build_msbuild.bat (6,003 bytes)

ibs

2012-10-02 16:22

developer   ~0021622

Try to compile by this attaching msbuild-script.

The script (build.bat) has been modified:
1. devenv has been replaced by msbuild.
2. variable VCVARSALL_PATH has been added [SHOULD DEFINE] (vcvarsall.bat with absolute path; for example, d:\Devtools\Vstudio\VC10\VC\vcvarsall.bat)
3. BuildInParallel = true

The modified script (build_msbuild.bat) is attached.

vtn

2012-10-03 17:29

developer   ~0021646

I think VCVARSALL_PATH path should be defined from registry.

ibs

2012-10-08 11:10

developer  

build_msbuild_2.bat (6,079 bytes)

ibs

2012-10-08 11:11

developer   ~0021676

The script (build.bat) has been modified (version 2.0) :) Try one

vtn

2012-10-08 16:04

developer   ~0021680

As far as I understand MSBuild v4.0 is a part of Visual Studio 2010. V2.0 is a part of VS 2005 and v3.5 is a part of VS 2008. The vcproj of VS 2010 contains ToolsVersion="4.0" tag, but I do not see such tags in other projects.

Is it possible to use v4.0 for all OCCT projects (8.0, 9.0, 10.0 versions)?

Is it necessary to use Wow6432Node sub-tree for 64 bit stations? I had problems with correct registry key for devenv on some stations.

Is this solution works for Express edition of VS?

ibs

2012-10-08 18:03

developer   ~0021683

MSBuild X.Y is part of .NET Framework X.Y.

Not necessary to use Wow6432Node. The script works fine for x86-vc10 and x64-vc10.

>Is it possible to use v4.0 for all OCCT projects (8.0, 9.0, 10.0 versions)?
It's a good question :). I'll explore this issue...

>Is this solution works for Express edition of VS?
For MSBuild 4.0 just requires .NET Framework 4.0.

I'v modified script: remove "typos".

ibs

2012-10-08 18:04

developer  

build_msbuild_3.bat (6,038 bytes)

ibs

2012-10-08 18:06

developer   ~0021684

The name of the last script is build_msbuild_3.bat

vtn

2012-10-08 18:09

developer   ~0021685

The VS 2010 may be not installed on a station. Is MSBuild 4.0 exist in this case?

ibs

2012-10-08 18:16

developer   ~0021686

The framework 4.0 contains one.

vtn

2012-10-08 18:19

developer   ~0021687

It may be not installed.

ibs

2012-10-16 11:07

developer   ~0021781

By the way, msbuild uses the Visual C++ compiler anyway. So we need some kind of studio.

>Is it possible to use v4.0 for all OCCT projects (8.0, 9.0, 10.0 versions)?
I'm still working on it..

Have you try to use msbuild?

vtn

2012-10-16 11:32

developer   ~0021784

As far as I understand It is necessary and enough to get correct (2.0,3.5,4.0) version of MSBuild from registry depend on our parameters of script (Windows-32-VC8, ...).

I am not sure if BuildInParallel parameter exists in lower MSBuild versions.

vtn

2012-10-16 11:34

developer   ~0021785

>Have you try to use msbuild?
No. I waiting for your compete solution.

ibs

2012-10-16 11:50

developer   ~0021786

>No. I waiting for your compete solution.
It's complete solution for this case. Perhaps the proposed solution won't work for you. In this case it makes not sence to use one.

ibs

2012-10-16 11:54

developer   ~0021787

.. and to develop msbuild solution for all configurations..

abv

2012-10-16 12:10

manager   ~0021788

I suggest we implement a batch script allowing to build OCCT using MSBuild in normal development environment where VS is installed (hence using relevant environment and corresponding version of the MSBuild) and OCCT is properly configured.

The options should be provided to specify what configurations to build, and where to put the build log.

This script can be included within WOK or OCCT sources to be available for developers, and tested to work with all supported versions on VS.

All adaptations for Jenkins environment shall then be made by maintenance team.

vtn

2012-10-16 12:12

developer   ~0021789

It is looks like we have some misunderstandings.

We have some Windows stations. Each stations may have it own set of installed software. For example I have stations with MSBuild 2.0 and 3.5, 3.5 and 4.0.

Jenkins uses the same build script for different kind of compilations. It is possible to test only VC10 part, but it will be necessary to finish the script for all types of compilers.

1. If MSBuild the solution will not work in parallel mode. It will work if BuildInParallel is false (one thread of compilation).
2. It will be possible to check different number of threads in MSBuild parameters. For example: number of processors - 1.
3. The script will not depend on full Visual Station package (devenv). It will be possible to test on Express Edition.

That is why I think it is necessary to finish the script in any case.

ibs

2012-10-19 17:13

developer  

build_msbuild_4.bat (6,930 bytes)

ibs

2012-10-19 17:33

developer   ~0021857

Last edited: 2012-10-19 17:34

Vladimir,
I've finished the script. ( build_msbuild_4.bat )

>1. If MSBuild the solution will not work in parallel mode.
>It will work if BuildInParallel is false (one thread of compilation).

The solution will process in parallel mode, if BuildInParallel is true.
If BuildInParallel is false - the solution will process in "single mode" (one core).

>2. It will be possible to check different number of threads in MSBuild
>parameters. For example: number of processors - 1.

Just set the msbuild argumen: "/m:%number_of_cores%". in the script "build_msbuild_4.bat" this argument is set as "/m" (to use all cores if possible).

>3. The script will not depend on full Visual Station package (devenv).
>It will be possible to test on Express Edition.

yup, it'll work with Express Edition


p.s. waiting for new information

bugmaster

2012-11-22 10:21

administrator   ~0022340

Solution has bee implemented to OCCT Jenkins building system.

Issue History

Date Modified Username Field Change
2012-09-26 16:55 vtn New Issue
2012-09-26 16:55 vtn Assigned To => abv
2012-09-26 16:55 vtn File Added: build.bat
2012-09-26 16:56 vtn File Added: MSBuild.log
2012-09-26 17:05 vtn Note Added: 0021570
2012-09-28 09:07 abv Note Added: 0021590
2012-09-28 09:07 abv Assigned To abv => ibs
2012-09-28 09:07 abv Status new => assigned
2012-10-02 09:40 ibs Note Added: 0021610
2012-10-02 09:40 ibs Note Edited: 0021610
2012-10-02 10:05 ibs Note Edited: 0021610
2012-10-02 10:07 ibs Assigned To ibs => vtn
2012-10-02 10:07 ibs Status assigned => feedback
2012-10-02 12:06 vtn Assigned To vtn => abv
2012-10-02 12:07 vtn Note Added: 0021615
2012-10-02 12:07 vtn Status feedback => assigned
2012-10-02 12:56 abv Assigned To abv => ibs
2012-10-02 13:41 abv Note Added: 0021619
2012-10-02 16:18 ibs File Added: build_msbuild.bat
2012-10-02 16:22 ibs Note Added: 0021622
2012-10-02 17:30 ibs Assigned To ibs => vtn
2012-10-02 17:30 ibs Status assigned => feedback
2012-10-03 17:29 vtn Note Added: 0021646
2012-10-03 17:29 vtn Status feedback => assigned
2012-10-03 17:29 vtn Assigned To vtn => abv
2012-10-03 17:30 vtn Assigned To abv => ibs
2012-10-08 11:10 ibs File Added: build_msbuild_2.bat
2012-10-08 11:11 ibs Note Added: 0021676
2012-10-08 11:14 ibs Assigned To ibs => vtn
2012-10-08 11:14 ibs Status assigned => feedback
2012-10-08 16:04 vtn Note Added: 0021680
2012-10-08 16:04 vtn Status feedback => assigned
2012-10-08 16:04 vtn Assigned To vtn => ibs
2012-10-08 16:04 vtn Status assigned => feedback
2012-10-08 18:03 ibs Note Added: 0021683
2012-10-08 18:04 ibs File Added: build_msbuild_3.bat
2012-10-08 18:06 ibs Note Added: 0021684
2012-10-08 18:09 vtn Note Added: 0021685
2012-10-08 18:09 vtn Status feedback => assigned
2012-10-08 18:16 ibs Note Added: 0021686
2012-10-08 18:19 vtn Note Added: 0021687
2012-10-16 11:07 ibs Note Added: 0021781
2012-10-16 11:08 ibs Assigned To ibs => vtn
2012-10-16 11:08 ibs Status assigned => feedback
2012-10-16 11:32 vtn Note Added: 0021784
2012-10-16 11:32 vtn Status feedback => assigned
2012-10-16 11:32 vtn Assigned To vtn => ibs
2012-10-16 11:32 vtn Status assigned => feedback
2012-10-16 11:34 vtn Note Added: 0021785
2012-10-16 11:34 vtn Status feedback => assigned
2012-10-16 11:50 ibs Note Added: 0021786
2012-10-16 11:51 ibs Assigned To ibs => vtn
2012-10-16 11:51 ibs Status assigned => feedback
2012-10-16 11:54 ibs Note Added: 0021787
2012-10-16 12:10 abv Note Added: 0021788
2012-10-16 12:10 abv Assigned To vtn => ibs
2012-10-16 12:10 abv Status feedback => assigned
2012-10-16 12:12 vtn Note Added: 0021789
2012-10-16 12:12 vtn Status assigned => feedback
2012-10-19 17:13 ibs File Added: build_msbuild_4.bat
2012-10-19 17:33 ibs Note Added: 0021857
2012-10-19 17:34 ibs Note Edited: 0021857
2012-10-19 17:40 ibs Assigned To ibs => vtn
2012-10-23 15:08 abv Target Version 6.5.4 => 6.6.0
2012-11-01 12:28 vtn Assigned To vtn => inv
2012-11-22 10:20 bugmaster Assigned To inv => bugmaster
2012-11-22 10:20 bugmaster Status feedback => tested
2012-11-22 10:21 bugmaster Note Added: 0022340
2012-11-22 10:21 bugmaster Status tested => verified
2012-11-22 10:21 bugmaster Resolution open => fixed
2012-12-05 11:46 bugmaster Test case number => Not needed
2013-04-23 13:37 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding