View Issue Details

IDProjectCategoryView StatusLast Update
0020716Open CASCADEOCCT:Codingpublic2014-11-11 12:58
ReporterptvAssigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
OSAll 
Target Version6.8.0Fixed in Version6.8.0 
Summary0020716: Eliminate usage of "config.h" header file
DescriptionIn fact, during compilation of any product based on Open CASCADE on linux I see
warnings:
config.h:<line numbner>: warning "PACKAGE" redefined
config.h:<line numbner>: warning "PACKAGE_VERSION" redefined
...etc
And there a lot of such warnings about string defines redefinition.

With assistance of ABV it is decided that it would be more better
and comfortable to leave config.h (which generates automatically by configure
or automake) without changes and add special occ_config.h that will contain
the following construction

#ifndef OCC_CONFIG_H
#define OCC_CONFIG_H

// for Linux platforms
#ifdef WIN32
// make some changes and definitions for Windows platforms
#else ...// for Linux platforms
...
#include <config.h>
...
#endif

#endif // OCC_CONFIG_H

and to include this occ_config.h in Open CASCADE files instead of automatically
generated config.h
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0022972 closedkgv Open CASCADE Eliminate macro definitions that has compiler-provided analogs (WNT and so on) 

Activities

abv

2014-05-03 07:32

manager   ~0029179

Usage of config.h should be completely revised. If possible, it should be eliminated completely -- we can rely on macros defined by compiler for detection of compiler and its settings, and on macros provided externally for definition of build environment (presence and location on third-party libraries etc.). If still necessary, config file should be made occt-specific to avoid conflicts, and there should be clear policy on how it is generated and used.

abv

2014-08-21 11:39

manager   ~0030979

It is agreed to get rid of config.h file completely, so as not to depend on its external generation:

- all inclusions of this header should be removed
- all places where macros defined by config.h were are used should be revised to either just remove this check (if obsolete) or use compiler-defined macros (like _MSC_VER, __GNUC, etc.)
- if the same complex check is needed in many places, specific macro can be defined in Standard_Macro.hxx for it

git

2014-08-21 13:02

administrator   ~0030993

Branch CR20716 has been created by ski.

SHA-1: b5d58e7c1f0cd473472ec41c50be7258945cea86


Detailed log of new commits:

Author: ski
Date: Thu Aug 21 13:02:37 2014 +0400

    All inclusions of "config.h" were removed.

git

2014-08-22 10:42

administrator   ~0031023

Branch CR20716 has been updated by mnt.

SHA-1: 80e6c2cdb16826bdd40b9f3e5e84c3e920708cf3


Detailed log of new commits:

Author: Maintenance team (INV)
Date: Fri Aug 22 10:07:30 2014 +0400

    All places where macros defined by config.h were checked and removed

git

2014-08-22 10:47

administrator   ~0031024

Branch CR20716 has been updated forcibly by apn.

SHA-1: c2db97c5dade83001ffc5bbea64d159d896872a8

git

2014-08-22 13:12

administrator   ~0031026

Branch CR20716 has been updated forcibly by ski.

SHA-1: 17d1520a2c8d3808c1ced59970b6366c230272e5

git

2014-08-22 16:32

administrator   ~0031039

Branch CR20716 has been updated by apn.

SHA-1: 61bb749a7e9e381abb203f39b4e8b372f9b2ed90


Detailed log of new commits:

Author: apn
Date: Fri Aug 22 16:32:26 2014 +0400

    Small corrections for mac os.

apn

2014-08-22 16:36

administrator   ~0031040

Branch CR20716 was successfully compiled on WNT, Debian60-64 and MacOS. Could you please review.

abv

2014-08-25 11:12

manager   ~0031058

One minor remark: please remove completely the commented out code in OSD_Disk.cxx.
Then, please check building on older Linux platforms (take one with lowest version of GCC).

git

2014-08-25 12:04

administrator   ~0031059

Branch CR20716 has been updated by ski.

SHA-1: e9334b31a1dc4f397d6b08645a9cb377f3873d63


Detailed log of new commits:

Author: ski
Date: Mon Aug 25 12:04:39 2014 +0400

    Unused code in file OSD_Disk.cxx was removed.

kgv

2014-08-25 12:28

developer   ~0031060

In samples\qt\IESample\IESample.pro
    DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL


Since HAVE_x_header_H staff is not used anymore - please remove these macros from samples (including Products branch).

git

2014-08-25 16:45

administrator   ~0031064

Branch CR20716 has been updated by ski.

SHA-1: cce1187fe30c830ce6c5569bdcb3de19eae6c5db


Detailed log of new commits:

Author: ski
Date: Mon Aug 25 16:45:14 2014 +0400

    Unused macros and includes were removed from samples and code.

git

2014-08-27 16:04

administrator   ~0031125

Branch CR20716 has been updated forcibly by ski.

SHA-1: 47be5558cd5e577393b2c79f913a5d0c8cee72f4

git

2014-08-28 11:10

administrator   ~0031136

Branch CR20716 has been updated by apn.

SHA-1: db6adb4abdcbaf85a432889a415846f5405b28cf


Detailed log of new commits:

Author: apn
Date: Thu Aug 28 11:10:29 2014 +0400

    Added necessary includes for MacOS.

git

2014-08-28 11:11

administrator   ~0031137

Branch CR20716 has been updated forcibly by apn.

SHA-1: be94e105a1edb0d5b62354e40af4275587ec4b75

apn

2014-08-28 11:14

administrator   ~0031138

Unused macros and includes were removed from samples and code.
Branch CR20716 was compiled on WNT, Debian60-64, MacOS and rebased on current state of master. Could you please review.

abv

2014-08-29 18:35

manager   ~0031203

No remarks, please test, including compilation in Debug mode and on older Linux versions.

git

2014-09-02 12:10

administrator   ~0031268

Branch CR20716 has been updated forcibly by mkv.

SHA-1: 5421ae386c4ed7b400650fbe859408bd7fe63d64

mkv

2014-09-03 14:33

tester   ~0031307

Dear BugMaster,
Branch CR20716 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
SHA-1: 5421ae386c4ed7b400650fbe859408bd7fe63d64

Number of compiler warnings:

occt component :
Linux: 16 (15 on master)
Windows: 0 (0 on master)

There is new additional compilation warning on Linux platform:
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR20716-master_build_occt_linux/1/warnings16Result/package.-165224203/
OSD_signal.cxx:42, GNU C Compiler 4 (gcc), Priority: Normal
‘pthread_t getOCCThread()’ defined but not used

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 353529232 / 353638312
Total CPU difference: 46208.89000000007 / 44814.86999999998
products component :
Total MEMORY difference: 110249976 / 109158944
Total CPU difference: 18657.12000000001 / 17204.64000000002

Testing on Windows:
occt component :
Total MEMORY difference: 241393012 / 241452652
Total CPU difference: 40336.71875 / 34905.625
products component :
Total MEMORY difference: 66514436 / 66471812
Total CPU difference: 11447.875 / 10985.390625

There are no differences in images found by testdiff.

git

2014-09-03 16:29

administrator   ~0031314

Branch CR20716 has been updated by apn.

SHA-1: b1ed8a8a5085927629254ddabcc22cd3f1b5aeb9


Detailed log of new commits:

Author: apn
Date: Wed Sep 3 16:28:58 2014 +0400

    Correct new additional compilation warning on Linux platform.

apn

2014-09-03 16:30

administrator   ~0031315

Corrections for compilation warning on Linux platform were pushed to CR20716.

ski

2014-09-03 16:31

developer   ~0031317

Reviewed. Please, test.

git

2014-09-04 10:24

administrator   ~0031338

Branch CR20716_1 has been created by kgv.

SHA-1: ba2731a3e528e193c4abc38b4957db70a913b22e


Detailed log of new commits:

Author: ski
Date: Thu Sep 4 10:23:50 2014 +0400

    0020716: Eliminate usage of config.h header file

kgv

2014-09-04 10:27

developer   ~0031339

Branch CR20716_1 contains squashed commits from CR20716.

mkv

2014-09-04 14:43

tester   ~0031365

Dear BugMaster,
Branch CR20716 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
SHA-1: b1ed8a8a5085927629254ddabcc22cd3f1b5aeb9

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 353365616 / 353627656
Total CPU difference: 47072.82999999993 / 44814.669999999984
products component :
Total MEMORY difference: 66532652 / 66471812
Total CPU difference: 11755.859375 / 10985.390625

Testing on Windows:
occt component :
Total MEMORY difference: 241311504 / 241460332
Total CPU difference: 32964.09375 / 34905.734375
products component :
Total MEMORY difference: 66532652 / 66471812
Total CPU difference: 11755.859375 / 10985.390625

There are no differences in images found by testdiff.

git

2014-09-05 10:30

administrator   ~0031400

Branch CR20716 has been updated by apn.

SHA-1: e7ee1f25ce8ca20030c24b078f4e9752ea0978c5


Detailed log of new commits:

Author: apn
Date: Fri Sep 5 10:30:06 2014 +0400

    Fix for error in OSD_Chronometer on Debian70/Fedora18

git

2014-09-08 15:50

administrator   ~0031447

Branch CR20716 has been deleted by inv.

SHA-1: e7ee1f25ce8ca20030c24b078f4e9752ea0978c5

git

2014-09-08 15:50

administrator   ~0031448

Branch CR20716_1 has been deleted by inv.

SHA-1: ba2731a3e528e193c4abc38b4957db70a913b22e

kgv

2014-09-10 15:21

developer   ~0031574

There are still two occurrences of HAVE_PTHREAD_H in OSD_signal.cxx which should be eliminated:
#if defined(HAVE_PTHREAD_H) && defined(NO_CXX_EXCEPTION)
if (pthread_self() != getOCCThread()  || !Standard_ErrorHandler::IsInTryBlock()) {

Related Changesets

occt: master 03155c18

2014-09-05 06:39:31

apn


Committer: bugmaster Details Diff
0020716: Eliminate usage of "config.h" header file

All inclusions of "config.h" were removed.

All places where macros defined by config.h were checked and removed

Small corrections for mac os.

Unused code in file OSD_Disk.cxx was removed.

Unused macros and includes were removed from samples and code.

Added necessary includes for MacOS.

Correct new additional compilation warning on Linux platform.

Fix for error in OSD_Chronometer on Debian70/Fedora18
Affected Issues
0020716
mod - CMakeLists.txt Diff File
mod - samples/qt/IESample/IESample.pro Diff File
mod - samples/qt/Tutorial/Tutorial.pro Diff File
mod - samples/qt/VoxelDemo/VoxelDemo.pro Diff File
mod - src/BRepTest/BRepTest_ChamferCommands.cxx Diff File
mod - src/BRepTest/BRepTest_CheckCommands.cxx Diff File
mod - src/BRepTest/BRepTest_FeatureCommands.cxx Diff File
mod - src/BRepTest/BRepTest_FilletCommands.cxx Diff File
mod - src/BRepTest/BRepTest_SurfaceCommands.cxx Diff File
mod - src/BRepTest/BRepTest_TopologyCommands.cxx Diff File
mod - src/DBRep/DBRep.cxx Diff File
mod - src/Draw/Draw.cxx Diff File
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/Draw/Draw_GraphicCommands.cxx Diff File
mod - src/Draw/Draw_Interpretor.cxx Diff File
mod - src/Draw/Draw_Main.cxx Diff File
mod - src/Draw/Draw_VariableCommands.cxx Diff File
mod - src/Draw/Draw_Window.cxx Diff File
mod - src/DrawTrSurf/DrawTrSurf.cxx Diff File
mod - src/DrawTrSurf/DrawTrSurf_Point.cxx Diff File
mod - src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.pxx Diff File
mod - src/Image/Image_AlienPixMap.cxx Diff File
mod - src/OpenGl/OpenGl_GraduatedTrihedron.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver_Export.cxx Diff File
mod - src/OpenGl/OpenGl_LineAttributes.cxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace_2.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace_5.cxx Diff File
mod - src/OSD/OSD.cxx Diff File
mod - src/OSD/OSD_Chronometer.cxx Diff File
mod - src/OSD/OSD_Directory.cxx Diff File
mod - src/OSD/OSD_DirectoryIterator.cxx Diff File
mod - src/OSD/OSD_Disk.cxx Diff File
mod - src/OSD/OSD_File.cxx Diff File
mod - src/OSD/OSD_FileIterator.cxx Diff File
mod - src/OSD/OSD_FileNode.cxx Diff File
mod - src/OSD/OSD_Host.cxx Diff File
mod - src/OSD/OSD_Path.cxx Diff File
mod - src/OSD/OSD_Process.cxx Diff File
mod - src/OSD/OSD_SharedLibrary.cxx Diff File
mod - src/OSD/OSD_signal.cxx Diff File
mod - src/OSD/OSD_Timer.cxx Diff File
mod - src/PCollection/PCollection_HAsciiString.cxx Diff File
mod - src/PCollection/PCollection_HExtendedString.cxx Diff File
mod - src/QABugs/QABugs_3.cxx Diff File
mod - src/Standard/Standard_CLocaleSentry.cxx Diff File
mod - src/Standard/Standard_ExtString.cxx Diff File
mod - src/Standard/Standard_Macro.hxx Diff File
mod - src/Standard/Standard_MMgrOpt.cxx Diff File
mod - src/Standard/Standard_Type.cxx Diff File
mod - src/Standard/Standard_values.h Diff File
mod - src/STEPConstruct/STEPConstruct_AP203Context.cxx Diff File
mod - src/StepFile/recfile.pc Diff File
mod - src/Storage/Storage_Schema.cxx Diff File
mod - src/TCollection/TCollection_BasicMap.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_BOOPCommands.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_HDSCommands.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_OtherCommands.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_VarsTopo.cxx Diff File
mod - src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx Diff File
mod - src/TestTopOpeDraw/TestTopOpeDraw_TTOT.cxx Diff File
mod - src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_traceALWL.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx Diff File
mod - src/Units/Units_UnitsDictionary.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_FilletCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_RelationCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2011-08-02 11:23 bugmaster Category OCCT:FDC => OCCT:Foundation Classes
2012-01-18 13:27 atp Fixed in Version EMPTY =>
2012-01-18 13:27 atp Description Updated
2014-05-03 07:32 abv Note Added: 0029179
2014-05-03 07:32 abv Assigned To bugmaster => kgv
2014-05-03 07:32 abv Status new => assigned
2014-05-03 07:32 abv Category OCCT:Foundation Classes => OCCT:Coding
2014-05-03 07:32 abv Target Version => 7.0.0
2014-08-21 10:54 abv Assigned To kgv => apn
2014-08-21 11:39 abv Note Added: 0030979
2014-08-21 11:39 abv Target Version 7.0.0 => 6.8.0
2014-08-21 13:02 git Note Added: 0030993
2014-08-22 10:42 git Note Added: 0031023
2014-08-22 10:47 git Note Added: 0031024
2014-08-22 13:12 git Note Added: 0031026
2014-08-22 16:32 git Note Added: 0031039
2014-08-22 16:36 apn Note Added: 0031040
2014-08-22 16:36 apn Test case number => Not needed
2014-08-22 16:36 apn Assigned To apn => abv
2014-08-22 16:36 apn Status assigned => resolved
2014-08-25 11:12 abv Note Added: 0031058
2014-08-25 11:12 abv Assigned To abv => ski
2014-08-25 11:12 abv Status resolved => assigned
2014-08-25 12:04 git Note Added: 0031059
2014-08-25 12:28 kgv Note Added: 0031060
2014-08-25 12:30 kgv Severity feature => integration request
2014-08-25 12:30 kgv Summary redefinition errors during useage of config,h => Eliminate usage of "config.h" header file
2014-08-25 12:31 kgv Relationship added related to 0022972
2014-08-25 16:45 git Note Added: 0031064
2014-08-27 16:04 git Note Added: 0031125
2014-08-28 11:10 git Note Added: 0031136
2014-08-28 11:11 git Note Added: 0031137
2014-08-28 11:14 apn Note Added: 0031138
2014-08-28 11:14 apn Assigned To ski => abv
2014-08-28 11:14 apn Status assigned => resolved
2014-08-29 18:35 abv Note Added: 0031203
2014-08-29 18:35 abv Assigned To abv => bugmaster
2014-08-29 18:35 abv Status resolved => reviewed
2014-09-02 10:48 mkv Assigned To bugmaster => mkv
2014-09-02 12:10 git Note Added: 0031268
2014-09-03 14:33 mkv Note Added: 0031307
2014-09-03 14:34 mkv Assigned To mkv => apn
2014-09-03 14:34 mkv Status reviewed => assigned
2014-09-03 16:29 git Note Added: 0031314
2014-09-03 16:30 apn Note Added: 0031315
2014-09-03 16:30 apn Assigned To apn => ski
2014-09-03 16:30 apn Status assigned => resolved
2014-09-03 16:31 ski Note Added: 0031317
2014-09-03 16:31 ski Assigned To ski => bugmaster
2014-09-03 16:31 ski Status resolved => reviewed
2014-09-03 16:52 mkv Assigned To bugmaster => mkv
2014-09-04 10:24 git Note Added: 0031338
2014-09-04 10:27 kgv Note Added: 0031339
2014-09-04 14:43 mkv Note Added: 0031365
2014-09-04 14:44 mkv Assigned To mkv => bugmaster
2014-09-04 14:44 mkv Status reviewed => tested
2014-09-05 10:30 git Note Added: 0031400
2014-09-05 14:09 bugmaster Changeset attached => occt master 03155c18
2014-09-05 14:09 bugmaster Status tested => verified
2014-09-05 14:09 bugmaster Resolution open => fixed
2014-09-08 15:50 git Note Added: 0031447
2014-09-08 15:50 git Note Added: 0031448
2014-09-10 15:21 kgv Note Added: 0031574
2014-11-11 12:45 aiv Fixed in Version => 6.8.0
2014-11-11 12:58 aiv Status verified => closed