cwalls251 / iphone-dev

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

/usr/lib/libc.dylib load command 7 unknown cmd field #153

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Trying to compile LLVM-GCC
make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn 

What is the expected output? What do you see instead?

/usr/local/bin/arm-apple-darwin-ld:
/usr/local/share/iphone-filesystem/usr/lib/libc.dylib load command 7
unknown cmd field
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.dylib] Error 1

What version of the product are you using? On what operating system?
I am using Ubuntu 8.04.
IPhone filesystem is 2.0

Please provide any additional information below.
I have tried this few times and getting same error again.
HEAVENLY and LLVMOBJDIR variables are properly set.
I am searching net since last 7-8 days but no solution till yet.
Please help me in resolving the issue.

Original issue reported on code.google.com by alien.0...@gmail.com on 4 Sep 2008 at 7:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ok. I was successful in building on both 64 bit and 32 bit systems with the
MacOSX10.5.sdk and MacOSX10.4u.sdk

Here is what you need to do:
1. Once you have checked out the iphone-dev  trunk repository using svn do the 
following:
$ pushd include

$ svn switch http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk

$ popd

$ pushd odcctools

$ svn switch http://iphone-dev.googlecode.com/svn/branches/odcctools-9.2-ld

$ popd

This will give you the updated odcctools and include directories that work 
correctly.

2. Once you get to the llvm-gcc-4.0-iphone compilation stage and are doing the 
make,
then you will see errors if you use MacOSX10.5.sdk. These errors do not come up 
if
you use MacOSX10.4u.sdk. hence if you use MacOSX10.5.sdk, you need to copy the
usr/sys/cdefs.h from MacOSX10.5.sdk and copy it as
/usr/local/arm-apple/darwin/include/sys/cdefs.h .

3. Next step is to patch lib1funcs.asm using the patch file lib1funcs.asm.diff
provided in issue 145, and patch the 
llvm-gcc-4.0-iphone/gcc/config/arm/lib1funcs.asm
file using the command
patch -p0 < lib1funcs.asm.diff

4. Then run the make command again and everything should build perfectly.

Original comment by walb...@gmail.com on 17 Sep 2008 at 3:06

GoogleCodeExporter commented 8 years ago
Ok. I did what you suggested but still getting errors . This time even in 
compilation of odctools
It looks very wierd. I checked Object.h in odcctools/include/foreign/objc
 directors and it doesnt look good. I have attached the file . Can you please look 
into that and see if its the same on your machine .

In file included from ../../../odcctools/include/foreign/objc/Protocol.h:31,
                 from ../../../odcctools/otool/print_objc.c:34:
