pereraa / iphone-dev

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

has no member named ‘n_name’ #178

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I ended up in taking this guide;
http://wikee.iphwn.org/howto:toolchain_on_leopard_aspen
2. after this failed: /mnt/dv/itouch/bin/arm-apple-darwin-ld:
/mnt/dv/itouch/filesystem/usr/lib/libc.dylib load command 7 unknown cmd field
 (Linux)
3. Getting this error:
gcc -Wall -Wno-import  -DHAVE_CONFIG_H -D__LITTLE_ENDIAN__=1 -DNeXT_MOD
-DPPC  -I. -I../../../../odcctools/as/ppc/.. -I../../include
-I../../../../odcctools/include -include
../../../../odcctools/include/extern.h
-I../../../../odcctools/include/foreign -g -O2 -fno-builtin-round
-fno-builtin-trunc   -c -o expr.o ../../../../odcctools/as/ppc/../expr.c
../../../../odcctools/as/ppc/../expr.c: In functie ‘expression’:
../../../../odcctools/as/ppc/../expr.c:307: fout: ‘union <anonymous>’ has
no member named ‘n_name’
../../../../odcctools/as/ppc/../expr.c: In functie ‘expr’:
../../../../odcctools/as/ppc/../expr.c:479: fout: ‘union <anonymous>’ has
no member named ‘n_name’
../../../../odcctools/as/ppc/../expr.c:480: fout: ‘union <anonymous>’ has
no member named ‘n_name’
../../../../odcctools/as/ppc/../expr.c: In functie ‘operand’:
../../../../odcctools/as/ppc/../expr.c:853: let op: format ‘%lld’ expects
type ‘long long int’, but argument 2 has type ‘signed_expr_t’
../../../../odcctools/as/ppc/../expr.c: In functie ‘expr_part’:
../../../../odcctools/as/ppc/../expr.c:1217: fout: ‘union <anonymous>’ has
no member named ‘n_name’
../../../../odcctools/as/ppc/../expr.c:1218: fout: ‘union <anonymous>’ has
no member named ‘n_name’

What is the expected output? What do you see instead?
I hoped it would joyfully compile.

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

Please provide any additional information below.
It seems it is about the LP64 that for some reason is defined, but removes
the n_name field from the structure.

Original issue reported on code.google.com by ste...@konink.de on 2 May 2009 at 4:13

GoogleCodeExporter commented 8 years ago
you can remove the #ifndef and then go on compiling

Original comment by TinnyXia on 13 May 2009 at 2:13

GoogleCodeExporter commented 8 years ago
hi, I have also this problem.

Can you give suggestion ?

Original comment by modii...@gmail.com on 7 Oct 2009 at 12:42

GoogleCodeExporter commented 8 years ago
I see also same type problem in following files:

../../odcctools-9.2-ld/as/ppc/../layout.c
../../odcctools-9.2-ld/as/ppc/../read.c
../../odcctools-9.2-ld/as/ppc/../symbols.c
../../odcctools-9.2-ld/as/ppc/../write_object.c

so anybody give suggestion to resolve this problem ?

I'm using :
- gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
- Ubuntu 9.04 the Jaunty Jackalope - released in April 2009.
- odcctools-9.2-ld from http://iphone-dev.googlecode.com/svn/branches/

Thanks in Advance!

Original comment by modii...@gmail.com on 7 Oct 2009 at 1:19

GoogleCodeExporter commented 8 years ago
I had this problem on snow leopard.

I fixed it by replacing the following line (6608) in my configure file:

DEFS=-DHAVE_CONFIG_H

with this one:

DEFS="-DHAVE_CONFIG_H -DARCH64"

And re-configuring.  You can also do it by manually going to all your make 
files and
replacing

DEFS = -DHAVE_CONFIG_H

with this:

DEFS = -DHAVE_CONFIG_H -DARCH64

The issue is that the nlist struct has an unamed union in it in 32 bit with 
multiple
things inside, but in 64 bit code there is only one thing in the union (not 
much of a
union at that point btw).  

The code knows this and has #ifdefs all over the place to interact with it in a 
64
bit or non-64 bit mode, but the generated makefiles aren't smart enough to 
notice
this and define ARCH64 on snow leopard ( and presumably your respective 64 bit 
OSes )

Original comment by saikenT...@gmail.com on 15 Feb 2010 at 4:16

GoogleCodeExporter commented 8 years ago
Yeah, the problem is the same with Ubuntu 10.04.3 LTS x86_64 with gcc version 
4.4.3. The build I ran today (12/05/25) did pretty good with the following 
change to configure: 

--- configure   (revision 287)
+++ configure   (working copy)
@@ -6162,7 +6162,8 @@
 }'
 fi

-DEFS=-DHAVE_CONFIG_H
+test `uname -m` = x86_64 && def64=-DARCH64
+DEFS="-DHAVE_CONFIG_H $def64"

 ac_libobjs=
 ac_ltlibobjs=

but still fails bulding libstuff with : 

../../../odcctools/libstuff/writeout.c: In function âmake_table_of_contentsâ:
../../../odcctools/libstuff/writeout.c:1021: error: âunion <anonymous>â has 
no member named âran_nameâ

It appears we have a similar structure in include/mach-o/ranlib.h, where a 
union is declared that could have a 32-bit pointer or an index. On 64-bit 
arch's we don't want to have a 64-bit pointer in the union. Fine. But writeout 
doesn't handle the situation.

Original comment by tim.n.br...@gmail.com on 25 May 2012 at 8:59