dlopen error

  • A user is reporting an error when dlopen tries to load my plugin in iTunes. I've not seen it in my own testing.

    5/20/12 12:29:57 AM iTunes[22591] Error loading <path/to/plugin>:  dlopen(<path/to/plugin>, 262): no suitable image found.  Did find:
    <path/to/plugin>: unknown required load command 0x80000022

    Googling on this error seems to suggest it's a dynamic linking error problem, where the plugin links to something not available on the OS. So looking at my build, I'm targetting a minimum OS of 10.5, using the 10.6 SDK, and it's a universal 32/64-bit build for Intel only. Apart from Cocoa I link to QuartzCore and OpenGL frameworks. I have tested on 10.6 and 10.7 but no longer have a 10.5 system to test on, so it's hard to pin this one down. Any ideas how I can identify the source of the issue?

    --Graham
  • On May 20, 2012, at 6:25 PM, Graham Cox wrote:

    > A user is reporting an error when dlopen tries to load my plugin in iTunes. I've not seen it in my own testing.
    >
    > 5/20/12 12:29:57 AM iTunes[22591] Error loading <path/to/plugin>:  dlopen(<path/to/plugin>, 262): no suitable image found.  Did find:
    > <path/to/plugin>: unknown required load command 0x80000022
    >
    > Googling on this error seems to suggest it's a dynamic linking error problem, where the plugin links to something not available on the OS. So looking at my build, I'm targetting a minimum OS of 10.5, using the 10.6 SDK, and it's a universal 32/64-bit build for Intel only.

    It seems that the deployment target is not in effect during the link step.

    The error is because the linker has used newer features in the binary than the 10.5 dynamic loader understands.  One of the purposes of the deployment target setting is to tell it to not do that.

    What is the link command?

    Regards,
    Ken
  • OK, following that line, I checked again. My Target settings were overriding the Project build settings and there the minimum OS was 10.6. I've changed that to 10.5 and have asked the user to give it another try. I'm not sure why Xcode (4) inserts a whole extra level of settings when the first level is fine, then doesn't give you a way to remove the second level of settings....

    Anyway, thanks for the hint. If that doesn't fix it, I'll be back!

    --Graham

    On 21/05/2012, at 2:46 PM, Ken Thomases wrote:

    > On May 20, 2012, at 6:25 PM, Graham Cox wrote:
    >
    >> A user is reporting an error when dlopen tries to load my plugin in iTunes. I've not seen it in my own testing.
    >>
    >> 5/20/12 12:29:57 AM iTunes[22591] Error loading <path/to/plugin>:  dlopen(<path/to/plugin>, 262): no suitable image found.  Did find:
    >> <path/to/plugin>: unknown required load command 0x80000022
    >>
    >> Googling on this error seems to suggest it's a dynamic linking error problem, where the plugin links to something not available on the OS. So looking at my build, I'm targetting a minimum OS of 10.5, using the 10.6 SDK, and it's a universal 32/64-bit build for Intel only.
    >
    > It seems that the deployment target is not in effect during the link step.
    >
    > The error is because the linker has used newer features in the binary than the 10.5 dynamic loader understands.  One of the purposes of the deployment target setting is to tell it to not do that.
    >
    > What is the link command?
    >
    > Regards,
    > Ken
    >
  • On May 20, 2012, at 22:43 , Graham Cox wrote:

    > I'm not sure why Xcode (4) inserts a whole extra level of settings when the first level is fine, then doesn't give you a way to remove the second level of settings

    But it does … the Delete key.

    Well, that does it for individual settings. I can't imagine you're intending to delete the entire target level of settings, since a number of them are desirably different from the project level.
  • On May 21, 2012, at 2:53 PM, Quincey Morris wrote:

    > On May 20, 2012, at 22:43 , Graham Cox wrote:
    >
    >> I'm not sure why Xcode (4) inserts a whole extra level of settings when the first level is fine, then doesn't give you a way to remove the second level of settings
    >
    > But it does … the Delete key.
    >

    I have serious trouble making that work. I've tried delete. I've triedselecting other.. and remove text followed by Return. Tried Command-Delete .. the damnable settings just stick there. I don't know if I'm a total idiot and missing something really simple but I can rarely get rid of one. I'm careful that I'm in project mode when trying to remove project settings and in target mode when trying to remove target ones, I can sometimes, sometimes remove a target one, I never seem to be able to remove a project one once set and I've never figured out why I occasionally succeed. I've read the help and watched the help video and I'm none the wiser.

    The two levels are pretty useful when you have projects like I do with several targets. You can set overall settings for the whole thing, and then change a few at the target level (like SKIP_INSTALL for static libraries).
  • On May 21, 2012, at 00:20 , Roland King wrote:

    > I have serious trouble making that work. I've tried delete. I've triedselecting other.. and remove text followed by Return. Tried Command-Delete .. the damnable settings just stick there.

    Here are all the steps I use, and it really does work for me, all the time:

    1. Make sure "Levels" is selected, and not "Combined", in the scope bar above the build settings.

    2. If you want to delete target-level settings, make sure the target is selected in the list to the left. (If you want to delete project-level settings, make sure the project is selected.)

    3. With the target selected in the list, the only settings you can delete are those that are explicitly set for that target, which are those shaded green. Note that (with the target selected in the list), project-level settings are also shaded green but you can't delete them now.

    4. Select the row whose setting you want to delete at the target level. I find that, annoyingly, I'm tempted to click on the target's green-shaded thing, which makes it pop up or start editing, which is NOT what I want. Best strategy is to learn to click on the setting name at the left.

    5. Press Delete. The target-level green shading should disappear, indicating that the project-level or default settings are in effect again.

    The only time this has ever failed me is that there used to be just one misreported setting which would get green-shaded at the project level (and appear to be deletable at that level), but which was really and secretly at a default value. Needless to say, this was a bit confusing, but AFAIK it's been fixed since a couple of Xcode releases ago.

    One of the problems, of course, is that build setting changes are not undoable, so experimentation/practicing is incidentally discouraged. :)
  • This has gone into my Mac Keepers folder, thank you so much Quincey, for the second time in a week.

    I never, ever, thought of clicking on the bold label at the left of the row, I always clicked the green shaded box. That way madness lies, or at least disappointment. I can confirm that clicking there and hitting delete does exactly what you said, it works, I have now cleaned up the project I got in a super mess one day I had the shakes and kept missing the lines I wanted, absolutely super.

    It is actually possible, by the way, to get 5 levels of config in there. If, on the Info screen for the project, you set configurations at the project and target level (configurations are just text files with lots of GCC_xxx=yyy in them or the equivalent for LLDB) the levels will be iOS Default -> Config file for project -> Project on-screen settings -> Config file for target -> Target on-screen settings. If you actually do that you probably deserve the madness which will ensue, but I thought I'd mention it.

    On May 21, 2012, at 3:53 PM, Quincey Morris wrote:

    > On May 21, 2012, at 00:20 , Roland King wrote:
    >
    >> I have serious trouble making that work. I've tried delete. I've triedselecting other.. and remove text followed by Return. Tried Command-Delete .. the damnable settings just stick there.
    >
    > Here are all the steps I use, and it really does work for me, all the time:
    >
    > 1. Make sure "Levels" is selected, and not "Combined", in the scope bar above the build settings.
    >
    > 2. If you want to delete target-level settings, make sure the target is selected in the list to the left. (If you want to delete project-level settings, make sure the project is selected.)
    >
    > 3. With the target selected in the list, the only settings you can delete are those that are explicitly set for that target, which are those shaded green. Note that (with the target selected in the list), project-level settings are also shaded green but you can't delete them now.
    >
    > 4. Select the row whose setting you want to delete at the target level. I find that, annoyingly, I'm tempted to click on the target's green-shaded thing, which makes it pop up or start editing, which is NOT what I want. Best strategy is to learn to click on the setting name at the left.
    >
    > 5. Press Delete. The target-level green shading should disappear, indicating that the project-level or default settings are in effect again.
    >
    > The only time this has ever failed me is that there used to be just one misreported setting which would get green-shaded at the project level (and appear to be deletable at that level), but which was really and secretly at a default value. Needless to say, this was a bit confusing, but AFAIK it's been fixed since a couple of Xcode releases ago.
    >
    > One of the problems, of course, is that build setting changes are not undoable, so experimentation/practicing is incidentally discouraged. :)
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today