View Issue Details

IDProjectCategoryView StatusLast Update
0031614Open CASCADEOCCT:Configurationpublic2023-08-01 15:09
Reporterbugmaster Assigned Tobugmaster  
Status assignedResolutionopen 
Product Version7.5.0 
Target VersionUnscheduled 
Summary0031614: Configuration, CMake - eliminate CLang -Wl,-s deprecated warning
DescriptionNew warning on MacOS
ld: warning: option -s is obsolete and being ignored
TagsNo tags attached.
Test case number


child of 0031606 closedbugmaster Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles 
child of 0026247 closedbugmaster Configuration, CMake - strip symbols within Release configuration when using non-msvc 



2020-09-23 12:41

developer   ~0095233

Option -s has been marked as deprecated on macOS a long time ago and even not documented in "--help" output.
At the same time it still does work as expected, so that -s provides a cross-platform way for stripping symbols during build (on other platforms this option is not marked deprecated).

To eliminate the warning, we may update our CMake scripts to exclude -s during build and perform a dedicated step using a "strip" tool (CMAKE_STRIP).
The most reasonable place for this could be an installation step:

Just removing symbols is suboptimal solution - macOS provides a way to separate debug symbols from .dylib into dedicated file .dSYM (similar to .pdb file for .dll on Windows), so that installation might perform an extra step of .dSYM generation which would allow making ReleaseWithDebugInfo builds - a preferred building configuration for any application (.pdb/.dSYM files could be just not distributed with application, but could be used to reconstruct crash information):
dsymutil libTKernel.dylib -o libTKernel.dSYM
strip -S libTKernel.dylib

Using "strip" tool as alternative to "-s" flag could be considered for macOS/iOS-only solution (just to avoid a warning) or for other platforms as well (Linux, Android).
For this, it would be desired analyzing the difference between approaches (e.g. on file size).

Note that there stipping might be done for unneeded symbols or/and on debug symbols (the latter should appear only for -g builds).

Issue History

Date Modified Username Field Change
2020-06-17 13:41 bugmaster New Issue
2020-06-17 13:41 bugmaster Assigned To => kgv
2020-06-17 13:45 kgv Relationship added child of 0031606
2020-06-17 14:09 bugmaster Status new => assigned
2020-06-17 14:18 kgv Product Version => 7.5.0
2020-06-17 14:19 kgv Category OCCT:Coding => OCCT:Configuration
2020-06-17 14:19 kgv Summary Coding - New warnings after integration fix for 0031606 => Configuration, CMake - eliminate CLang -Wl,-s deprecated warning
2020-06-17 14:27 kgv Relationship added child of 0026247
2020-09-11 15:40 utverdov Target Version 7.5.0 => 7.6.0
2020-09-11 15:59 kgv Target Version 7.6.0 => 7.5.0
2020-09-23 12:41 kgv Note Added: 0095233
2020-09-23 12:41 kgv Assigned To kgv => bugmaster
2020-09-28 11:29 kgv Target Version 7.5.0 => 7.6.0
2021-09-03 14:13 bugmaster Target Version 7.6.0 => 7.7.0
2022-10-24 10:38 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled