Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4103642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:59:04+00:00 2026-05-20T20:59:04+00:00

I followed these instructions on how to get the 10.4 SDK working with PPC

  • 0

I followed these instructions on how to get the 10.4 SDK working with PPC after upgrading to XCode 4. I am able to compile, but it errors out at link time.

As an added wrinkle, I’m not using XCode per se, but the gcc toolchain that comes with it. (This is part of a large cross-platform project that uses makefiles.)

Here’s a sample makefile:

CXX=g++-4.0
CXXFLAGS=-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4

helloworld: helloworld.o
    $(CXX) $^ -o $@ $(CXXFLAGS)

with a helloworld.cpp:

#include <stdio.h>

int main(void) {
    printf("hello world \n");
    return 0;
}

and here’s its output:

$ make
g++-4.0 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4   -c -o helloworld.o helloworld.cpp
g++-4.0 helloworld.o -o helloworld -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o, in section __TEXT,__text reloc 1: sectionForNum(4) section number not for any section for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/NK/NK2TdejFFfOupEszIr4fG++++TM/-Tmp-//ccryAbut.out (No such file or directory)
make: *** [helloworld] Error 1

btw, this exact makefile works fine on an XCode 3 system.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:59:05+00:00Added an answer on May 20, 2026 at 8:59 pm

    Since you are using the command line gcc (Unix Development Package), not the GCC of /Developer or /Xcode3 will be used, but the one of /usr, which I have not touched my original description. To restore PPC support to the command line GCC, you’ll have to do at least what jas pointed out in this answer. Or you to alter your Makefile to use the gcc from /Developer instead (I created your helloworld.cpp in the current working directory before executing those commands):

    $ /Developer/usr/bin/g++-4.0 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4   -c -o helloworld.o helloworld.cpp
    $ /Developer/usr/bin/g++-4.0 helloworld.o -o helloworld -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
    ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o
    ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /Xcode3/usr/bin/../lib/gcc/powerpc-apple-darwin10/4.0.1/crt3.o
    $ ./helloworld 
    hello world 
    

    You can safely ignore the two warnings. Unfortunately GCC 4.0 does not support the -mno-long-branch, which would be necessary to avoid long branches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed these instructions while trying to get remote debugging working with Delphi 2007.
I have followed these instructions exactly, yet I get a Page cannot be found
I mostly followed these instructions to get things spun up: http://lindsaar.net/2010/5/9/Getting-Rails-3-Edge-with-jQuery-RSpec-and-Cucumber-using-RVM If I create
I have followed these instructions at Balupton to the word but I cannot seem
I downloaded the .NET SDK for Payflow Gateway and followed these instructions on setting
I just followed these instructions to get pear installed on mac os x lion:
I have followed the instructions on this page to get started on ActionMailer. After
i followed these instructions for building an adhoc version in xcode 4.0 (4.3 compilier)
I followed the instructions from the google hellomapview tutorial. I get a working mapview
Documentation on MD5 in HSQLDB is somewhat scarce, but I have followed these instructions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.