Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: ace214 on October 08, 2006, 02:40:59 PM

Title: compiler error
Post by: ace214 on October 08, 2006, 02:40:59 PM
im new to compiling, and got an error. any help?

Code: [Select]
CC gui/gwps-common.c
gui/gwps-common.c: In function 'wps_data_albumart_load':
gui/gwps-common.c:378: error: 'BMP_RESIZE_NONE' undeclared (first use in this fu
nction)
gui/gwps-common.c:378: error: (Each undeclared identifier is reported only once
gui/gwps-common.c:378: error: for each function it appears in.)
gui/gwps-common.c:380: error: 'BMP_RESIZE_INCREASE' undeclared (first use in thi
s function)
gui/gwps-common.c:382: error: 'BMP_RESIZE_DECREASE' undeclared (first use in thi
s function)
gui/gwps-common.c:402: error: too many arguments to function 'read_bmp_file'
make[1]: *** [/home/Jon/rockbox-devel/build/apps/gui/gwps-common.o] Error 1
make: *** [all] Error 2

i had applied the album art and scrolling margins patch. album art applied fine, scrolling margins had the following error
Code: [Select]
patching file apps/sound_menu.c
Hunk #1 succeeded at 742 (offset 1 line).
Hunk #2 succeeded at 790 (offset 1 line).
Hunk #3 FAILED at 1041.
1 out of 3 hunks FAILED -- saving rejects to file apps/sound_menu.c.rej
should i report this to the tracker page or what?

target is ipod video, using cygwin, very recent cvs. this also happens without the scrolling margins patch
Title: Re: compiler error
Post by: scorche on October 08, 2006, 07:56:48 PM
If you are having issues with patches, please take them to the creator(s) of the patch and not here.
Title: Re: compiler error
Post by: Llorean on October 08, 2006, 08:01:50 PM
Basically, if the patch won't work and you're trying to fix it yourself, asking for help here is relevant. Asking for the patch to be fixed or reporting a problem with it should occur on the patch tracker.
Title: Re: compiler error
Post by: linuxstb on October 08, 2006, 08:16:04 PM
The album art patch requires the "bmp resizing" patch to be applied as well - see the links on the tracker page for the album art patch.

Regarding the scrolling margins patch, it looks like it is no longer in sync with the latest Rockbox source - if you get that error when applying the patch to an unmodifed copy of the source (i.e. one with no other patches applied), then it's useful to post a comment to that task on the tracker so the author (or someone else) can update it.
Title: Re: compiler error
Post by: ace214 on October 08, 2006, 08:51:19 PM
yeah, i figured out the album art one, thanks for the actual help.

if i want to apply the patch manually, do i just change the + and - lines or what? the reason i think the scrolling margins isnt working is b/c there's an extra line in the current code page that is not addressed in the patch. would i just change the - and + line and leave the rest?

like the hunk that returns an error is
Code: [Select]
@@ -1039,7 +1040,7 @@
 
     peak_meter_trigger(false);
     lcd_setfont(FONT_UI);
-    lcd_setmargins(old_x_margin, old_y_margin);
+    lcd_setmargins(old_left_margin, old_right_margin, old_y_margin);
     return retval;
 }
 #endif

and lines 1039 thru 1045 of sound_menu.c are
Code: [Select]
   peak_meter_trigger(false);
    lcd_setfont(FONT_UI);
    lcd_setmargins(old_x_margin, old_y_margin);
    action_signalscreenchange();
    return retval;
}
#endif

so would i just change it to
Code: [Select]
   peak_meter_trigger(false);
    lcd_setfont(FONT_UI);
    lcd_setmargins(old_left_margin, old_right_margin, old_y_margin);
    action_signalscreenchange();
    return retval;
}
#endif
, leaving the action_signalscreenchange function?

also what does the @@ -1039,7 +1040,7 @@ represent because 1039 is the starting line but i dont see how the rest correlates to anything. i would guess that u would basically be taking out 7 lines of code and putting in the following code in one line down, but that would make the per-line + and - minus unnecessary, so idk.
if i wanted to edit the patch itself manually to make it up to date, what would i do?
thanks.
Title: Re: compiler error
Post by: Rincewind on October 13, 2006, 09:10:01 AM
your assumptions are right. If a hunk failed you look for the place where it should be added and do the changes the hunk would do yourself.
the things between @@ are line numbers and indicate also how much code is altered. You don't have to look at these numbers (except for the line-number) to apply a hunk manually.

If you  apply a hunk manually, you should always check if the code makes sense afterwards. In this case it looks ok.