LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   error compiling php (5.2, I know very old): dereferencing pointer to incomplete type (https://www.linuxquestions.org/questions/programming-9/error-compiling-php-5-2-i-know-very-old-dereferencing-pointer-to-incomplete-type-4175462232/)

eantoranz 05-16-2013 10:23 AM

error compiling php (5.2, I know very old): dereferencing pointer to incomplete type
 
Hi!

We have this PHP that we have hacked around here version 5.2. I had been able to compile it up until kubuntu 12.10. But I just tried to compile it on 13.04 and I get this error:

Code:

/bin/sh /home/antoranz/Descargas/php/php-5.2.17/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/dom/ -I/home/antoranz/Descargas/php/php-5.2.17/ext/dom/ -DPHP_ATOM_INC -I/home/antoranz/Descargas/php/php-5.2.17/include -I/home/antoranz/Descargas/php/php-5.2.17/main -I/home/antoranz/Descargas/php/php-5.2.17 -I/home/antoranz/Descargas/php/php-5.2.17/ext/date/lib -I/usr/include/libxml2 -I/home/antoranz/Descargas/php/php-5.2.17/ext/mbstring/oniguruma -I/home/antoranz/Descargas/php/php-5.2.17/ext/mbstring/libmbfl -I/home/antoranz/Descargas/php/php-5.2.17/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/home/antoranz/Descargas/php/php-5.2.17/TSRM -I/home/antoranz/Descargas/php/php-5.2.17/Zend    -I/usr/include -g -O2  -prefer-non-pic -c /home/antoranz/Descargas/php/php-5.2.17/ext/dom/node.c -o ext/dom/node.lo
/home/antoranz/Descargas/php/php-5.2.17/ext/dom/node.c: In function 'dom_canonicalization':
/home/antoranz/Descargas/php/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
/home/antoranz/Descargas/php/php-5.2.17/ext/dom/node.c:1955:5: error: dereferencing pointer to incomplete type
make: *** [ext/dom/node.lo] Error 1

Is there a problem with the gcc version installed on raring?

Code:

$ gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3                                                                                                                                     
Copyright (C) 2012 Free Software Foundation, Inc.                                                                                                                                 
Esto es software libre; vea el código para las condiciones de copia.  NO hay                                                                                                       
garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO EN                                                                                                       
PARTICULAR

I just checked and it's 4.7.2 on 12.10 so it shouldn't be that different, right? I'll hand compile 4.7.2 on my machine and try with it to see what happens while I wait for some comments.

Thanks for any ideas

knudfl 05-16-2013 10:36 AM

Quote:

I just checked and it's 4.7.2 on 12.10 so it shouldn't be that different
May be not, but php-5.2.17 is "oldish".
So please try one of the other 13.04 compilers :
( sudo apt get install g++-4.4 g++-4.6 )

I.e. : $ export CC=gcc-4.6 CXX=g++-4.6 && ./configure -- --

eantoranz 05-16-2013 02:57 PM

Seems like the problem is described right here. Let's see where it takes me to

http://code.google.com/p/php52-backp...s/detail?id=16

eantoranz 05-16-2013 03:09 PM

Well, I had to adjust the patch (manually) for php 5.2 but compilation has moved on. Let's see if it ends up working.

eantoranz 05-16-2013 03:22 PM

I would say it works... I think I'll be facing another problem now (with the ssl library). We'll see about that... but as far as this thread goes, it's solved.

NevemTeve 05-16-2013 11:02 PM

I vaguely remember that in OpenSsl you have to manually enable outdated MD2 for older PHP versions.


All times are GMT -5. The time now is 05:53 PM.