Trying to build a universal binary...

  • Hi,

    I am trying to update my Cocoa Browser to a universal binary
    and seem to have run into a brick wall ;(

    I have set for my 'universal' build configuration ( in the get info
    dialog) the following values:

    Architectures              i386 ppc
    Base SDK Path              /Developer/SDKs/MacOSX10.4u.sdk
    Mac OS X Deployment Target  Mac OS X 10.4

    When I build the project, none of the object files are ever
    compiled with the '-arch ppc' flag and a thin intel binary is
    built...

    The external frameworks and libs are:
        Foundation, AppKit,WebKit, libssl.dylib
        QuickTime, Carbon, libcrypto, Cocoa and
        libjhlpq.a ( a fat archive containing libpq
        the postgresql c interface library).

    Can anyone tell me what the problem might be?

    Is there anyway to find out why no attempt is
    made to compile with the arch ppc flag?

    Thanks

    Jerry
  • On Feb 4, 2008, at 9:01 PM, Jerry LeVan wrote:
    > and seem to have run into a brick wall ;(
    >
    > I have set for my 'universal' build configuration ( in the get info
    > dialog) the following values:
    >
    > Architectures              i386 ppc
    > Base SDK Path              /Developer/SDKs/MacOSX10.4u.sdk
    > Mac OS X Deployment Target  Mac OS X 10.4
    >
    > When I build the project, none of the object files are ever
    > compiled with the '-arch ppc' flag and a thin intel binary is
    > built...
    >
    > The external frameworks and libs are:
    > Foundation, AppKit,WebKit, libssl.dylib
    > QuickTime, Carbon, libcrypto, Cocoa and
    > libjhlpq.a ( a fat archive containing libpq
    > the postgresql c interface library).
    >
    > Can anyone tell me what the problem might be?
    >
    > Is there anyway to find out why no attempt is
    > made to compile with the arch ppc flag?

    Ran into this myself today.  Double click the target and make sure
    that the Architectures setting isn't overridden there.  It probably
    is;  select it and hit backspace to delete the override and rely upon
    the project level architecture setting.

    b.bum
  • On Feb 4, 2008, at 21:01, Jerry LeVan wrote:

    > I have set for my 'universal' build configuration ( in the get info
    > dialog) the following values:
    >
    > Architectures              i386 ppc
    > Base SDK Path              /Developer/SDKs/MacOSX10.4u.sdk
    > Mac OS X Deployment Target  Mac OS X 10.4
    >
    > When I build the project, none of the object files are ever
    > compiled with the '-arch ppc' flag and a thin intel binary is
    > built...
    >
    > The external frameworks and libs are:
    > Foundation, AppKit,WebKit, libssl.dylib
    > QuickTime, Carbon, libcrypto, Cocoa and
    > libjhlpq.a ( a fat archive containing libpq
    > the postgresql c interface library).
    >
    > Can anyone tell me what the problem might be?

    Are you building Debug or Release? By default, Xcode sets up the
    project settings to architecture specific for Debug and universal for
    Release. This drove me crazy for a while because I didn't notice that
    setting the project window build mode to Debug doesn't necessarily
    cause the build settings to open with the Debug configuration displayed.
  • On Feb 5, 2008, at 12:09 AM, Bill Bumgarner wrote:

    > On Feb 4, 2008, at 9:01 PM, Jerry LeVan wrote:
    >> and seem to have run into a brick wall ;(
    >>
    >> I have set for my 'universal' build configuration ( in the get info
    >> dialog) the following values:
    >>
    >> Architectures              i386 ppc
    >> Base SDK Path              /Developer/SDKs/MacOSX10.4u.sdk
    >> Mac OS X Deployment Target  Mac OS X 10.4
    >>
    >> When I build the project, none of the object files are ever
    >> compiled with the '-arch ppc' flag and a thin intel binary is
    >> built...
    >>
    >> The external frameworks and libs are:
    >> Foundation, AppKit,WebKit, libssl.dylib
    >> QuickTime, Carbon, libcrypto, Cocoa and
    >> libjhlpq.a ( a fat archive containing libpq
    >> the postgresql c interface library).
    >>
    >> Can anyone tell me what the problem might be?
    >>
    >> Is there anyway to find out why no attempt is
    >> made to compile with the arch ppc flag?
    >
    > Ran into this myself today.  Double click the target and make sure
    > that the Architectures setting isn't overridden there.  It probably
    > is;  select it and hit backspace to delete the override and rely
    > upon the project level architecture setting.
    >
    > b.bum
    >

    Apparently over the years my project file had become corrupt (at least
    that
    is the theory).

    So... I spent the morning trying to recreate the project.

    I started with a new project and started to add all of the source
    files from the
    old project. I also copied the nib files...trying to recreate the nibs
    would have
    been a disaster.

    After a bit of trial and error ( I had some redundant files in the
    project and
    had to figure out which were the current rascals) the project finally
    was
    able to build.

    I was able to create a Universal Binary that runs on my intel box
    running Leopard and
    my wife's ppc box that is running the latest version of Panther.

    Whew!

    Jerry