MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029266Community[OCCT] OCCT:Configurationpublic2017-10-26 22:252018-06-29 21:18
Reporterdrazmyslovich 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionreopened 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.3.0Fixed in Version[OCCT] 7.3.0 
Summary0029266: Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287
DescriptionIn the fix of 0028287 the search folder for pdb files was changed from "bind" to "bin", which is correct for the release configuration with debug info, but fails for debug configuration. Now install target fails to build debug configuration resulting in the error "CMake Error at src/TKernel/cmake_install.cmake:32 (file): file INSTALL cannot find "win32/vc10/bin/TKernel.pdb"."
Steps To Reproduceset CMAKE_BUILD_TYPE to Debug
configure and build
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
child of 0028287closedbugmaster Open CASCADE CMake install does not copy pdb files in RelWithDebInfo mode 

-  Notes
(0072617)
git (administrator)
2017-11-30 12:47

Branch CR29266 has been created by apn.

SHA-1: 9641c3008950ec3fbd054891b94dc7a7e74b8713


Detailed log of new commits:

Author: apn
Date: Wed Nov 29 15:46:54 2017 +0300

    0029266: CMake install does not copy pdb files in Debug mode due to the changes in 0028287
    
    Added definition of OCCT_INSTALL_BIN_LETTER in building with SINGLE_GENERATOR
(0072625)
apn (administrator)
2017-11-30 18:17

Dear ski, could you please review CR29266.
Compilation was checked with SINGLE_GENERATOR (Release,Debug and RelWithDebInfo).
(0074465)
git (administrator)
2018-03-14 12:02

Branch CR29266 has been updated forcibly by apn.

SHA-1: 7f04efe99529f3502812d3280ec7e785644b708e
(0074477)
git (administrator)
2018-03-14 16:09

Branch CR29266 has been updated forcibly by apn.

SHA-1: b5888586609a840d68488a5cd20c5b12757d6d13
(0074493)
apn (administrator)
2018-03-15 10:58
edited on: 2018-03-15 11:04

Remove declaration of unused macros OCCT_INSERT_CODE_FOR_TARGET in main CMakeLists.txt.
Replace `if (NOT SINGLE_GENERATOR)` by `if (WIN32)` because OCCT_INSTALL_BIN_LETTER is used only on Windows (isn't depended on type of generator) due to the fact that bind/libd/bini/libi folders are not used on Linux (only bin and lib).
OCCT and PRODUCTS compilation and install procedures were checked in all configuration: Release, Debug, RelWithDebInfo (single-configuration too). Pdb files are successfully copied on Windows platform if CMAKE_BUILD_TYPE is set to Debug or RelWithDebInfo.

Dear ski, could you please review OCCT and Products branches CR29266.

(0074596)
git (administrator)
2018-03-19 10:05

Branch CR29266 has been deleted by kgv.

SHA-1: b5888586609a840d68488a5cd20c5b12757d6d13
(0075790)
BenjaminBihler (developer)
2018-05-03 18:01

Commit b1f350a2e1168f42487de0549ac425da67c1c407 introduces an ugly behaviour when building OCCT with CMake using MSYS Makefiles and Mingw-w64/g++ as compiler. (It might be that this behaviour is not compiler/configuration-dependent.)

Since that commit the CMake entries/variables INSTALL_DIR_BIN (here "win64/gcc/bin") and INSTALL_DIR_LIB (here "win64/gcc/lib") are ignored an instead the binaries are here installed to "win64/gcc/bind" and the libraries are installed to "win64/gcc/libd". This is surprising. It is also dangerous, because if some debugging configuration refers to the "win64/gcc/bin"-path, but OCCT binaries are installed to another path, wrong (old?) libraries will be used for debugging. Exactly this has happened here and has cost many ours searching for the error.

Adding a debugging library postfix to the CMake variables INSTALL_DIR_BIN and INSTALL_DIR_LIB would be fine as long as I can overwrite them. But letting these variables exist and ignoring them seems to be no option.
(0076230)
apn (administrator)
2018-05-24 15:01

I've built current state of occt (included commit b1f350a2e1168f42487de0549ac425da67c1c407) using MSYS Makefiles CMake generator and Mingw-w64/g++ as compiler (CMAKE_CXX_COMPILER C:/mingw-w64/mingw64/bin/g++.exe, CMAKE_C_COMPILER C:/mingw-w64/mingw64/bin/gcc.exe).
During installation procedure all binaries and libraries were installed to install\win64\gcc\bin and install\win64\gcc\lib folders.
After building and installing in Debug mode (CMAKE_BUILD_TYPE Debug) binaries and libraries were installed respectively to install\win64\gcc\bind and install\win64\gcc\libd folders.
Also it's possible to define INSTALL_DIR_BIN and INSTALL_DIR_LIB manually. This option works correctly.
(0076241)
git (administrator)
2018-05-24 16:54

Branch CR29266 has been created by apn.

SHA-1: 76c4b4d5b6a6bb09595abc8ec2d5192db4648b69


Detailed log of new commits:

Author: apn
Date: Thu May 24 16:54:00 2018 +0300

    0029266: Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287
    
    Define variable "OCCT_INSTALL_BIN_LETTER" only if compiler is some version of Microsoft Visual C.
(0076301)
apn (administrator)
2018-05-24 19:33

Macros OCCT_INSERT_CODE_FOR_TARGET (which defines variable OCCT_INSTALL_BIN_LETTER according to build type) was called on Windows only and for all cmake generators (including single generators). INSTALL_DIR_BIN is defined to "win64/gcc/bin", but in cmake install procedure defines as "install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")". So ${OCCT_INSTALL_BIN_LETTER} was replaced by "d" and binaries were installed to "win64/gcc/bind".

