Having problems buidling the Toolchain in Leopard

Discussion in 'iOS Development' started by celebi23, Jan 12, 2008.

  1. celebi23

    celebi23 New Member

    Joined:
    Sep 15, 2007
    Messages:
    117
    Likes Received:
    0
    Device:
    iPod touch
    I tried the instructions listed in this topic http://www.ifans.com/forums/showthread.php?t=22493 on how to build the Toolchain in Leopard. I'm running Leopard on a MBP. Everytime I get to the "./configure --enable-optimized" stage for LLVM SVN, I get this message:

    "checking build system type... i686-apple-darwin9.1.0
    checking host system type... i686-apple-darwin9.1.0
    checking target system type... i686-apple-darwin9.1.0
    checking type of operating system we're going to host on... Darwin
    checking target architecture... x86
    checking for gcc... gcc
    checking for C compiler default output file name... configure: error: C compiler cannot create executables
    See `config.log' for more details. "

    Even if I get everything else set up, I always have errors trying to compile the HelloWorld app. I think that something is off with this stage & Leopard. Any help would be greatly appreciated

    Please Register or Log in to view images

    (Crap, could I get a title change to 'Having problems building the Toolchain in Leopard' ? Just saw the mistake just as it was posted)
  2. seventoes

    seventoes New Member

    Joined:
    Dec 28, 2007
    Messages:
    2
    Likes Received:
    0
    I'm having the same problem, apparently its a problem with xcode's installation of gcc, reinstalling the dev tools should fix it. I havent gotten around to it yet, if you get to it first tell me how it works.
  3. hockeycraze12000

    hockeycraze12000 New Member

    Joined:
    Dec 5, 2007
    Messages:
    557
    Likes Received:
    13
    just reinstall the dev tools
  4. celebi23

    celebi23 New Member

    Joined:
    Sep 15, 2007
    Messages:
    117
    Likes Received:
    0
    Device:
    iPod touch
    Ok, I'll reinstall the Dev Tools. Does it matter that I'm using the xcode_3.0.dmg file from Apple's Dev site? That's what I used to installed the Dev Tools before. Turns out I left my Leopard disc back at my dorm @ school & I'm on winter break for a bit & can't go back & get it now.
  5. celebi23

    celebi23 New Member

    Joined:
    Sep 15, 2007
    Messages:
    117
    Likes Received:
    0
    Device:
    iPod touch
    Ok, got the Toolchain built, I think. I followed the instructions from http://www.ifans.com/forums/showthread.php?t=22493 to a T. Came up with 2 errors though. 1 being at the end of the Toolchain building process
    Code:
    /usr/local/bin/arm-apple-darwin-ld: can't open: non-weak (No such file or directory, errno = 2)
    /usr/local/bin/arm-apple-darwin-ld: can't locate file for: -lc
    collect2: ld returned 1 exit status
    make[2]: *** [libgcc_s.dylib] Error 1
    make[1]: *** [stmp-multilib] Error 2
    make: *** [install-gcc] Error 2
    
    The second being when I tried to compile the HelloWorld app, from the HelloWorldSrc-0_30.zip file

    Code:
    (my name removed)s-MacBook-Pro-15:HelloWorld (my name removed)$ make
    /usr/local/bin/arm-apple-darwin-gcc -v -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -framework GraphicsServices -framework CoreSurface -lobjc -o Hello hello.o HelloApplication.o
    Using built-in specs.
    Target: arm-apple-darwin
    Configured with: ../../llvm-gcc-4.0-iphone/configure --enable-llvm=/Users/alexbrofsky/llvm-svn --enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin --enable-sjlj-exceptions --with-heavenly=/usr/local/share/iphone-filesystem --with-as=/usr/local/bin/arm-apple-darwin-as --with-ld=/usr/local/bin/arm-apple-darwin-ld
    Thread model: posix
    gcc version 4.0.1 (Apple Computer, Inc. build 5449)(LLVM build 2.0-svn-iphone-dev-0.3-svn)
     /usr/local/libexec/gcc/arm-apple-darwin/4.0.1/collect2 -dynamic -arch arm -macosx_version_min 10.5.1 -syslibroot /usr/local/share/iphone-filesystem -weak_reference_mismatches non-weak -o Hello -lcrt1.10.5.o -L/usr/local/lib/gcc/arm-apple-darwin/4.0.1 -L/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/lib -L/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../.. -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -framework GraphicsServices -framework CoreSurface -lobjc hello.o HelloApplication.o -lgcc_s.10.5 -lgcc -lSystem
    /usr/local/bin/arm-apple-darwin-ld: warning unknown -macosx_version_min parameter value: 10.5.1 ignored (using 10.1)
    /usr/local/bin/arm-apple-darwin-ld: can't locate file for: -lgcc_s.10.5
    collect2: ld returned 1 exit status
    make: *** [Hello] Error 1
    (my name removed)s-MacBook-Pro-15:HelloWorld (my name removed)$ 
    
    Any help would be greatly appreciated. Not sure what went wrong
  6. damhack

    damhack New Member

    Joined:
    Dec 12, 2007
    Messages:
    21
    Likes Received:
    0
    Hi,

    HelloWorld won't compile because your toolchain didn't compile properly.

    Your toolchain didn't compile possibly because of Step 13 problem with the configure line:

    a. make sure $HEAVENLY is definitely set to the location of the decrypted iPhone filesystem

    b. the quotes around llvm-config are backquotes, not single quotes or apostrophes (also check same for Step 5.)


    Best to clean up and recompile the toolchain.
  7. celebi23

    celebi23 New Member

    Joined:
    Sep 15, 2007
    Messages:
    117
    Likes Received:
    0
    Device:
    iPod touch
    Thanks. I copied everything word-for-word from the iphone_leopard_toolchain_howto.rtf document but, maybe I did miss the $HEAVENLY command. I'll try it again.
  8. curthard89

    curthard89 New Member

    Joined:
    Sep 15, 2007
    Messages:
    178
    Likes Received:
    1
    Device:
    iPhone 3GS (Black)
    i installed it all, how to i make xcode point to the right files etc? hmm

    Please Register or Log in to view images

  9. damhack

    damhack New Member

    Joined:
    Dec 12, 2007
    Messages:
    21
    Likes Received:
    0
  10. celebi23

    celebi23 New Member

    Joined:
    Sep 15, 2007
    Messages:
    117
    Likes Received:
    0
    Device:
    iPod touch
    Crap, not sure what's going wrong. Here's the complete Terminal output of the installing/building of the Toolchain. I removed any instance of my name for safety reasons/ general paranoia

    Please Register or Log in to view images

    Any example of my name was replaced with "(my name removed)".

    http://groups.google.com/group/iOffice/web/Toolchain install final.txt

    And here's the full Terminal output when I tried to compile & build the HelloWorld app

    http://groups.google.com/group/iOffice/web/HelloWorld compiling.txt

    I've read & reread those files in conjunction with the original instruction .rtf file you made & can't seem to figure out what I did wrong

    Please Register or Log in to view images

    This is the 3rd time I've tried builing the Toolchain & I keep getting the same results. Dam, if you could make sense of the output files & pinpoint where I'm making the error, that'd be amazing.

Share This Page