[ITK Community] [Insight-developers] Stripping Libraries on OSX

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Mar 4 09:21:12 EST 2014


Thank you.

The build-time flag I was referring to was actually a linker option[1]:
-s
   Remove all symbol table and relocation information from the executable. 

When this option is passed to the ld linker in OSX the following warning occurs:
ld: warning: option -s is obsolete and being ignored


CMake does not natively support the packaging requirements for different languages. So I have not been able to use the install/strip targets generated by CMake or packaging you linked too.

Currently, I have a manual "dist" target for several languages to perform packaging[2], and not using the cpack infrastructure. I never heard any suggestions or examples on how to utilize cpack and cmake installation to help running a Python "setup.py" for packaging. For Java and CShap simple zips are generated, it wouldn't surprise me if cpack's components could be used for that. It may well worth the time to revisit these packaging issues.

Is there a macro/function to manually run the stripping in cmake? or does it only automatically happen on installation/packaging?

Brad


[1] http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
[2] https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/dist/CMakeLists.txt


On Mar 3, 2014, at 3:20 PM, Brad King <brad.king at kitware.com> wrote:

> On 03/03/2014 10:16 AM, Bradley Lowekamp wrote:
>> on OSX gcc/gcc-llvm/clang does not produce stripped libraries.
> 
> I can point to the CMake source where it adds install-time rules
> to strip binaries.  It skips stripping on OS X app bundles:
> 
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmInstallTargetGenerator.cxx;hb=v3.0.0-rc1#l734
> 
> but otherwise proceeds to strip executables and shared libraries.
> 
> I'm no familiar with build-time stripping though.
> 
> -Brad K
> 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers



More information about the Community mailing list