MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027402Community[OCCT] OCCT:Configurationpublic2016-04-19 15:362016-12-09 16:37
ReporterBenjaminBihler 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformMinGwOSWindowsOS Version
Product Version 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027402: Configuration, CMake - fix compilation with MinGw and additional libraries
DescriptionCompilation fails with the following error message:

[ 46%] Linking CXX shared library ../../win64/gcc/bin/libTKOpenGl.dll
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Text.cxx.obj):OpenGl_Text.cxx:(.text+0x39b1): undefined reference to `gl2psTextOpt'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Workspace.cxx.obj):OpenGl_Workspace.cxx:(.text+0x2104): undefined reference to `gl2psPointSize'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Workspace.cxx.obj):OpenGl_Workspace.cxx:(.text+0x2ae6): undefined reference to `gl2psPointSize'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Workspace.cxx.obj):OpenGl_Workspace.cxx:(.text+0x2dd3): undefined reference to `gl2psPointSize'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Workspace.cxx.obj):OpenGl_Workspace.cxx:(.text+0x32d3): undefined reference to `gl2psPointSize'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_View.cxx.obj):OpenGl_View.cxx:(.text+0x4ea): undefined reference to `gl2psEndPage'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_View.cxx.obj):OpenGl_View.cxx:(.text+0x577): undefined reference to `gl2psBeginPage'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_View.cxx.obj):OpenGl_View.cxx:(.text+0x71a): undefined reference to `gl2psEndPage'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_View.cxx.obj):OpenGl_View.cxx:(.text+0x78c): undefined reference to `gl2psBeginPage'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Context.cxx.obj):OpenGl_Context.cxx:(.text+0xbc25): undefined reference to `gl2psDisable'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Context.cxx.obj):OpenGl_Context.cxx:(.text+0xbc36): undefined reference to `gl2psEnable'
CMakeFiles/TKOpenGl.dir/objects.a(OpenGl_Context.cxx.obj):OpenGl_Context.cxx:(.text+0x92f9): undefined reference to `gl2psLineWidth'
collect2.exe: error: ld returned 1 exit status
src/TKOpenGl/CMakeFiles/TKOpenGl.dir/build.make:1594: recipe for target `win64/gcc/bin/libTKOpenGl.dll' failed
make[2]: *** [win64/gcc/bin/libTKOpenGl.dll] Error 1
CMakeFiles/Makefile2:1326: recipe for target `src/TKOpenGl/CMakeFiles/TKOpenGl.dir/all' failed
make[1]: *** [src/TKOpenGl/CMakeFiles/TKOpenGl.dir/all] Error 2
Makefile:127: recipe for target `all' failed
make: *** [all] Error 2
TagsNo tags attached.
Test case number
Attached Filespng file icon gl2ps.png (14,449 bytes) 2016-04-25 10:52

- Relationships
related to 0027397closedbugmaster Offer Precompiled Additional Libraries for MinGW 

-  Notes
(0053464)
git (administrator)
2016-04-21 12:43

Branch CR27402 has been created by BenjaminBihler.

SHA-1: 1e96e056a54862e8f4f0c1131d1c45593390a16d


Detailed log of new commits:

Author: Benjamin Bihler
Date: Tue Apr 19 15:57:13 2016 +0200

    0027402: Fix Compilation with MinGw and Additional Libraries
    
    Added MinGw library suffix to a in 3rdparty_macro.cmake, freetype.cmake and tbb.cmake.

Author: Benjamin Bihler
Date: Tue Apr 19 15:03:03 2016 +0200

    0027402: Fix Compilation with MinGw and Additional Libraries
    
    Setting CSF_GL2PS in occt_csf.cmake in the same way as CSF_FREETYPE is set.
(0053492)
BenjaminBihler (developer)
2016-04-22 11:24

Kirill, my compilation troubles are solved. I have posted a performance comparison to the forum.

In my opinion CMake is doing a bad job by proposing "-O3" as the default release optimization parameter for g++. The binaries become larger, but the speed is almost the same. (I have not done comparisons on Linux, there "-O3" might indeed be better than "-O2".) Also other build tools like qmake set the default optimization parameter to "-O2".

What would be your opinion about adding a line to CMakeLists.txt that sets the default release optimization parameter to "-O2", if the compiler is MinGW? I could do that. If you agree, should I add a commit to this branch before setting it to "fixed" or should I create another issue?

Thanks for the answer!
(0053497)
kgv (developer)
2016-04-22 12:16

> What would be your opinion about adding a line to CMakeLists.txt that sets the default release optimization parameter to "-O2", if the compiler is MinGW?
> I could do that. If you agree, should I add a commit to this branch before setting it to "fixed" or should I create another issue?
I don't have much opinion about -O2/-O3 settings. The size might be increased due to greater inlining limits.

But anyway, this change would be unrelated to this bug and should be done in dedicated patch.

I switch the bug to resolved - as far as I understand current patch already solves the initial problem.
(0053498)
BenjaminBihler (developer)
2016-04-22 12:23

You are right, this is definitely because of the inlining. I will create another issue. Thank you.
(0053533)
ibs (developer)
2016-04-25 11:01

dear Benjamin,

I guess, the part of your fix is redundant for "non-android case". Could you see the attached screenshot please and share your thoughts?
(0053535)
git (administrator)
2016-04-25 11:20

Branch CR27402 has been updated by BenjaminBihler.

SHA-1: 4ac4abcd2c0a538c1aaef47833e8523b7c8131fa


Detailed log of new commits:

Author: Benjamin Bihler
Date: Mon Apr 25 10:20:10 2016 +0200

    0027402: Fix Compilation with MinGw and Additional Libraries
    
    Removed redundant CSF_GL2PS definition for non-Win32 configurations

(0053536)
BenjaminBihler (developer)
2016-04-25 11:20

ibs, you are right. The first set of inserts into the file within "if (WIN32)" is necessary, the second set of inserts is redundant. I have overlooked that the setting is already there.

I have fixed that.
(0053538)
ibs (developer)
2016-04-25 11:49

Thank you for your rapid answer :)
(0053539)
ibs (developer)
2016-04-25 11:50

dear bugmaster,
please integrate the fix
(0054205)
git (administrator)
2016-05-20 12:22

Branch CR27402 has been deleted by inv.

SHA-1: 4ac4abcd2c0a538c1aaef47833e8523b7c8131fa

- Related Changesets
occt: master eaffb01e
Timestamp: 2016-04-19 13:03:03
Author: BenjaminBihler
Committer: bugmaster
Details ] Diff ]
0027402: Fix Compilation with MinGw and Additional Libraries

Setting CSF_GL2PS in occt_csf.cmake in the same way as CSF_FREETYPE is set.

Added MinGw library suffix to a in 3rdparty_macro.cmake, freetype.cmake and tbb.cmake.

Removed redundant CSF_GL2PS definition for non-Win32 configurations
mod - adm/cmake/3rdparty_macro.cmake Diff ] File ]
mod - adm/cmake/freetype.cmake Diff ] File ]
mod - adm/cmake/occt_csf.cmake Diff ] File ]
mod - adm/cmake/tbb.cmake Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-04-19 15:36 BenjaminBihler New Issue
2016-04-19 15:36 BenjaminBihler Assigned To => BenjaminBihler
2016-04-19 15:37 BenjaminBihler Relationship added related to 0027397
2016-04-21 12:43 git Note Added: 0053464
2016-04-21 14:24 kgv Category OCCT:Application Framework => OCCT:Configuration
2016-04-21 14:24 kgv Summary Fix Compilation with MinGw and Additional Libraries => Configuration, CMake - fix compilation with MinGw and additional libraries
2016-04-22 11:24 BenjaminBihler Note Added: 0053492
2016-04-22 12:16 kgv Note Added: 0053497
2016-04-22 12:16 kgv Assigned To BenjaminBihler => ibs
2016-04-22 12:16 kgv Status new => resolved
2016-04-22 12:23 BenjaminBihler Note Added: 0053498
2016-04-25 10:52 ibs File Added: gl2ps.png
2016-04-25 11:01 ibs Note Added: 0053533
2016-04-25 11:01 ibs Assigned To ibs => BenjaminBihler
2016-04-25 11:01 ibs Status resolved => feedback
2016-04-25 11:20 git Note Added: 0053535
2016-04-25 11:20 BenjaminBihler Note Added: 0053536
2016-04-25 11:49 ibs Note Added: 0053538
2016-04-25 11:50 ibs Note Added: 0053539
2016-04-25 11:50 ibs Assigned To BenjaminBihler => bugmaster
2016-04-25 11:50 ibs Status feedback => reviewed
2016-04-29 16:10 bugmaster Changeset attached => occt master eaffb01e
2016-04-29 16:10 bugmaster Status reviewed => verified
2016-04-29 16:10 bugmaster Resolution open => fixed
2016-05-20 12:22 git Note Added: 0054205
2016-12-09 16:31 user533 Status verified => closed
2016-12-09 16:37 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker