MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027053Community[OCCT] OCCT:Releasepublic2015-12-30 14:342016-04-20 15:50
ReporterBenjaminBihler 
Assigned Toabv 
PrioritynormalSeveritymajor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2012OS Version32bit
Product Version 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.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
Attached Files

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

-  Notes
(0049998)
BenjaminBihler (developer)
2016-01-21 11:28

Was it wrong, that I have assigned this bug to bugmaster? I will assign it to someone else.
(0050007)
abv (manager)
2016-01-21 12:00
edited on: 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?

(0050008)
abv (manager)
2016-01-21 12:10

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.
(0050009)
BenjaminBihler (developer)
2016-01-21 12:15

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.
(0050090)
Epy (developer)
2016-01-22 23:07
edited on: 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

(0050092)
abv (manager)
2016-01-24 11:10

Thank you Jacob, it works
(0050093)
git (administrator)
2016-01-24 11:10

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.
(0050094)
abv (manager)
2016-01-24 12:41

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).
(0050095)
git (administrator)
2016-01-24 21:02

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.

(0050293)
BenjaminBihler (developer)
2016-02-01 13:52

abv, I have tested it! Works great now! :-)
(0052837)
git (administrator)
2016-04-17 13:18

Branch CR27053 has been deleted by kgv.

SHA-1: d6cda0948105afbe8893b52d2843451f02392579

- Related Changesets
occt: master 100592c1
Timestamp: 2016-01-24 06:28:08
Author: 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.
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 View Revisions
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 View Revisions
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 View Revisions
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 user533 Fixed in Version => 7.0.0
2016-04-20 15:50 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker