Chameleon

Issue 72: trunk compile error

Reported by Carlos Porrito, May 16, 2011

Hi,
I'm trying to compile chameleon from trunk. My system 
10.5.8. / Xcode Version 3.1.4

================= make embedtheme for boot2 =================
	[MKDIR] /Volumes/diskxsy/chameleon/trunk/obj/i386/boot2
	[AS] boot2.s
	[CC] boot.c
	[CC] graphics.c
	[CC] drivers.c
	[CC] prompt.c
	[CC] options.c
	[CC] lzss.c
	[CC] mboot.c
	[CC] ramdisk.c
	[CC] picopng.c
	[CC] resume.c
	[CC] bmdecompress.c
	[CC] graphic_utils.c
	[CC] gui.c
	[CC] modules.c
modules.c: In function ‘parse_mach’:
modules.c:455: error: ‘LC_DYLD_INFO’ undeclared (first use in this 
function)
modules.c:455: error: (Each undeclared identifier is reported only 
once
modules.c:455: error: for each function it appears in.)
modules.c:481: error: dereferencing pointer to incomplete type
modules.c:481: error: dereferencing pointer to incomplete type
modules.c:481: error: dereferencing pointer to incomplete type
modules.c:483: error: dereferencing pointer to incomplete type
modules.c:483: error: dereferencing pointer to incomplete type
modules.c:483: error: dereferencing pointer to incomplete type
modules.c:484: error: dereferencing pointer to incomplete type
modules.c:484: error: dereferencing pointer to incomplete type
modules.c:484: error: dereferencing pointer to incomplete type
modules.c:485: error: dereferencing pointer to incomplete type
modules.c:485: error: dereferencing pointer to incomplete type
modules.c:485: error: dereferencing pointer to incomplete type
modules.c: In function ‘rebase_macho’:
modules.c:564: error: ‘REBASE_IMMEDIATE_MASK’ undeclared (first use 
in this function)
modules.c:565: error: ‘REBASE_OPCODE_MASK’ undeclared (first use in 
this function)
modules.c:570: error: ‘REBASE_OPCODE_DONE’ undeclared (first use in 
this function)
modules.c:580: error: ‘REBASE_OPCODE_SET_TYPE_IMM’ undeclared (first 
use in this function)
modules.c:585: error: ‘REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB’ 
undeclared (first use in this function)
modules.c:618: error: ‘REBASE_OPCODE_ADD_ADDR_ULEB’ undeclared 
(first use in this function)
modules.c:633: error: ‘REBASE_OPCODE_ADD_ADDR_IMM_SCALED’ undeclared 
(first use in this function)
modules.c:638: error: ‘REBASE_OPCODE_DO_REBASE_IMM_TIMES’ undeclared 
(first use in this function)
modules.c:647: error: ‘REBASE_OPCODE_DO_REBASE_ULEB_TIMES’ 
undeclared (first use in this function)
modules.c:665: error: ‘REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB’ 
undeclared (first use in this function)
modules.c:680: error: 
‘REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB’ undeclared (first 
use in this function)
modules.c: In function ‘rebase_location’:
modules.c:717: error: ‘REBASE_TYPE_POINTER’ undeclared (first use in 
this function)
modules.c:718: error: ‘REBASE_TYPE_TEXT_ABSOLUTE32’ undeclared 
(first use in this function)
modules.c: In function ‘bind_macho’:
modules.c:738: error: ‘BIND_TYPE_POINTER’ undeclared (first use in 
this function)
modules.c:760: error: ‘BIND_IMMEDIATE_MASK’ undeclared (first use in 
this function)
modules.c:761: error: ‘BIND_OPCODE_MASK’ undeclared (first use in 
this function)
modules.c:766: error: ‘BIND_OPCODE_DONE’ undeclared (first use in 
this function)
modules.c:777: error: ‘BIND_OPCODE_SET_DYLIB_ORDINAL_IMM’ undeclared 
(first use in this function)
modules.c:781: error: ‘BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB’ 
undeclared (first use in this function)
modules.c:792: error: ‘BIND_OPCODE_SET_DYLIB_SPECIAL_IMM’ undeclared 
(first use in this function)
modules.c:796: error: ‘BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM’ 
undeclared (first use in this function)
modules.c:804: error: ‘BIND_OPCODE_SET_TYPE_IMM’ undeclared (first 
use in this function)
modules.c:808: error: ‘BIND_OPCODE_SET_ADDEND_SLEB’ undeclared 
(first use in this function)
modules.c:821: error: ‘BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB’ 
undeclared (first use in this function)
modules.c:852: error: ‘BIND_OPCODE_ADD_ADDR_ULEB’ undeclared (first 
use in this function)
modules.c:866: error: ‘BIND_OPCODE_DO_BIND’ undeclared (first use in 
this function)
modules.c:882: error: ‘BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB’ undeclared 
(first use in this function)
modules.c:910: error: ‘BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED’ 
undeclared (first use in this function)
modules.c:927: error: ‘BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB’ 
undeclared (first use in this function)
modules.c: In function ‘bind_location’:
modules.c:975: error: ‘BIND_TYPE_POINTER’ undeclared (first use in 
this function)
modules.c:976: error: ‘BIND_TYPE_TEXT_ABSOLUTE32’ undeclared (first 
use in this function)
modules.c:979: error: ‘BIND_TYPE_TEXT_PCREL32’ undeclared (first use 
in this function)
make[2]: *** [modules.o] Error 1
make[1]: *** [embedtheme] Error 2
make: *** [embedtheme] Error 2

Comment 1 by Evan Lojewski, May 17, 2011

The module system has only been tested + verified compiling on Xcode 
3.2 (10.6) and Xcode 4.0 (10.7). It looks like a header is missing 
(or values in the 10.5 header) / in the wrong place. when I have 
some time, I'll try to add the header directly into chameleon 
instead of depending on system headers.
Owner: meklort

Comment 2 by Evan Lojewski, May 29, 2011

Try the latest version in svn and let me know if it compiles / what 
errors you get now.
Status: Started

Comment 3 by Carlos Porrito, May 29, 2011

Hi Evan
here the errorz

================= make all for libsa =================
	[MKDIR] /Volumes/diskxs6/bootbkp/chameleon/trunk/obj/i386/libsa
	[CC] prf.c
	[CC] printf.c
cc1: warnings being treated as errors
In file included from 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/mach-o/loader.h
:48,
                 from libsa.h:30,
                 from printf.c:29:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapBigDoubleToHost’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:207: warning: ‘NXConvertSwappedDoubleToHost’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:118)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapBigFloatToHost’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:216: warning: ‘NXConvertSwappedFloatToHost’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:94)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapHostDoubleToBig’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:261: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapHostFloatToBig’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:270: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapLittleDoubleToHost’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:315: warning: ‘NXConvertSwappedDoubleToHost’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:118)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapLittleFloatToHost’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:324: warning: ‘NXConvertSwappedFloatToHost’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:94)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapHostDoubleToLittle’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:369: warning: ‘NXConvertHostDoubleToSwapped’ is 
deprecated (declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:106)
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h: In function ‘NXSwapHostFloatToLittle’:
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:378: warning: ‘NXConvertHostFloatToSwapped’ is deprecated 
(declared at 
/Volumes/diskxs6/bootbkp/chameleon/trunk/i386/include/architecture/by
te_order.h:82)
make[2]: *** 
[/Volumes/diskxs6/bootbkp/chameleon/trunk/obj/i386/libsa/printf.o] 
Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

Comment 4 by Evan Lojewski, May 29, 2011

Give r916 and let me know.

Comment 5 by Carlos Porrito, May 30, 2011

Tried rev 921
compile ok but warnings compiling boot2

	...[omitted]...
	[AR] libsaio.a
	[RANLIB] libsaio.a
ranlib: file: 
/Volumes/diskxs6/bootbkp/chameleon/trunk/sym/i386/libsaio.a(ufs.o) 
has no symbols
ranlib: file: 
/Volumes/diskxs6/bootbkp/chameleon/trunk/sym/i386/libsaio.a(ufs_byteo
rder.o) has no symbols
	...[omitted]...
================= make all for boot2 =================
	...[omitted]...
	[LD] boot.sys
	[dyldsymboltool] Symbols.dylib
	[LD] boot.sys
	[dyldsymboltool] Symbols.dylib
	[LD] boot.sys
ld warning: codegen in _common_boot (offset 0x0000000E) prevents 
image from loading in dyld shared cache
ld warning: codegen in _common_boot (offset 0x00000018) prevents 
image from loading in dyld shared cache
ld warning: codegen in _free (offset 0x000001B6) prevents image from 
loading in dyld shared cache
ld warning: codegen in _free (offset 0x000001BD) prevents image from 
loading in dyld shared cache
	...[omitted]...
ld warning: codegen in _free (offset 0x000001D9) prevents image from 
loading in dyld shared cache
ld warning: codegen in _crc32 (offset 0x0000001E) prevents image 
from loading in dyld shared cache
ld warning: codegen in boot2 (offset 0x0000001E) prevents image from 
loading in dyld shared cache
ld warning: codegen in _multiboot_entry (offset 0x00000025) prevents 
image from loading in dyld shared cache
ld warning: codegen in _halt (offset 0x00000001) prevents image from 
loading in dyld shared cache

attached full log

Comment 6 by Carlos Porrito, May 31, 2011

Tried rev 929
Getting new error making boot2

================= make all for boot2 =================
	[MKDIR] /Volumes/diskxs6/bootbkp/chameleon/trunk/obj/i386/boot2
	[AS] boot2.s
FATAL:-g can't be specified if -n is specified
make[2]: *** 
[/Volumes/diskxs6/bootbkp/chameleon/trunk/obj/i386/boot2/boot2.o] 
Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

Comment 7 by Evan Lojewski, Jun 2, 2011

Let me know if it works with r944+

Comment 8 by Carlos Porrito, Jun 3, 2011

rev944 compile ok but 2721 ld warning like in Comment 5

================= make all for boot2 =================
...
	[LD] boot.sys
	[dyldsymboltool] Symbols.dylib
	[LD] boot.sys
	[dyldsymboltool] Symbols.dylib
	[LD] boot.sys
ld warning: codegen in _common_boot (offset 0x0000000E) prevents 
image from loading in dyld shared cache
ld warning: codegen in _common_boot (offset 0x00000018) prevents 
image from loading in dyld shared cache
...

Comment 9 by Cosmosis Jones, Jun 9, 2011

On 10.6.7 w/ 3.2.6 xcode i dont 'get any warnings.
Status: Invalid

Created: 12 years 10 months ago by Carlos Porrito

Updated: 12 years 9 months ago

Status: Invalid

Owner: Evan Lojewski

Followed by: 2 persons

Labels:
Priority:Medium
Type:Defect