Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: jplxpto on October 04, 2012, 12:25:23 AM

Title: Error compiling for 40D
Post by: jplxpto on October 04, 2012, 12:25:23 AM


../../src/bmp.c: In function 'bmp_draw_scaled_ex':
../../src/bmp.c:1220:27: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
../../src/bmp.c:1276:27: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
[ CC       ]   font-dyn.o
[ CC       ]   config.o
[ CC       ]   menu.o
../../src/menu.c: In function 'handle_ml_menu_keys':
../../src/menu.c:2204:5: error: duplicate case value
../../src/menu.c:2187:5: error: previously used here
make: *** [menu.o] Error 1


parent: 4885:073d5b5731eb
Title: Re: Error compiling for 40D
Post by: jplxpto on October 04, 2012, 12:31:46 AM
parent: 4885:073d5b5731eb

Quote from: jplxpto on October 04, 2012, 12:25:23 AM

../../src/bmp.c: In function 'bmp_draw_scaled_ex':
../../src/bmp.c:1220:27: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
../../src/bmp.c:1276:27: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
[ CC       ]   font-dyn.o
[ CC       ]   config.o
[ CC       ]   menu.o
../../src/menu.c: In function 'handle_ml_menu_keys':
../../src/menu.c:2204:5: error: duplicate case value
../../src/menu.c:2187:5: error: previously used here
make: *** [menu.o] Error 1


...

bmp.o: In function `set_ml_palette_if_dirty':
bmp.c:(.text+0x88c): undefined reference to `BmpDDev_take_semaphore'
bmp.c:(.text+0x898): undefined reference to `BmpDDev_give_semaphore'
bmp.c:(.text+0x8a4): undefined reference to `PB_Palette'
collect2: ld returned 1 exit status



40D v1.1.1

Quote

NSTUB(0xFFCB9078, BmpDDev_give_semaphore);
NSTUB(0xFFCB9028, BmpDDev_take_semaphore);

NSTUB(0x1E388, PB_Palette)

Title: Re: Error compiling for 40D
Post by: nanomad on October 04, 2012, 12:43:20 AM
Little trick to find out the offending revision:)

hg bisect --reset
hg bisect --bad [revision with error]
hg bisect --good [revision that works fine]
hg bisect --command 'make clean && make' <- in 40D directory
Title: Re: Error compiling for 40D
Post by: nanomad on October 04, 2012, 12:50:01 AM
I've pushed a temporary fix for the duplicate button code (you're defining BGMT_Q as BGMT_PRESS_DIRECT_PRINT, i guess beacuse the 40D doesn't have a Q button). Now you need to find  three stubs:

bmp.c:(.text+0x920): undefined reference to `BmpDDev_take_semaphore'
bmp.c:(.text+0xa34): undefined reference to `BmpDDev_give_semaphore'
bmp.c:(.text+0xa40): undefined reference to `PB_Palette'



Changeset 4855:33e5e0770ed7: bad
The first bad revision is:
changeset:   4855:33e5e0770ed7
branch:      unified
user:        alex@thinkpad
date:        Tue Oct 02 12:28:52 2012 +0300
summary:     5Dc: enabled a custom color palette for ML
Title: Re: Error compiling for 40D
Post by: jplxpto on October 04, 2012, 01:14:59 AM
Quote from: nanomad on October 04, 2012, 12:50:01 AM
I've pushed a temporary fix for the duplicate button code (you're defining BGMT_Q as BGMT_PRESS_DIRECT_PRINT, i guess beacuse the 40D doesn't have a Q button). Now you need to find  three stubs:

bmp.c:(.text+0x920): undefined reference to `BmpDDev_take_semaphore'
bmp.c:(.text+0xa34): undefined reference to `BmpDDev_give_semaphore'
bmp.c:(.text+0xa40): undefined reference to `PB_Palette'



Changeset 4855:33e5e0770ed7: bad
The first bad revision is:
changeset:   4855:33e5e0770ed7
branch:      unified
user:        alex@thinkpad
date:        Tue Oct 02 12:28:52 2012 +0300
summary:     5Dc: enabled a custom color palette for ML



Thank you Nanomad! I found the missing stubs ... and thanks for the tip ... the hg is a new tool for me :)
Can you help code ?!... Please...

Yes, The camera 40D doesn't have a Q button