In fix CR29266 macros OCCT_INSERT_CODE_FOR_TARGET is called only if compiler is some version of Microsoft Visual C. So "bind" and "libd" folders are used only when occt or products are compiled with Visual Studio. On Linux and for all single generators (e.g. msys or mingw) INSTALL_DIR_BIN is always defined to ${ARCH}/${COMPILER}/bin.
(0076351)
abv (manager)
2018-05-25 19:17

Reviewed, added to branch CR0-OCCT730beta for integration
(0076569)
BenjaminBihler (developer)
2018-06-04 10:45

I have tested it. It works great now, thank you!
(0076896)
git (administrator)
2018-06-23 13:56

Branch CR29266 has been deleted by kgv.

SHA-1: 76c4b4d5b6a6bb09595abc8ec2d5192db4648b69

- Related Changesets
occt: master b1f350a2
Timestamp: 2017-11-29 12:46:54
Author: apn
Committer: bugmaster
Details ] Diff ]
0029266: CMake install does not copy pdb files in Debug mode due to the changes in 0028287

OCCT_INSTALL_BIN_LETTER is used only on Windows (isn't depended on type of generator) because bind/libd/bini/libi folders are not used on Linux (only bin and lib)
mod - adm/cmake/occt_macros.cmake Diff ] File ]
mod - adm/cmake/occt_toolkit.cmake Diff ] File ]
mod - adm/cmake/occt_toolkit_tool.cmake Diff ] File ]
mod - CMakeLists.txt Diff ] File ]
occt: master e5e529b9
Timestamp: 2018-05-24 13:54:00
Author: abv
Committer: abv
Details ] Diff ]
0029266: Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287

Define variable "OCCT_INSTALL_BIN_LETTER" only if compiler is some version of Microsoft Visual C.
mod - adm/cmake/occt_macros.cmake Diff ] File ]
mod - adm/cmake/occt_toolkit.cmake Diff ] File ]
occt: master 6acbb1c6
Timestamp: 2018-05-24 13:54:00
Author: abv
Committer: abv
Details ] Diff ]
0029266: Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287

Define variable "OCCT_INSTALL_BIN_LETTER" only if compiler is some version of Microsoft Visual C.
mod - adm/cmake/occt_macros.cmake Diff ] File ]
mod - adm/cmake/occt_toolkit.cmake Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-10-26 22:25 drazmyslovich New Issue
2017-10-26 22:25 drazmyslovich Assigned To => bugmaster
2017-11-28 11:37 bugmaster Assigned To bugmaster => apn
2017-11-28 11:37 bugmaster Status new => assigned
2017-11-29 09:24 abv Relationship added child of 0028287
2017-11-30 12:47 git Note Added: 0072617
2017-11-30 18:17 apn Test case number => Not needed
2017-11-30 18:17 apn Note Added: 0072625
2017-11-30 18:17 apn Assigned To apn => ski
2017-11-30 18:17 apn Status assigned => resolved
2017-11-30 18:17 apn Steps to Reproduce Updated View Revisions
2018-03-14 12:02 git Note Added: 0074465
2018-03-14 16:09 git Note Added: 0074477
2018-03-15 10:58 apn Note Added: 0074493
2018-03-15 11:03 apn Note Edited: 0074493 View Revisions
2018-03-15 11:04 apn Note Edited: 0074493 View Revisions
2018-03-15 17:55 ski Assigned To ski => bugmaster
2018-03-15 17:55 ski Status resolved => reviewed
2018-03-16 13:52 kgv Summary CMake install does not copy pdb files in Debug mode due to the changes in 0028287 => Configuration - CMake install does not copy pdb files in Debug mode due to the changes in 0028287
2018-03-16 14:21 bugmaster Status reviewed => tested
2018-03-18 13:21 bugmaster Changeset attached => occt master b1f350a2
2018-03-18 13:21 bugmaster Status tested => verified
2018-03-18 13:21 bugmaster Resolution open => fixed
2018-03-19 10:05 git Note Added: 0074596
2018-05-03 18:01 BenjaminBihler Note Added: 0075790
2018-05-03 18:01 BenjaminBihler Status verified => feedback
2018-05-03 18:01 BenjaminBihler Resolution fixed => reopened
2018-05-14 15:51 bugmaster Assigned To bugmaster => apn
2018-05-24 15:01 apn Note Added: 0076230
2018-05-24 16:54 git Note Added: 0076241
2018-05-24 19:33 apn Note Added: 0076301
2018-05-24 19:37 apn Assigned To apn => abv
2018-05-24 19:37 apn Status feedback => resolved
2018-05-25 19:17 abv Note Added: 0076351
2018-05-25 19:17 abv Assigned To abv => bugmaster
2018-05-25 19:17 abv Status resolved => reviewed
2018-05-29 12:33 abv Changeset attached => occt master e5e529b9
2018-05-29 12:33 abv Assigned To bugmaster => abv
2018-05-29 12:33 abv Status reviewed => verified
2018-05-29 15:54 abv Changeset attached => occt master 6acbb1c6
2018-06-04 10:45 BenjaminBihler Note Added: 0076569
2018-06-23 13:56 git Note Added: 0076896
2018-06-29 21:13 user533 Fixed in Version => 7.3.0
2018-06-29 21:18 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker