# Errore compilazione rpm-4.4.6-r3

## Pancu

Ragazzi non riesco a compilare correttamente il pacchetto rpm

Questo è l'output.

```
(cd .libs && rm -f liblua.la && ln -s ../liblua.la liblua.la)

/bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc -DLUA_USERCONFIG='"./local/userconfig.c"' -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts   -o lua/lua lua_lua-lua.o liblua.la -L/usr/lib -lncurses -lrt -lpthread  -lz -lbz2

/bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc -DLUA_OPNAMES -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts   -o luac/luac luac_luac-luac.o luac_luac-print.o luac_luac-lopcodes.o liblua.la -lrt -lpthread  -lz -lbz2

mkdir luac/.libs

mkdir lua/.libs

i686-pc-linux-gnu-gcc -DLUA_OPNAMES -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o luac/luac luac_luac-luac.o luac_luac-print.o luac_luac-lopcodes.o  ./.libs/liblua.a -lm -ldl -lrt -lpthread -lz -lbz2

i686-pc-linux-gnu-gcc: unrecognized option '-02'

i686-pc-linux-gnu-gcc -DLUA_USERCONFIG=\"./local/userconfig.c\" -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o lua/lua lua_lua-lua.o  ./.libs/liblua.a -lm -ldl -L/usr/lib -lncurses -lrt -lpthread -lz -lbz2

i686-pc-linux-gnu-gcc: unrecognized option '-02'

make[2]: Leaving directory `/var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6/lua'

Making all in rpmio

make[2]: Entering directory `/var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6/rpmio'

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT argv.lo -MD -MP -MF .deps/argv.Tpo -c -o argv.lo argv.c

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT digest.lo -MD -MP -MF .deps/digest.Tpo -c -o digest.lo digest.c

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT fts.lo -MD -MP -MF .deps/fts.Tpo -c -o fts.lo fts.c

mkdir .libs

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT digest.lo -MD -MP -MF .deps/digest.Tpo -c digest.c  -fPIC -DPIC -o .libs/digest.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT fts.lo -MD -MP -MF .deps/fts.Tpo -c fts.c  -fPIC -DPIC -o .libs/fts.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT digest.lo -MD -MP -MF .deps/digest.Tpo -c digest.c -o digest.o >/dev/null 2>&1

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT fts.lo -MD -MP -MF .deps/fts.Tpo -c fts.c -o fts.o >/dev/null 2>&1

mv -f .deps/digest.Tpo .deps/digest.Plo

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT macro.lo -MD -MP -MF .deps/macro.Tpo -c -o macro.lo macro.c

mv -f .deps/fts.Tpo .deps/fts.Plo

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd128.lo -MD -MP -MF .deps/rmd128.Tpo -c -o rmd128.lo rmd128.c

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT argv.lo -MD -MP -MF .deps/argv.Tpo -c argv.c  -fPIC -DPIC -o .libs/argv.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT argv.lo -MD -MP -MF .deps/argv.Tpo -c argv.c -o argv.o >/dev/null 2>&1

mv -f .deps/argv.Tpo .deps/argv.Plo

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc     -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd160.lo -MD -MP -MF .deps/rmd160.Tpo -c -o rmd160.lo rmd160.c

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd128.lo -MD -MP -MF .deps/rmd128.Tpo -c rmd128.c  -fPIC -DPIC -o .libs/rmd128.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT macro.lo -MD -MP -MF .deps/macro.Tpo -c macro.c  -fPIC -DPIC -o .libs/macro.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd128.lo -MD -MP -MF .deps/rmd128.Tpo -c rmd128.c -o rmd128.o >/dev/null 2>&1

macro.c: In function 'rpmGlob':

macro.c:1700: warning: implicit declaration of function 'setlocale'

macro.c:1700: error: 'LC_COLLATE' undeclared (first use in this function)

macro.c:1700: error: (Each undeclared identifier is reported only once

macro.c:1700: error: for each function it appears in.)

macro.c:1700: warning: assignment makes pointer from integer without a cast

macro.c:1703: error: 'LC_CTYPE' undeclared (first use in this function)

macro.c:1703: warning: assignment makes pointer from integer without a cast

make[2]: *** [macro.lo] Error 1

make[2]: *** Waiting for unfinished jobs....

mv -f .deps/rmd128.Tpo .deps/rmd128.Plo

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd160.lo -MD -MP -MF .deps/rmd160.Tpo -c rmd160.c  -fPIC -DPIC -o .libs/rmd160.o

i686-pc-linux-gnu-gcc: unrecognized option '-02'

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/beecrypt -I/usr/include/neon -I../lua/include -I../lua/local -I../misc -march=k8 -02 -pipe -fomit-frame-pointer -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rmd160.lo -MD -MP -MF .deps/rmd160.Tpo -c rmd160.c -o rmd160.o >/dev/null 2>&1

mv -f .deps/rmd160.Tpo .deps/rmd160.Plo

make[2]: Leaving directory `/var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6/rpmio'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6'

make: *** [all] Error 2

!!! ERROR: app-arch/rpm-4.4.6-r3 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 4035:   Called src_compile

  rpm-4.4.6-r3.ebuild, line 70:   Called die

!!! emake failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/app-arch/rpm-4.4.6-r3/temp/build.log'.

```

Sapete aiutarmi??

Grazie.

----------

## Tigerwalk

potrebbe essere un problema di CFLAGS, mi pare che sia scritto -02 (con lo zero), invece va scritto -O2 (con la o maiuscola)!

----------

## crisandbea

 *Tigerwalk wrote:*   

> potrebbe essere un problema di CFLAGS, mi pare che sia scritto -02 (con lo zero), invece va scritto -O2 (con la o maiuscola)!

 

quoto.  infatti hai scritto 02(zerodue) non O2 come dovrebbe essere.

ciauz

----------

## Pancu

Si confermo...Ho commesso proprio quell'errore.

Da niubbo vi chiedo, tutti i programmi che ho installato fino adesso sono vanno riemersi??

Grazie

----------

## Tigerwalk

 *Pancu wrote:*   

> Si confermo...Ho commesso proprio quell'errore.
> 
> Da niubbo vi chiedo, tutti i programmi che ho installato fino adesso sono vanno riemersi??
> 
> Grazie

 

La flag -O2  è un'ottimizzazione di velocità per le gcc, non credo che  che devi ricompilare in quanto l'ottimizzazione non interessa il pacchetto in se, ma solo la velocità di compilazione (almeno così mi pare). Aspetta anche qualche altro parere che confermi quanto ti ho detto!

----------

## djinnZ

Attenzione: mettere mano a /var/db è pericoloso! 

mi sento pigro (e piacevolmente insensibile, ho finito ora con le dichiarazioni) quindi lo script te lo devi fare da solo ma in /var/db/pkg/categoria/pacchetto/CFLAGS vengono riportate le cflags usate per compilare quel pacchetto. Ti basta fare un parsing e vedere per quali pacchetti è stata usata l'opzione sbagliata e ricompilarli (che è meglio!).

Mi pare che in documentazione ci sia un "gufo" che serve a questo scopo o può essere riadattato, cerca.

-O2 è una ottimizzazione che influenza la velocità dei programmi non la velocità di compilazione.

Compilare senza ottimizzazione (o con ottimizzazione -s o -O1, tranne per que pochi 2/3 pacchetti che lo richiedono) comporta meno problemi rispetto ad una ottimizzazione eccessiva ma sempre li porta. Mi pare che siano una decina di trhead sull'argomento sul forum.

----------

