Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Symbol stripping on OS X

    SDK Help
    0
    46
    36.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/09/2012 at 08:08, xxxxxxxx wrote:

      Originally posted by xxxxxxxx

      Here are some screen shots of my Xcode (3.2.6) configuration for DropToFloor.  Note that the plugin was originally built in an earlier version of Xcode.  But SolidChamfer 2.1 was just built in this version and it has the same configuration (and is purported to crash - which I did not experience).  I am on Mac OS 10.7.4, for the record.If you see what needs to be changed, please let me know. [...]

      The strip style is wrong. If you click on the strip style entry in the Xcode 3.2.6 build settings, it displays these explanations about the strip style (I'll write down the options, as this forum hosts no images) in the info part of the window (there 's a round "point" at the bottom of the build window that you can grab and open the info display, if you haven't yet) :

        
      Defines the level of symbol stripping to be performed on the linked product of the build. The default value is defined by the target's product type. [STRIP_STYLE]   
        
      All Symbols - Completely strips the binary, removing the symbol table and relocation information. [all, -s]   
      Non-Global Symbols - Strips non-global symbols, but saves external symbols. [non-global, -x]   
      Debugging Symbols - Strips debugging symbols, but saves local and global symbols. [debugging, -S]   
      

      With your setting "Debugging Symbols" you only strip the debugging symbols, but you leave ALL other symbols - esp. new/delete - in place.

      Choose "Non-Global Symbols" and then use the "nm" command (I showed you) to verify that no new/delete gets exported.

      The crash is quite hard to reproduce and understand (that 's why we couldn't track in down when we saw it in r13). It really just depends on timing and memory content, if the code crashes or not; e.g. one case I had on my machine: It works (using the same archive) on system A & system B, but when you start the program hosted on system A via network from machine B, it crashes - binaries are id., it's just the different timing and memory content in these cases that made the difference.

      Best regards,

      Wilfried

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 10/09/2012 at 02:31, xxxxxxxx wrote:

        Very good to know that, thanks Wilfried!

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 10/09/2012 at 15:33, xxxxxxxx wrote:

          I think I followed your instructions correctly, but the plugin is still hanging in R14. I'm still using Xcode 3 - do I have to update to Xcode 4? Will the plugin still work in R12 if I compile in XCode 4 using the R14 sdk project?

          nm outputs this:

            
          /Applications/MAXON/CINEMA 4D R12/plugins/PlaneSmart/PlaneSmart.dylib(single module) :   
                  U std::nothrow   
                  U ___cxa_atexit   
                  U ___cxa_pure_virtual   
                  U ___stack_chk_fail   
                  U ___stack_chk_guard   
          0000b260 T _c4d_main   
                  U _floor   
                  U _fmod   
                  U _free   
                  U _malloc   
                  U _memcpy   
                  U _memmove   
                  U _memset   
                  U _tan   
                  U _vsnprintf   
                  U dyld_stub_binder   
          
          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 10/09/2012 at 15:57, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            I think I followed your instructions correctly, but the plugin is still hanging in R14. I'm still using Xcode 3 - do I have to update to Xcode 4? Will the plugin still work in R12 if I compile in XCode 4 using the R14 sdk project?

            nm outputs this:
            [...]

            That looks pretty fine. Which Xcode 3 version did you use?

            Moving to XCode 4 and using the r14 sdk project makes the plugin run on r14 only - XCode 4.4 doesn't support OS X 10.5 (BaseSDK) anymore and it doesn't support PPC chips either.

            Best regards,

            Wilfried

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 11/09/2012 at 00:02, xxxxxxxx wrote:

              I have read some hacky stuff on the internet about copying the 10.5 SDK folder from earlier Xcode versions to the Xcode 4.4 folder. Will that work or is it an unstable/unreliable solution?

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 11/09/2012 at 00:12, xxxxxxxx wrote:

                TBH, for me the easiest solution was to install 3.2.6 and 4.4 on the same machine (running Lion) and then use 3.2.6 for all builds except the R14 one, when I use 4.4. It means that for each build I can use the cinema4dsdk project which is correct for each version of Cinema as the basis, ensuring that the correct settings are in place for each one.

                It's a bit less convenient since it means I now have to use two development environments on the Mac but it avoids missing important settings for one or other build.

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 11/09/2012 at 00:43, xxxxxxxx wrote:

                  I have a quite complete Plugin Collection and tested each single Plugin. In Total 372 Plugins.
                  I tested on a OSX 10.8.1 System with R14.025.
                  These are Plugins that make Cinema freeze or Crash on Startup:

                  Free Plugins (out of 238)
                  NoiseDeformer
                  SplineNoiseDeformer
                  UVDeformer
                  AdvancedAtomArray
                  ChamferMaker
                  GearBuilder
                  Reeper X 1.1
                  Sidewalk
                  smartoutline
                  UberTracer
                  wornEdges
                  MultiImporterV0.1b
                  TrueSymmetry
                  AlignToVector
                  AMa_1D_Snap
                  copypastepolys
                  PointCollapse
                  CD_AlignToCam
                  DropToFloor
                  DublicateObject
                  ground
                  HomePSR
                  SwitchObject
                  TransformTool
                  AIT
                  CD_HPBView
                  Oscillator
                  smarttween
                  TrainDriver
                  Random Select Tool
                  SplitSelection
                  AltRender_v0.37b
                  ColourTable
                  ManualKerning
                  Override Child Selection
                  RestartCinema
                  SceneDocumentor
                  smartsave
                  solo 1.2.0
                  Atmosphere
                  CamShader
                  CellularShader
                  Color Changer
                  PlaneSmart
                  RandomMaterial
                  SmartTexPath1_0
                  Starfield
                  ThingsOnSurfaceShader
                  TimeShiftShader

                  Komerzielle (out of 59) :

                  GeoTools2011
                  Greebler
                  ToothedWheelV2
                  Harvester
                  CD_Symmetry1.0
                  SolidChamfer2.0
                  SPLURF
                  DropIt Pro
                  SplineSPREAD
                  SurfaceSPREAD
                  enDOFin
                  Storm Tracer
                  camgriptoolsV2
                  CD_SpringyKeys1.0
                  Control4DPRO_v1.1.63
                  Unfurl
                  Cinapsis
                  stacx

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 11/09/2012 at 02:15, xxxxxxxx wrote:

                    It might be these are all plugins that have been compiled using a project file derived from the R12 cinema4dsdk.xcodeproj.

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 11/09/2012 at 04:15, xxxxxxxx wrote:

                      just to add:
                      we fixed our Blackstar plugins, so
                      SPLURF
                      enDOFin
                      Cinapsis
                      and all others now work fine with R14

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 11/09/2012 at 05:44, xxxxxxxx wrote:

                        Unfurl is build for R13 using the R13 cinema4dsdk project so it must be the default (either Maxon's project or Xcode's) symbol stripping type.  This entire thing is a bit unnerving since it would rarely show up (now it is epidemic) and one cannot really test for this.  So, I'll have to change the strip type setting, run that command, and hope that the crashes magically vanish (for 15 plugins).  Not my favorite way to spend my weekend. 😞

                        1 Reply Last reply Reply Quote 0
                        • H
                          Helper
                          last edited by

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 11/09/2012 at 05:48, xxxxxxxx wrote:

                          Originally posted by xxxxxxxx

                          I think I followed your instructions correctly, but the plugin is still hanging in R14. I'm still using Xcode 3 - do I have to update to Xcode 4? Will the plugin still work in R12 if I compile in XCode 4 using the R14 sdk project?

                          [...]

                          Follow-up FYI. Turns out a few things went wrong (mixed-up project & target settings in Xcode 3). Although your target settings modified the stripping (should have happened in the project settings) and nm did report just a few symbols, the size of your dylib (680 kb) was sus**cious - and there had been a few symbols used that are related to debugging (e.g. the stack_chk_guard symbol).

                          Dragging the dylib on a hexeditor shows, that the symbols & debug symbols are still there. Might be caused by the mixed-up project/target settings or by XCode 3.2 - we discovered today that removing global symbol from a final linked dylib based on the r12 sdk didn't work anymore in XCode 3.2.6 (while it did with XCode 3.1 that we used for building r12). Xcode doesn't even warn you about that; you've to look into the log output to discover it. More on that later - we're preparing a document about it...

                          I've set up your plugin project based on the r13 sdk and the size shrinked down to 111 kb, symbols are stripped and the crash on 10.8.1 is gone.

                          Best regards,

                          Wilfried

                          1 Reply Last reply Reply Quote 0
                          • H
                            Helper
                            last edited by

                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                            On 11/09/2012 at 07:26, xxxxxxxx wrote:

                            Howdy,

                            I noticed that my plugin CD Symmetry Tools is in the list of plugins causing a crash, but the deployment settings in my plugin's project show that I am using the "Non-Global Symbols" setting in the release version:

                            Since I don't really know much about the specific project settings, I simply copied the cinema4dsdk project, deleted the source, added my own source code and then changed the Product Name to my plugin's name.

                            Do I need to change something else?

                            Adios,
                            Cactus Dan
                            P.S. My plugins were compiled with the first R14.014 demo on a 32bit machine running Snow Leopard 10.6.8 and Xcode 4.2

                            1 Reply Last reply Reply Quote 0
                            • H
                              Helper
                              last edited by

                              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                              On 11/09/2012 at 07:50, xxxxxxxx wrote:

                              Hi Dan,

                              This is confusing me, too. Because you've got Strip Style set to non-global symbols for release, so they should be stripped, but under strip linked product for release it says 'no'. Does that mean the symbols are being stripped or not? Beats me, I sure don't know.

                              And it's worrying because I also used the sdk project as the basis for the compile on R14 (though it is the 14.025 version if that makes any difference).

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • H
                                Helper
                                last edited by

                                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                On 11/09/2012 at 07:58, xxxxxxxx wrote:

                                Originally posted by xxxxxxxx

                                Howdy,
                                I noticed that my plugin CD Symmetry Tools is in the list of plugins causing a crash, but the deployment settings in my plugin's project show that I am using the "Non-Global Symbols" setting in the release version:

                                Since I don't really know much about the specific project settings, I simply copied the cinema4dsdk project, deleted the source, added my own source code and then changed the Product Name to my plugin's name.
                                Do I need to change something else?
                                Adios,
                                Cactus Dan
                                P.S. My plugins were compiled with the first R14.014 demo on a 32bit machine running Snow Leopard 10.6.8 and Xcode 4.2

                                For the release build make sure stripping is enabled ("strip linked product -> Release: Yes"). Please check project and target settings for that.

                                Use the "nm <path> | c++filt -p -i" command to verify that new & delete symbols aren't exported.

                                Best regards,

                                Wilfried

                                1 Reply Last reply Reply Quote 0
                                • H
                                  Helper
                                  last edited by

                                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                  On 11/09/2012 at 08:02, xxxxxxxx wrote:

                                  Howdy,

                                  OK, I've just discovered something. Since I have several machines and always prefer to install updates on a separate machine first, I have the first R14.014 demo, the release version R14.014 and the updated R14.025 demo available and there are different settings for the "Strip Linked Product" parameter in the cinema4dsdk project:
                                  R14.014 demo:
                                  Debug = Yes
                                  Release = No

                                  R14.014 release:
                                  Debug = No
                                  Release = No

                                  R14.025 demo:
                                  Debug = Yes
                                  Release = Yes

                                  So, maybe the latest settings are correct?

                                  Adios,
                                  Cactus Dan

                                  1 Reply Last reply Reply Quote 0
                                  • H
                                    Helper
                                    last edited by

                                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                    On 11/09/2012 at 08:08, xxxxxxxx wrote:

                                    Howdy,

                                    Originally posted by xxxxxxxx

                                    ...For the release build make sure stripping is enabled ("strip linked product -> Release: Yes"). Please check project and target settings for that....

                                    AHA! So my assumption was correct that the latest version's settings are the ones to use. Thanks. 🙂

                                    Edit:
                                    Or should the Debug be set to No?

                                    Adios,
                                    Cactus Dan

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      Helper
                                      last edited by

                                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                      On 11/09/2012 at 08:17, xxxxxxxx wrote:

                                      Originally posted by xxxxxxxx

                                      Howdy,

                                      Originally posted by xxxxxxxx

                                      ...For the release build make sure stripping is enabled ("strip linked product -> Release: Yes"). Please check project and target settings for that....

                                      AHA! So my assumption was correct that the latest version's settings are the ones to use. Thanks. 🙂
                                      Edit:
                                      Or should the Debug be set to No?
                                      Adios,
                                      Cactus Dan

                                      You can change that, but I think the target settings for debug already do that (for you).

                                      Best regards,

                                      Wilfried

                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        Helper
                                        last edited by

                                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                        On 11/09/2012 at 08:38, xxxxxxxx wrote:

                                        Howdy,

                                        Originally posted by xxxxxxxx

                                        ...Use the "nm <path> | c++filt -p -i" command to verify that new & delete symbols aren't exported...

                                        When I use that, it gives me an error:

                                        -bash: nm: command not found
                                        

                                        Adios,
                                        Cactus Dan

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          Helper
                                          last edited by

                                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                          On 11/09/2012 at 08:52, xxxxxxxx wrote:

                                          Howdy,

                                          DOH! disregard that previous post. I was trying that through the network from a different machine. When I did that on the machine where I did the compile, it gave me this readout:

                                                           U std::nothrow
                                                           U ___bzero
                                                           U ___cxa_atexit
                                                           U ___stack_chk_fail
                                                           U ___stack_chk_guard
                                                           U _asin
                                          00000000000340e0 T _c4d_main
                                                           U _cos
                                                           U _free
                                                           U _malloc
                                                           U _memcpy
                                                           U _memset
                                                           U dyld_stub_binder
                                          

                                          Adios,
                                          Cactus Dan

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            Helper
                                            last edited by

                                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                                            On 11/09/2012 at 08:56, xxxxxxxx wrote:

                                            Originally posted by xxxxxxxx

                                            Howdy, DOH! disregard that previous post. I was trying that through the network from a different machine. When I did that on the machine where I did the compile, it gave me this [...]

                                            Was that a debug build, or have you manually changed some settings or do you use some external libs? The "stack_chk_guard" isn't supposed to be in a release build, at least not in our usual builds.

                                            nm needs installed devtools on the machine to work.

                                            Best regards,

                                            Wilfried

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post