• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -arch ppc works on Xcode 3.x, but not on 2.5.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -arch ppc works on Xcode 3.x, but not on 2.5.


  • Subject: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • From: David Springer <email@hidden>
  • Date: Tue, 20 Jan 2009 18:20:19 -0700

Well, my experiments with -syslibroot failed.  I compile the external libs on a 10.5/Xc3.1 system with these switches:

g++-4.0 -pipe -c -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -Wall -Wno-non-virtual-dtor -fno-strict-aliasing -Os -fno-default-inline -fno-exceptions   -o blah.o blah.cpp

and yet, I get the ppc7400 arch in my final lib.  These libs are built with makefiles, not Xcode, so I guess I am missing some magical incantation that causes the "real" 10.4 SDK to be used during compile/link?  Searching the archives isn't helping a great deal...

Any advice?

Thanks!
- Dave.S


On Tue, Jan 20, 2009 at 5:28 PM, David Springer <email@hidden> wrote:
Hi Jeff,

Answers inline:

On Tue, Jan 20, 2009 at 5:21 PM, Jeff Johnson <email@hidden> wrote:
Hi Dave.

A few questions:

1) When you say it must build under Xcode 2.5, do you mean Xcode 2.5 on 10.4 or 10.5 or both?

Build under Xc2.5 on 10.4, build under Xc2.5 on 10.4, build under Xc3.x on 10.5. 

2) Which OS versions is your product supposed to run on? 10.4 and 10.5? Just 10.5?
 Run on 10.4 and 10.5 

3) In your project, what is the Mac OS X deployment target, 10.4 or 10.5?
10.4 (uses the 10.4u SDK)
 

4) Is foo.dylib part of your project, or is that built separately?
It is built separately using makefiles (not Xcode).  Since getting Shawn's email, I noticed that foo.dylib was build with -isysroot /Developer/SDKs/MacOSX10.4u.sdk, but it was *not* linked with -syslibroot /D/S/10.4u.  I am trying that linker option now.

In short, if you use a 10.4 deployment target, then that requires and should produce a generic ppc executable that will run on any machines supported by 10.4, including G3 machines. If you use a 10.5 deployment target, on the other hand, it'll produce a ppc7400 executable that only runs on hardware supported by 10.5.

Aha.  I was unaware that ppc7400 would not work under 10.4

Thanks!!
- Dave.S


-Jeff



On Jan 20, 2009, at 6:00 PM, David Springer wrote:

Folks,

I have a project that needs to build under both Xcode 2.5 and 3.x.  Under 3.x, everything builds fine.  Under 2.5, I get a warning:

ld: warning fat file:/Users/me/blah/foo.dylib does not contain an architecture that matches the specified -arch flag: ppc (file ignored)

and then thousands of errors that symbols can't be found.

But:

% file /Users/me/blah/foo.dylib
foo.dylib: Mach-O universal binary with 2 architectures
foo.dylib (for architecture i386):      Mach-O dynamically linked shared library i386
foo.dylib (for architecture ppc7400):   Mach-O dynamically linked shared library ppc

And I double (triple) checked that the paths in the link line are all correct and that files really exist there.

Any ideas why this project builds/links fine under 3.x, but fails under 2.5?  BTW, when I build with just the ppc libs, the link works fine under both versions of Xcode.

Help?? Thanks!
- Dave.S




--
http://go/OnlyCheckEmailTwiceADay - join the movement





--
http://go/OnlyCheckEmailTwiceADay - join the movement


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: -arch ppc works on Xcode 3.x, but not on 2.5.
      • From: Jonas Maebe <email@hidden>
    • Re: -arch ppc works on Xcode 3.x, but not on 2.5.
      • From: Jeff Johnson <email@hidden>
References: 
 >-arch ppc works on Xcode 3.x, but not on 2.5. (From: David Springer <email@hidden>)
 >Re: -arch ppc works on Xcode 3.x, but not on 2.5. (From: Jeff Johnson <email@hidden>)
 >Re: -arch ppc works on Xcode 3.x, but not on 2.5. (From: David Springer <email@hidden>)

  • Prev by Date: Re: Xcode and iphone copy issue
  • Next by Date: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Previous by thread: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Next by thread: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Index(es):
    • Date
    • Thread