[Resolved] Mac Build machine (10.5) - needs to produce app that runs on 10.5, 10.6 and 10.7



  • I'm building a QT (4.7.4) MacOSX application on a 10.5 build machine. The application should run on 10.5, 10.6 and 10.7

    My symptoms are: the app runs nicely on the 10.5 machine it was built on but will not even launch on 10.7, not even as much as an error message. The system logs however show:

    @Feb 14 11:55:12 Ron-MAC com.apple.launchd.peruser.501[139] ([0x0-0x502502].com.MyCompany.MyApp[40719]): posix_spawn("/Users/user/Desktop/MyApp.app/Contents/MacOS/MyApp", ...): Permission denied
    Feb 14 11:55:12 Ron-MAC com.apple.launchd.peruser.501[139] ([0x0-0x502502].com.MyCompany.MyApp[40719]): Exited with code: 1
    Feb 14 11:55:22 Ron-MAC bootpd[102]: service time 0.000011 seconds@

    One of my guesses is that the build machine uses 10.5 SDK which does not exist on 10.7. I need therefore to build my project with SDK 10.6 - how can I configure my .Pro file to use a base SDK 10.6 so that an app built on a 10.5 machine can run on 10.5, 10.6 and 10.7?



  • The log that you have posted contains the error "Permission denied". May be your user does not have enough permissions to execute it. What are the file permissions of your app? Try to change them to 777.



  • Doesn't help: trying to run the app from the GUI simply doesn't respond (as if it quits immediately). Running it form command line shows this:

    @LSOpenURLsWithRole() failed with error -10810 for the file /Users/user/Desktop/MyApp.app.@



  • [quote author="ronM71" date="1329241467"]Doesn't help: trying to run the app from the GUI simply doesn't respond (as if it quits immediately). Running it form command line shows this:

    @LSOpenURLsWithRole() failed with error -10810 for the file /Users/user/Desktop/MyApp.app.@
    [/quote]

    This is still a problem with the permissions. Execute the following command at the terminal and try to run it again. It seems to be a minor frequent problem for Mac OS X because other "apps have the same issue":http://qtadb.wordpress.com/faq/.

    @chmod a+x /Users/user/Desktop/MyApp.app@



  • Doing this on the App alone did not work.

    However!

    When I applied the same chmod to the contents of the bundle, namely, to the executable file inside "MacOS", it started to work. Thanks for your help.



  • [quote author="ronM71" date="1329242318"]When I applied the same chmod to the contents of the bundle, namely, to the executable file inside "MacOS", it started to work. Thanks for your help.[/quote]

    It was my pleasure. Recently I had similar issues with permissions on iOS :)



  • I just wonder why those missing permissions haven't stopped the app from executing under the 10.5 machine it was built on...



  • [quote author="ronM71" date="1329250675"]I just wonder why those missing permissions haven't stopped the app from executing under the 10.5 machine it was built on... [/quote]

    It could be that the executable bit of the permissions was removed during the copy process.



  • so, in theory, If I were to create a *.dmg file with the application, as it is, right there on the build machine, and copy the DMG file over to someplace else, upon clicking the DMG, i'd have the *.app file remain as is with the executable bit still on?



  • Yes. At least that's what I do all the time. Nowadays on a 10.6 snow leo box, but before I used a 10.5 leo machine.

    I create the DMG from the command line:

    @
    hdiutil create -srcfolder /path/to/your/program.app -format UDBZ -quiet program.dmg
    @

    This creates a compressed disk image, that results in smaller file size.



  • Thanks Volker


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.