../../../odcctools/include/foreign/objc/Object.h:52: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Object.h:52: error: expected ‘=’, 
‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘Object’
../../../odcctools/include/foreign/objc/Object.h:59: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:60: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:64: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:65: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:66: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:67: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:68: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:69: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:70: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:71: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:75: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:76: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:77: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:78: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:79: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:80: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:84: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:85: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:86: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:90: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:91: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:92: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:93: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:97: error: expected identifier 
or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:98: error: expected identifier 
or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:102: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:103: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:107: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:108: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:112: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:113: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:117: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:118: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:119: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:123: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:127: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:128: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:132: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:133: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:137: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:141: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:142: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:143: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:144: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:145: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:149: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:150: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:152: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Object.h:156: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Object.h:156: error: expected ‘=’, 
‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘interface’
../../../odcctools/include/foreign/objc/Object.h:159: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Object.h:161: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Object.h:165: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Object.h:165: error: expected ‘=’, 
‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘interface’
../../../odcctools/include/foreign/objc/Object.h:169: error: expected 
identifier or 
‘(’ before ‘+’ token
../../../odcctools/include/foreign/objc/Object.h:171: error: stray ‘@’ in 
program
In file included from ../../../odcctools/otool/print_objc.c:34:
../../../odcctools/include/foreign/objc/Protocol.h:35: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Protocol.h:35: error: expected ‘=’, 
‘,’, 
‘;’, ‘asm’ or ‘__attribute__’ before ‘interface’
../../../odcctools/include/foreign/objc/Protocol.h:37: error: stray ‘@’ in 
program
../../../odcctools/include/foreign/objc/Protocol.h:46: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Protocol.h:50: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Protocol.h:54: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Protocol.h:55: error: expected 
identifier or 
‘(’ before ‘-’ token
../../../odcctools/include/foreign/objc/Protocol.h:57: error: stray ‘@’ in 
program
In file included from ../../../odcctools/otool/print_objc.c:35:
../../../odcctools/include/stuff/allocate.h:29: error: expected ‘=’, 
‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘extern’
../../../odcctools/otool/print_objc.c:42: error: stray ‘@’ in program
../../../odcctools/otool/print_objc.c:42: error: expected 
specifier-qualifier-list 
before ‘defs’
../../../odcctools/otool/print_objc.c: In function ‘swap_objc_protocol’:
../../../odcctools/otool/print_objc.c:210: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:211: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:211: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:211: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:211: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:212: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:213: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:213: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:213: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:213: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:214: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:215: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:215: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:215: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:215: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:216: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:217: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:217: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:217: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:217: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:218: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c:219: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c:219: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c:219: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c:219: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c: At top level:
../../../odcctools/otool/print_objc.c:242: error: expected ‘)’ before 
‘*’ token
../../../odcctools/otool/print_objc.c: In function ‘print_objc_segment’:
../../../odcctools/otool/print_objc.c:487: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
../../../odcctools/otool/print_objc.c:810: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
../../../odcctools/otool/print_objc.c: In function 
‘print_objc_protocol_section’:
../../../odcctools/otool/print_objc.c:855: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
../../../odcctools/otool/print_objc.c: In function 
‘print_objc_string_object_section’:
../../../odcctools/otool/print_objc.c:909: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
../../../odcctools/otool/print_objc.c:936: warning: implicit declaration of 
function 
‘swap_string_object’
../../../odcctools/otool/print_objc.c:936: error: ‘NXConstantString’ 
undeclared 
(first use in this function)
../../../odcctools/otool/print_objc.c:936: error: (Each undeclared identifier 
is 
reported only once
../../../odcctools/otool/print_objc.c:936: error: for each function it appears 
in.)
../../../odcctools/otool/print_objc.c:936: error: expected expression before 
‘)’ 
token
../../../odcctools/otool/print_objc.c: In function ‘print_protocol_list’:
../../../odcctools/otool/print_objc.c:1527: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
../../../odcctools/otool/print_objc.c: In function ‘print_protocol’:
../../../odcctools/otool/print_objc.c:1553: error: ‘struct objc_protocol’ 
has no 
member named ‘isa’
../../../odcctools/otool/print_objc.c:1556: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:1558: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_name’
../../../odcctools/otool/print_objc.c:1569: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:1570: error: ‘struct objc_protocol’ 
has no 
member named ‘protocol_list’
../../../odcctools/otool/print_objc.c:1577: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:1578: error: ‘struct objc_protocol’ 
has no 
member named ‘instance_methods’
../../../odcctools/otool/print_objc.c:1585: error: ‘struct objc_protocol’ 
has no 
member named ‘class_methods’
../../../odcctools/otool/print_objc.c:1586:

Original comment by alien.0...@gmail.com on 18 Sep 2008 at 5:27

Attachments:

GoogleCodeExporter commented 8 years ago
Simple man, you do not have gcc-objc installed. These errors occur if you do 
not have
the objc libraries and headers and compilers installed on Ubuntu. Do an apt-get 
or
use Synaptic and install them and retry the make command and you should be fine.

Original comment by walb...@gmail.com on 18 Sep 2008 at 8:22

GoogleCodeExporter commented 8 years ago
Got  the same issue - gcc-objc are installed. I'm using Mandriva 2008

Original comment by dee...@gmail.com on 13 Nov 2008 at 1:25