# [RISOLTO] Errore di compilazione PHP

## Vortex0965

E' due giorni che tento invano di installare PHP...ho aggiornato tutto quello che c'era da aggiornare ho anche disinstallato completamente la vecchia versione di PHP ma non riesco proprio ad emergelo....mi torna sempre questo errore:

```
!!! ERROR: dev-lang/php-5.2.2-r1 failed.

Call stack:

  ebuild.sh, line 1615:   Called dyn_compile

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

  ebuild.sh, line 44:   Called src_compile

  php-5.2.2-r1.ebuild, line 172:   Called src_compile_normal

  php-5.2.2-r1.ebuild, line 314:   Called php5_2-sapi_src_compile

  php5_2-sapi.eclass, line 606:   Called die

!!! make 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/dev-lang/php-5.2.2-r1/temp/build.log'
```

sapete come risolvere?  :Sad: Last edited by Vortex0965 on Fri May 18, 2007 4:59 pm; edited 1 time in total

----------

## Scen

```

!!! make failed 

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

```

devi postare un pò di righe sopra all'errore che hai riportato, altrimenti ci risulta impossibile capirne le cause e darti una mano a risolverlo.

----------

## Vortex0965

Avete ragione scusate....prese dal log....dal punto in cui forse inizia a esserci qualcosa che non va....

```
Thank you for using PHP.

config.status: creating php5.spec

config.status: creating main/build-defs.h

config.status: creating scripts/phpize

config.status: creating scripts/man1/phpize.1

config.status: creating scripts/php-config

config.status: creating scripts/man1/php-config.1

config.status: creating sapi/cli/php.1

config.status: creating main/php_config.h

config.status: executing default commands

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/openssl/openssl.c: In function 'php_openssl_x509_from_zval':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/openssl/openssl.c:855: warning: passing argument 1 of 'PEM_ASN1_read_bio' from incompatible pointer type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/dba/dba_db4.c: In function 'dba_open_db4':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/dba/dba_db4.c:99: warning: passing argument 2 of 'dbp->set_errcall' from incompatible pointer type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:152: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:153: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:154: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:155: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:156: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:157: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:158: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/mbstring/mbstring.c:159: warning: initialization discards qualifiers from pointer target type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c: In function 'php_pgsql_get_link_info':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: 'PG_VERSION' undeclared (first use in this function)

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: (Each undeclared identifier is reported only once

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: for each function it appears in.)

make: *** [ext/pgsql/pgsql.lo] Error 1

make: *** Waiting for unfinished jobs....

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c: In function 'zif_pspell_new':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c:254: warning: passing argument 1 of 'delete_aspell_speller' from incompatible pointer type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c: In function 'zif_pspell_new_personal':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c:377: warning: passing argument 1 of 'delete_aspell_speller' from incompatible pointer type

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c: In function 'zif_pspell_new_config':

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pspell/pspell.c:411: warning: passing argument 1 of 'delete_aspell_speller' from incompatible pointer type

!!! ERROR: dev-lang/php-5.2.2-r1 failed.

Call stack:

  ebuild.sh, line 1615:   Called dyn_compile

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

  ebuild.sh, line 44:   Called src_compile

  php-5.2.2-r1.ebuild, line 172:   Called src_compile_normal

  php-5.2.2-r1.ebuild, line 314:   Called php5_2-sapi_src_compile

  php5_2-sapi.eclass, line 606:   Called die

!!! make 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/dev-lang/php-5.2.2-r1/temp/build.log'.

```

----------

## maripoli

Ciao, anch'io ho avuto problemi con php ed ho risolto installando la versione 4

se hai eix potresti fare 

```
eix php
```

----------

## Scen

 *maripoli wrote:*   

> Ciao, anch'io ho avuto problemi con php ed ho risolto installando la versione 4

 

Però uno ha tutto il diritto di usare la versione 5  :Wink:  (tanto più che la versione 5.2.2-r1 attualmente è stabile).

@Vortex0965: con che flag USE stai cercando di compilare PHP? Cosa ti restituisce

```

emerge -pv php

```

?

Dagli errori sembra ci sia qualche problema con PostgreSQL...

```

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c: In function 'php_pgsql_get_link_info': 

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: 'PG_VERSION' undeclared (first use in this function) 

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: (Each undeclared identifier is reported only once 

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/pgsql/pgsql.c:954: error: for each function it appears in.) 

make: *** [ext/pgsql/pgsql.lo] Error 1

```

Ti è necessario? Prova a disabilitare la USE "postgres" per il pacchetto dev-lang/php

----------

## Vortex0965

[quote="Scen"]

Però uno ha tutto il diritto di usare la versione 5  :Wink:  (tanto più che la versione 5.2.2-r1 attualmente è stabile).

@Vortex0965: con che flag USE stai cercando di compilare PHP? Cosa ti restituisce

```

emerge -pv php

```

?

Esatto...vorrei poter usare proprio la 5....questo il code:

```
These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] dev-lang/php-5.2.2-r1  USE="apache2 berkdb bzip2 cjk cli crypt gdbm iconv imap ipv6 kerberos ldap mysql ncurses nls pcre postgres readline reflection session spell spl ssl truetype unicode xml xpm xsl zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hash -inifile -interbase -iodbc -java-external -json -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pdo-external -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -yaz -zip -zip-external" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

```

Ora provo anche a disabilitare postgres e vedo che succede....  :Smile: 

----------

## Vortex0965

EDIT:

Ce l'ho fatta!!Togliendo postgres come suggerito da scen (grazie!!) son riuscito a terminare l'installazione....ora pero' vorrei capire che importanza ha questo postgres e se in caso posso riattivarlo....  :Smile: 

----------

## Scen

La USE "postgres" ti serve nel caso in cui tu voglia avere il supporto in PHP al dababase PostgreSQL (quindi possibilità di recuperare/inserire/modificare dati contenuti in tabelle di un DB PostgreSQL).

C'è già un altro utente che ha riscontrato lo stesso problema, a quanto pare. Soluzione: tenere d'occhio il bug e vedere se/quando lo risolvono  :Wink: 

----------

## .:deadhead:.

 *Vortex0965 wrote:*   

> che importanza ha questo postgres

 postgres è un db. Se vuoi far connettere php a questo tipo di db allora ne hai bisogno se invece non hai questa necessità perchè ti connetti ad un altro db o proprio non usi db, vivi felice senza.

----------

## Vortex0965

Ok grazie mille ragazzi...usando mysql non ne ho bisogno.....  :Smile: 

----------

## Scen

 *Vortex0965 wrote:*   

> Ok grazie mille ragazzi...usando mysql non ne ho bisogno..... 

 

Bene! Aggiungi il tag  [RISOLTO] al titolo della discussione (basta modificare il tuo primo messaggio)

----------

