View Issue Details

IDProjectCategoryView StatusLast Update
0027053CommunityOCCT:Releasepublic2016-04-20 15:50
ReporterBenjaminBihler Assigned Toabv 
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2012 
Target Version7.0.0Fixed in Version7.0.0 
Summary0027053: Compilation fails with "fatal error RC1103: invalid option, /fp:precise"
DescriptionI use MSVC 2012 Update 4 in the 32 bit version and cmake 3.3.1 to generate nmake-Makefiles.

With some older commit like bd6c46193d8d5948359a8f64e19ad9dd3b0bca32, compilation succeeded, but with commit d573adcf38d586fba68cde1a041ea9a3dd2c261f I receive the following error message:

_ProgressScale.cxx.obj
Message_ProgressScale.cxx
[ 2%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/Message/Message
_ProgressSentry.cxx.obj
Message_ProgressSentry.cxx
[ 2%] Building RC object src/TKernel/CMakeFiles/TKernel.dir/__/__/resources/TKe
rnel.rc.res
fatal error RC1103: invalid option, /fp:precise
NMAKE : fatal error U1077: "D:\PROGRA~1\MICROS~1\Windows\v7.0\Bin\RC.Exe": Rückg
abe-Code "0x1"
Stop.
NMAKE : fatal error U1077: ""D:\Programme (x86)\Microsoft Visual Studio 11.0\VC\
BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""D:\Programme (x86)\Microsoft Visual Studio 11.0\VC\
BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
Steps To Reproduce1. Open command prompt
2. Set up paths to VC++ compiler, by running relevant batch script, e.g.:

> call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"

3. Run cmake-gui from this environment
4. Select "NMake makefiles" as generator (with default compilers)
5. Configure and generate makefiles
6. Run nmake from the same environment
TagsNo tags attached.
Test case number

Relationships

related to 0027138 closedabv Open CASCADE Configuration, Cmake - incorrect binaries installation path for single generators 

Activities

BenjaminBihler

2016-01-21 11:28

developer   ~0049998

Was it wrong, that I have assigned this bug to bugmaster? I will assign it to someone else.

abv

2016-01-21 12:00

manager   ~0050007

Last edited: 2016-01-21 12:07

Benjamin, can you describe in more details the process (sorry I have never used nmake). Do I understand correctly that you run CMake (with paths to Visual Studio set up), select "NMake makefiles" as generator, generate makefiles, and then type "nmake" to get it built?

abv

2016-01-21 12:10

manager   ~0050008

Note that option /fp:precise is available in Visual C++ 10 (VS 2010) and later, thus I deem it is either do not get to the right place, or you might have older compiler in your path.

BenjaminBihler

2016-01-21 12:15

developer   ~0050009

Andrey, exactly like that. It has always worked like this, but now it fails with the given error message.

I guess that the problem is that this option is passed to the resource compiler rc.exe.

Epy

2016-01-22 23:07

developer   ~0050090

Last edited: 2016-01-22 23:08

We had a similar problem with OCE, the solution is that this should be added to CMAKE_CXX_FLAGS or similar, not by add_definitions:

jake@Jake-VM:~/occt$ git grep fp:precise
adm/cmake/occt_defs_flags.cmake: add_definitions(/fp:precise)

Edit: because yes, as Benjamin said, definitions are passed to the resource compiler

abv

2016-01-24 11:10

manager   ~0050092

Thank you Jacob, it works

git

2016-01-24 11:10

administrator   ~0050093

Branch CR27053 has been created by abv.

SHA-1: 9fe662f2172da77d126ee79fa0484a5e8f2bf6a6


Detailed log of new commits:

Author: abv
Date: Sun Jan 24 09:28:08 2016 +0300

    0027053: Compilation fails with "fatal error RC1103: invalid option, /fp:precise"
    
    CMake script is corrected to add compiler options (except macro definitions) to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS variables directly, instead of using add_definitions() command.
    This eliminates failure of build by NMake due to incorrect options passed to RC compiler.

abv

2016-01-24 12:41

manager   ~0050094

Fix pushed to CR27053, please review.

Benjamin, can you test it on your side?

Note that on install, dlls get copied to "lib" subdirectory, not "bin" one (Linux-style layout). This is activated for single-configuration builds (see INSTALL_LIB_DIR variable defined in main CMakeLists.txt).

git

2016-01-24 21:02

administrator   ~0050095

Branch CR27053 has been updated by abv.

SHA-1: d6cda0948105afbe8893b52d2843451f02392579


Detailed log of new commits:

Author: abv
Date: Sun Jan 24 21:01:37 2016 +0300

    Restore usage of nested install paths (e.g. win32/vc10/bind) on Windows for single-configuration builds.

BenjaminBihler

2016-02-01 13:52

developer   ~0050293

abv, I have tested it! Works great now! :-)

git

2016-04-17 13:18

administrator   ~0052837

Branch CR27053 has been deleted by kgv.

SHA-1: d6cda0948105afbe8893b52d2843451f02392579

Related Changesets

occt: master 100592c1

2016-01-24 06:28:08

abv


Committer: abv Details Diff
0027053: Compilation fails with "fatal error RC1103: invalid option, /fp:precise"

CMake script is corrected to add compiler options (except macro definitions) to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS variables directly, instead of using add_definitions() command.
This eliminates failure of build by NMake due to incorrect options passed to RC compiler.
Affected Issues
0027053
mod - adm/cmake/occt_defs_flags.cmake Diff File

Issue History

Date Modified Username Field Change
2015-12-30 14:34 BenjaminBihler New Issue
2015-12-30 14:34 BenjaminBihler Assigned To => bugmaster
2016-01-21 11:28 BenjaminBihler Note Added: 0049998
2016-01-21 11:28 BenjaminBihler Assigned To bugmaster => abv
2016-01-21 12:00 abv Note Added: 0050007
2016-01-21 12:07 abv Note Edited: 0050007
2016-01-21 12:10 abv Note Added: 0050008
2016-01-21 12:15 BenjaminBihler Note Added: 0050009
2016-01-22 23:07 Epy Note Added: 0050090
2016-01-22 23:08 Epy Note Edited: 0050090
2016-01-24 11:10 abv Note Added: 0050092
2016-01-24 11:10 git Note Added: 0050093
2016-01-24 12:41 abv Note Added: 0050094
2016-01-24 12:41 abv Assigned To abv => ibs
2016-01-24 12:41 abv Status new => resolved
2016-01-24 12:41 abv Target Version 7.1.0 => 7.0.0
2016-01-24 12:41 abv Steps to Reproduce Updated
2016-01-24 21:02 git Note Added: 0050095
2016-02-01 13:52 BenjaminBihler Note Added: 0050293
2016-02-05 19:31 ibs Relationship added related to 0027138
2016-02-11 14:14 ibs Assigned To ibs => bugmaster
2016-02-11 14:14 ibs Status resolved => reviewed
2016-02-12 11:37 abv Changeset attached => occt master 100592c1
2016-02-12 11:37 abv Assigned To bugmaster => abv
2016-02-12 11:37 abv Status reviewed => verified
2016-02-12 11:37 abv Resolution open => fixed
2016-04-17 13:18 git Note Added: 0052837
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed