Skip to contentSkip to conversation

Compile error on powerpc

PATCH In review Étienne Bersac 4 participants 7 messages May 7, 2006 – May 20, 2006

lore
Share & tools
lore
#0 lore raw

Hello,

I try to build latest grub2 cvs on iMac G3 (New World). I got this error :

bersace@wenyaave:~/Sources/grub2/build$ make
gcc -Iutil -I../util -I. -Iinclude -I../include -Wall -W -DGRUB_DATADIR=
\"/usr/local/share/grub/powerpc-ieee1275\" -g -O2 -DGRUB_UTIL=1  -c -o
grub_emu-util_console.o ../util/console.c
../util/console.c: Dans la fonction «grub_ncurses_putchar» :
../util/console.c:89: attention : implicit declaration of function
«addch»
../util/console.c: Dans la fonction «grub_ncurses_setcolor» :
../util/console.c:121: attention : implicit declaration of function
«color_set»
../util/console.c: Hors de toute fonction :
../util/console.c:124: erreur: «ERR» undeclared here (not in a function)
../util/console.c: Dans la fonction «grub_ncurses_checkkey» :
../util/console.c:136: attention : implicit declaration of function
«wtimeout»
../util/console.c:136: erreur: «stdscr» undeclared (first use in this
function)
../util/console.c:136: erreur: (Chaque identificateur non déclaré est
rapporté une seule fois
../util/console.c:136: erreur: pour chaque fonction dans laquelle il
apparaît.)
../util/console.c:137: attention : implicit declaration of function
«getch»
../util/console.c: Dans la fonction «grub_ncurses_getkey» :
../util/console.c:161: erreur: «stdscr» undeclared (first use in this
function)
../util/console.c:167: erreur: «KEY_LEFT» undeclared (first use in this
function)
../util/console.c:171: erreur: «KEY_RIGHT» undeclared (first use in this
function)
../util/console.c:175: erreur: «KEY_UP» undeclared (first use in this
function)
../util/console.c:179: erreur: «KEY_DOWN» undeclared (first use in this
function)
../util/console.c:183: erreur: «KEY_IC» undeclared (first use in this
function)
../util/console.c:187: erreur: «KEY_DC» undeclared (first use in this
function)
../util/console.c:191: erreur: «KEY_BACKSPACE» undeclared (first use in
this function)
../util/console.c:198: erreur: «KEY_HOME» undeclared (first use in this
function)
../util/console.c:202: erreur: «KEY_END» undeclared (first use in this
function)../util/console.c:206: erreur: «KEY_NPAGE» undeclared (first
use in this function)
../util/console.c:210: erreur: «KEY_PPAGE» undeclared (first use in this
function)
../util/console.c: Dans la fonction «grub_ncurses_getxy» :
../util/console.c:224: attention : implicit declaration of function
«getyx»
../util/console.c:224: erreur: «stdscr» undeclared (first use in this
function)
../util/console.c: Dans la fonction «grub_ncurses_getwh» :
../util/console.c:235: attention : implicit declaration of function
«getmaxyx»
../util/console.c:235: erreur: «stdscr» undeclared (first use in this
function)
../util/console.c: Dans la fonction «grub_ncurses_gotoxy» :
../util/console.c:243: attention : implicit declaration of function
«move»
../util/console.c: Dans la fonction «grub_ncurses_cls» :
../util/console.c:249: attention : implicit declaration of function
«clear»
../util/console.c:250: attention : implicit declaration of function
«refresh»
../util/console.c: Dans la fonction «grub_ncurses_setcursor» :
../util/console.c:256: attention : implicit declaration of function
«curs_set»
../util/console.c: Dans la fonction «grub_ncurses_init» :
../util/console.c:268: attention : implicit declaration of function
«initscr»
../util/console.c:269: attention : implicit declaration of function
«raw»
../util/console.c:270: attention : implicit declaration of function
«noecho»
../util/console.c:271: attention : implicit declaration of function
«scrollok»
../util/console.c:271: erreur: «stdscr» undeclared (first use in this
function)
../util/console.c:271: erreur: «TRUE» undeclared (first use in this
function)
../util/console.c:273: attention : implicit declaration of function
«nonl»
../util/console.c:274: attention : implicit declaration of function
«intrflush»
../util/console.c:274: erreur: «FALSE» undeclared (first use in this
function)
../util/console.c:275: attention : implicit declaration of function
«keypad»
../util/console.c:276: attention : implicit declaration of function
«start_color»
../util/console.c: Dans la fonction «grub_ncurses_fini» :
../util/console.c:284: attention : implicit declaration of function
«endwin»
make: *** [grub_emu-util_console.o] Erreur 1
bersace@wenyaave:~/Sources/grub2/build$

As said in the TestingOnPowerPC wiki page, i report this error.

Thanks.

#1 lore raw

Étienne Bersac <[email protected]> writes:

Hi,

Quoted 2 lines

I try to build latest grub2 cvs on iMac G3 (New World). I got this error :

It seems you do not have the ncurses header files installed. In Ubuntu this is libncurses5-dev.

--
Marco

#2 lore raw
Quoted 9 lines · Marco Gerards

Étienne Bersac <[email protected]> writes:

Hi,

Quoted 2 lines

I try to build latest grub2 cvs on iMac G3 (New World). I got this error :

It seems you do not have the ncurses header files installed. In Ubuntu this is libncurses5-dev.

I did that. but it still occurs.

#3 lore raw

Okey,

It seems that i needed to re run ../configure an recompile the project after installing libncurses5-dev . That would be great if ./configure check for ncurses headers.

Étienne.

#4 lore raw

PATCH 1/1 Give an error if curses isn't found

At Sun, 7 May 2006 16:06:10 +0200,

Quoted 6 lines · Étienne Bersac

Okey,

It seems that i needed to re run ../configure an recompile the project after installing libncurses5-dev . That would be great if ./ configure check for ncurses headers.

We already check for it, but we just continue when we don't find it. Configure should abort when it doesn't find curses however. This patch gives you an error message when the curses library isn't found.

Jeroen Dekkers

2006-05-14 Jeroen Dekkers <[email protected]>

* configure.ac: Display an error when the curses library isn't found.

Index: configure.ac
===================================================================
RCS file: /cvsroot/grub/grub2/configure.ac,v
retrieving revision 1.27

configure.ac +2 -1
diff -u -p -r1.27 configure.ac
@@ -187,7 +187,8 @@ fi
 
 # Check for curses.
 AC_CHECK_LIB(ncurses, wgetch, [LIBCURSES="-lncurses"],
-  [AC_CHECK_LIB(curses, wgetch, [LIBCURSES="-lcurses"])])
+  AC_CHECK_LIB(curses, wgetch, [LIBCURSES="-lcurses"],
+    AC_MSG_ERROR([curses library not found])))
 AC_SUBST(LIBCURSES)
 
 # Check for headers.
#5 lore raw

Re: [PATCH] Give an error if curses isn't found

Quoted 4 lines · Jeroen Dekkers

We already check for it, but we just continue when we don't find it. Configure should abort when it doesn't find curses however. This patch gives you an error message when the curses library isn't found.

I'm not sure if this is a good idea. Isn't it better to just skip the compilation of grub-emu, since grub-emu is not really necessary? Marco, what is your opinion?

Okuji

#6 lore raw

Re: [PATCH] Give an error if curses isn't found

Quoted 9 lines · Yoshinori K. Okuji
Quoted 4 lines · Jeroen Dekkers

We already check for it, but we just continue when we don't find it. Configure should abort when it doesn't find curses however. This patch gives you an error message when the curses library isn't found.

I'm not sure if this is a good idea. Isn't it better to just skip the compilation of grub-emu, since grub-emu is not really necessary? Marco, what is your opinion?

The only reason for grub-emu to exist is for debugging reasons. At least that is how I see it. It would be even better if grub-emu would not be compiled by default.

--
Marco