LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-16-2013, 11:23 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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
 
Old 05-16-2013, 11:36 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,285

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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 -- --
 
Old 05-16-2013, 03:57 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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
 
Old 05-16-2013, 04:09 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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.

Last edited by eantoranz; 05-16-2013 at 04:10 PM.
 
Old 05-16-2013, 04:22 PM   #5
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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.
 
Old 05-17-2013, 12:02 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,948

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


Reply

Tags
5.2, gcc, hack, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: dereferencing pointer to incomplete type joyce092130 Programming 11 09-29-2012 10:06 AM
error: dereferencing pointer to incomplete type joyce092130 Programming 1 07-07-2012 10:57 AM
[SOLVED] error: dereferencing pointer to incomplete type in C Himalay Programming 9 07-07-2012 09:35 AM
error: dereferencing pointer to incomplete type ChullDouvre Programming 2 05-02-2007 01:16 AM
Error: dereferencing pointer to incomplete type cynthia_thomas Programming 1 05-01-2006 09:10 AM


All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration