Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compiling errors: what do they mean?
« previous next »
  • Print
Pages: [1]

Author Topic: Compiling errors: what do they mean?  (Read 3475 times)

Offline iPodFoo

  • Member
  • *
  • Posts: 221
  • Ya dig?
    • iPod Nano Rockbox Blog
Compiling errors: what do they mean?
« on: December 03, 2006, 11:33:13 AM »
Hi.

Ive been learning to code and compile. I have some errors that crop up during build (it still builds and doesnt crash out though). They seem to be the most common.

I tried searching for what they could mean, but couldnt really find much. Can anyone explain what they specifically mean (if thats possible)?

Code: [Select]
plugin.c:151: warning: initialization from incompatible pointer type
Code: [Select]
gui/gwps-common.c: In function `format_display':
gui/gwps-common.c:1767: warning: implicit declaration of function `hex_to_rgb'
Code: [Select]
/firmware/drivers/lcd-16bit.c: In function 'scroll thread':
line1004: warning 'fgcolor_orig' may be used uninitialised in this function.

I think I figured out the warning: initialization from incompatible pointer type. Seems some code was missing integer names.

As for warning: implicit declaration of function and warning 'fgcolor_orig' may be used uninitialised in this function, I dont really know.
« Last Edit: December 03, 2006, 02:13:37 PM by ipodfoo »
Logged
Visit my blog at modprojects.blogspot.com for some iPod Nano goodies!

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compiling errors: what do they mean?
« Reply #1 on: December 03, 2006, 03:06:23 PM »
Quote
As for warning: implicit declaration of function and warning 'fgcolor_orig'

This means the compiler doesn't see a definition of the function.  Definitions are those statements at the top of c files or in headers that list the arguments to a function:

int a_function(int arg 1, int *arg2);

Most likely you're getting the warning because you're calling a function that doesn't have one of those definitions.  See here for more info:

http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc07fundec.htm

Quote
warning 'fgcolor_orig' may be used uninitialised in this function.

Probably means you have a variable that you use but don't ever actually give  a value to.

As for the other one, what variable type is "fgcolor_orig".  Its been a little while since I did plain c and I don't remember all the compiler warnings  :-[
Logged

Offline iPodFoo

  • Member
  • *
  • Posts: 221
  • Ya dig?
    • iPod Nano Rockbox Blog
Re: Compiling errors: what do they mean?
« Reply #2 on: December 04, 2006, 09:30:52 AM »
Thanks saratoga. Makes things a bit clearer for me.

I have another, sort of error, when I use make install it crashes out with this:

Code: [Select]
user@debian:~/rockbox-devel-181106/nano-sim$ make install
Consider upgrading to GNU make 3.81+ for optimum build performance.
installing a full setup in your archos dir
Consider upgrading to GNU make 3.81+ for optimum build performance.
/bin/sh: /home/user/rockbox-devel-181106/tools/buildzip.pl: /usr/bin/perl: bad interpreter: Permission denied
make[1]: *** [fullzip] Error 126
make: *** [install] Error 2
user@debian:~/rockbox-devel-181106/nano-sim$

So I have to keep using su (super user) to be able to make it. This has only happened recently. I havent touched the pl file. Any ideas why this is cropping up?
Logged
Visit my blog at modprojects.blogspot.com for some iPod Nano goodies!

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: Compiling errors: what do they mean?
« Reply #3 on: December 04, 2006, 12:16:13 PM »
Quote from: saratoga on December 03, 2006, 03:06:23 PM
Definitions are those statements at the top of c files or in headers that list the arguments to a function:

int a_function(int arg 1, int *arg2);
I do not want to be nitpicking but actually this is called declaration. Definition of a function is something like:
Code: [Select]
int a_function(int arg 1, int *arg2)
{
  function body...
}
Otherwise I fully agree ;D

Code: [Select]
plugin.c:151: warning: initialization from incompatible pointer type
I do not know meaning of this but we could probably help you if you send some context of the warning (part of the code around the line 151 and the definitions of the used variables).

Code: [Select]
/bin/sh: /home/user/rockbox-devel-181106/tools/buildzip.pl: /usr/bin/perl: bad interpreter: Permission denied
This means that buildzip.pl is required to be interpreted by /usr/bin/perl (because its first line is #! /usr/bin/perl) but the interpreter (/usr/bin/perl) does not have the correct rights set. Try chmod a+x /usr/bin/perl. If it does not help send the otput of  ls -l /usr/bin/perl please.
Logged

Offline iPodFoo

  • Member
  • *
  • Posts: 221
  • Ya dig?
    • iPod Nano Rockbox Blog
Re: Compiling errors: what do they mean?
« Reply #4 on: December 04, 2006, 01:41:50 PM »
Quote
If it does not help send the otput of  ls -l /usr/bin/perl please.

Code: [Select]
user@debian:/$ ls -l /usr/bin/perl
-rwxr-xr-x  2 root root 1057324 2006-01-12 15:13 /usr/bin/perl
user@debian:/$

----------------------------------------------------
Code: [Select]
plugin.c:151: warning: initialization from incompatible pointer type
Quote
we could probably help you if you send some context of the warning (part of the code around the line 151 and the definitions of the used variables).

Cut and pasted segment from plugin.c (dots are other lines, not worth putting in):
Code: [Select]
#if LCD_DEPTH == 16
    lcd_bitmap_transparent_part,
    lcd_bitmap_transparent,
#endif
...
font_get_bits,
...
#endif

It seems to stop giving errors if I add the int font at the end of this line in the plugin.h file like so:
Code: [Select]
const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code, int font );

Logged
Visit my blog at modprojects.blogspot.com for some iPod Nano goodies!

Offline todayalemon

  • Member
  • *
  • Posts: 7
Re: Compiling errors: what do they mean?
« Reply #5 on: December 11, 2006, 08:45:52 AM »
Code: [Select]
make[1]: *** [/home/todayalemon/rockbox/build/librockbox.a] Error 127
make: *** [all] Fehler 2

What does this error, occured during the make process, mean. and how to fix the problem?
Logged

Offline todayalemon

  • Member
  • *
  • Posts: 7
Re: Compiling errors: what do they mean?
« Reply #6 on: December 19, 2006, 03:00:43 PM »
*push*
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Compiling errors: what do they mean?
« Reply #7 on: December 19, 2006, 05:00:07 PM »
todayalemon, you already posted a thread about that error message. Posting the same question in multiple threads is not wanted here and doesn't help in solving it. Maybe you want to do some little google work and look for error number 127 of gnu make.

Btw, "push"ing threads isn't helpful. Try other channels, like irc. Most devs hang around there, not here.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline cmptrgy412

  • Member
  • *
  • Posts: 3
Re: Compiling errors: what do they mean?
« Reply #8 on: January 05, 2007, 09:40:13 PM »
For error 127, I was getting it using cygwin.

Had forgotten to modify path to say:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/sh/bin:/opt/m68k/bin:/opt/arm/bin:$PATH

in /etc/profile

After this, no compiling errors.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compiling errors: what do they mean?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.105 seconds with 15 queries.