bant4u / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
0 stars 0 forks source link

link libobjc.dylib failed #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build the toolchain and try to compile hello world
2.
3.

What is the expected output? What do you see instead?
compiled hello world,

arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework 
Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -o 
helloWorld main.o he
lloWorld.o
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libobjc.dylib truncated or malformed object 
(mach header extends past the end
 of the file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libSystem.dylib truncated or malformed object 
(mach header extends past the e
nd of the file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libz.1.dylib truncated or malformed object (mach 
header extends past the end
of the file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libstdc++.6.dylib truncated or malformed object 
(mach header extends past the
 end of the file)
collect2: ld returned 1 exit status
make: *** [helloWorld] Error 1

What version of the product are you using? On what operating system?

uname -a CYGWIN_NT-5.1 IBM-83A65901F1A 1.5.25(0.156/4/2) 2007-12-14 19:21 
i686 Cygwin

Please provide any additional information below.
 I got helloworld.zip and followed the 
http://wiki.iphonegameover.com/Hello_World_Tutorial

I unpacked,decrypted and put firmware1.1.1(1.0.2) under /usr/local/arm-
apple-darwin/filesystem/

Original issue reported on code.google.com by frank.go...@gmail.com on 3 Mar 2008 at 5:28

GoogleCodeExporter commented 9 years ago
I unpacked and decrypted firmware1.0.2 under Leopard, I get the following 
errors:
arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework Foundation -
framework UIKit -framework LayerKit -framework CoreGraphics -o helloWorld 
main.o he
lloWorld.o
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libobjc.dylib bad magic number (not a Mach-O file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libSystem.dylib bad magic number (not a Mach-O file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libz.1.dylib bad magic number (not a Mach-O file)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/arm-apple-
darwin/filesystem/usr/lib/libstdc++.6.dylib bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
make: *** [helloWorld] Error 1

Original comment by frank.go...@gmail.com on 3 Mar 2008 at 11:35

GoogleCodeExporter commented 9 years ago
solved -- I download the system files from iPhone.

Original comment by frank.go...@gmail.com on 4 Mar 2008 at 3:25

GoogleCodeExporter commented 9 years ago
Awesome. I'm closing this bug then.

Original comment by saurik on 11 Mar 2008 at 9:04

GoogleCodeExporter commented 9 years ago
How was this issue resolved.  I am getting a similar error.

bgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_
tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_
s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/.
/_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o li
bgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.
o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_bswapsi2_s.o libgcc/./_bsw
apdi2_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixunssfdi_s.
o libgcc/./_fixdfdi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixxfdi_s.o libgcc/./
_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_floatundixf_s.o libgcc/./_fixt
fdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_floatunditf_s
.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umo
ddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_
s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc/./unwind-sjlj_s.o libgcc/./unwind-
c_s.o -lc
/usr/local/bin/arm-apple-darwin9-ld: 
/usr/local/iphone-sysroot/usr/lib/libc.dylib
truncated or malformed object (mach header extends past the end of the file)
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.dylib] Error 1
make[3]: Leaving directory
`/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/build/gcc-4.2-iphone/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone'
make: *** [install] Error 2

Original comment by berlin.b...@gmail.com on 3 Sep 2009 at 12:46