Mac OS X build

2013-02-22
2013-03-19
  • Mark Clayton
    Mark Clayton
    2013-02-22

    I have a release build for Mac OS X. Get the dmg for testing from here:
    http://http://www.mark-clayton.com/pwsafe64.dmg

    Is there a better place to host this binary?

    Thanks,
    Mark Clayton

     
    • Peter McCurdy
      Peter McCurdy
      2013-03-02

      Hi, I gave it a try, but on my 10.6 installation it crashed when I tried to open a safe. The crash has the following error message:

      Dyld Error Message:
      Symbol not found: _wcsdup
      Referenced from: /Volumes/Password Safe 64/pwsafe64.app/Contents/MacOS/pwsafe64
      Expected in: /usr/lib/libSystem.B.dylib

      The only relevant reference to this particular error I could find was at https://groups.google.com/forum/?fromgroups=#!msg/wx-users/HhFsyo8MS7k/Qrvax1oRdukJ which suggests that you didn't target the 10.6 SDK and/or didn't have the 10.6 SDK installed when you built.

      I've got it building myself now, I can try to make a 10.6 version if you can't get it working on your side.

       
      • Mark Clayton
        Mark Clayton
        2013-03-03

        Peter,

        Here's a new binary to try out:
        http://mark-clayton.com/pwsafe-0.9.0.dmg
        Please let me know if it starts up.

        I got the 10.6 SDK like you suggested from the wx-users mailist post.
        But before I try that I want to try something else. I was reading a
        bunch of stuff and according to the Apple dev people, there are a
        couple of option that provide for backwards compatibility. It appears
        to me that the ideal setup is to use the latest SDK but use these
        options to specify a minimum OS X version to run on. The options are:
        -mmacosx-version-min
        MACOSX_DEPLOYMENT_TARGET
        The first is compiler switch and the second is a linker switch.
        Actually the second is an environment variable but it acts like a
        switch. They tell the compiler and linker that the application is not
        tightly bound to the system libraries at link time, but to check that
        symbol exists at runtime. The wxWidgets libraries are built for 10.5
        and up so that's what I picked here. I can still link against the 10.6
        SDK, but if this works it will allow 10.5 to run the app as well
        without having to patch an Xcode installation. There is still the risk
        that there is a system call used that doesn't exist in 10.5 or 10.6
        and so will still crash.

        Of course I'm relatively new to Mac development so I could be all wrong!

        Thanks, Mark

        --
        claytoncapers.blogspot.com
        www.mark-clayton.com

        On Sat, Mar 2, 2013 at 6:09 PM, Peter McCurdy cpirate@users.sf.net wrote:

        Hi, I gave it a try, but on my 10.6 installation it crashed when I tried to
        open a safe. The crash has the following error message:

        Dyld Error Message:
        Symbol not found: _wcsdup
        Referenced from: /Volumes/Password Safe
        64/pwsafe64.app/Contents/MacOS/pwsafe64
        Expected in: /usr/lib/libSystem.B.dylib

        The only relevant reference to this particular error I could find was at
        https://groups.google.com/forum/?fromgroups=#!msg/wx-users/HhFsyo8MS7k/Qrvax1oRdukJ
        which suggests that you didn't target the 10.6 SDK and/or didn't have the
        10.6 SDK installed when you built.

        I've got it building myself now, I can try to make a 10.6 version if you
        can't get it working on your side.

        Mac OS X build


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/passwordsafe/discussion/134800/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/prefs/

         
        • Peter McCurdy
          Peter McCurdy
          2013-03-10

          Sorry for the delay. Unfortunately, it still crashes, only with a different stack trace and error message this time:

          Exception Type: EXC_BAD_ACCESS (SIGSEGV)
          Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
          Crashed Thread: 0 Dispatch queue: com.apple.main-thread

          Thread 0 Crashed: Dispatch queue: com.apple.main-thread
          0 ??? 000000000000000000 0 + 0
          1 com.yourcompany.pwsafe64 0x000000010032cf7b wxEntry(int&, char**) + 11
          2 com.yourcompany.pwsafe64 0x000000010006d260 main + 20
          3 com.yourcompany.pwsafe64 0x0000000100001ca4 start + 52

          I haven't had the time to look into it any further than that, I'll let you know if I do find anything.

          Thanks. --Peter.

           
          • Mark Clayton
            Mark Clayton
            2013-03-14

            I thought I posted a reply too this but it's not here so here I
            go again!

            All week I've been trying to install Leopard and Snow Leopard in
            virtual boxes so I can see what you see. I'm not getting anywhere
            though.

            I'd be happy to help fix this issue though. Any suggestions?

            Mark

             
            • Peter McCurdy
              Peter McCurdy
              2013-03-19

              The only thing that looks similar on Google is this thread: http://wxpython-users.1045709.n5.nabble.com/invalid-memory-address-error-near-wxEntry-Start-and-or-libwx-baseu-td5716222.html but the solution there was to take the vanilla binary distributions of various things instead of using macports. That may or may not be feasible for you. Also it could be a red herring, since we're not using wxPython at all, and you've likely built wxWidgets yourself instead of using macports.

              If I get some time, I'll try to attack your binary with gdb and maybe get a hint about what's going wrong. Otherwise, beyond the broad heading of "binary version incompatibilities" we're kind of shooting in the dark.

               
  • Rony Shapiro
    Rony Shapiro
    2013-02-24

    Hi Mark,

    Let me know if you've made any changes to the source code for your build, or if the Mac build instructions needed modification. Based on your reply, I'll build a .dmg, sign it and upload to the pwsafe project files area.

    Thanks!

    Rony

     
  • Mark Clayton
    Mark Clayton
    2013-02-24

    Hi Rony,

    I didn't make any changes to the source code or build files and the build instructions worked fine too. The process of creating the dmg was kind of involved though. I used a couple of scripts I found on github: https://github.com/andreyvit/yoursway-create-dmg to create the image. The creat-dmg script needs patched before it will work because of a bug relating to using readlink. I created a directory under install called macosx_dmg required by the create-dmg script. I also created a background image (attached) to make the dmg image look like something a Mac user would like.

    I made a bash script to build the dmg, instead of modifying the Makefile. It consists of the following commands:

    test -f pwsafe.dmg && rm pwsafe.dmg
    cp LICENSE ./install/macosx_dmg/
    cp README.txt ./install/macosx_dmg/
    cp -R Xcode/build64/Release/pwsafe64.app ./install/macosx_dmg/
    ../yoursway-create-dmg/create-dmg \ --window-size 310 310 \ --background ./background.png \ --icon-size 40 \ --volname "Password Safe 64" \ --volicon ./src/ui/wxWidgets/graphics/pwsafe.icns \ --icon "pwsafe64.app" 100 95 \ --app-drop-link 220 95 \ --icon "LICENSE" 220 250 \ --icon "README.txt" 100 250 \ ./pwsafe64.dmg \ ./install/macosx_dmg/

    I'm sure there is a better location for the background image to live.

    I wanted to incorporate code to pull the version number from the build for use in the Info.plist and in the dmg file name. I ran out of time but I can look into adding this later. Can you suggest a good place to get the version number? version.in maybe?

    I hope this helps. I'm not sure how to incorporate all this into the existing build process. If you can give me some pointers, I'll put some time into it and give you patches for your review. Also, Does it make sense in the long run to absorb the important pieces of the yoursway-create-dmg scripts into a single script or Makefile directive?

    Thank you,
    Mark Clayton

     
    Attachments
  • Mark Clayton
    Mark Clayton
    2013-02-28

    Rony,

    Attached is a patch which is my first attempt at integrating the 'build dmg' steps into the existing build system.

    I added a directory under install called macosx. I this directory, I added a Makefile, a bash script, an apple script, the background image and a working directory.

    How does this look?

    Thanks,
    Mark

     
  • Rony Shapiro
    Rony Shapiro
    2013-02-28

    Thanks, will check it out soonest.
    Did you write both scripts? If so, I'd like to add the project's standard copyright notice on them (naming you as the author, of course). If not, please let me know where they're from, so that I can safely add them to the project repository.

    Rony

     
  • Mark Clayton
    Mark Clayton
    2013-02-28

    Thanks Rony,

    No, I didn't write them. I modified what I found at: https://github.com/andreyvit/yoursway-create-dmg
    The original scripts on this site don't have any copyright notice. Adium (GNU GPL) and Eclipse IDE (Eclipse Public License), among others, use essentially identical scripts without copyright headers too.
    Let me know how I can help out.

    Mark