pecl install SPL_Types many problems

Asked by Alban on 2009-03-21

Binary package hint: php-pear

Hello all,

I never use Pear package or Pecl package for my PHP project. Today i wan't to try the pecl SPL_Types extensions for a new project.

Firstly I install php-pear to get the pecl command.
Secondly I try this : pecl install SPL_Types

SPL_Dowbloading is good, but, after, an error occurs : phpize command found.

Ok, I install php5-dev and retry the command "pecl install SPL_Types" and new error : make command not found.
Ok, I install buil:d-essentials packet. New try : "pecl install SPL_Types". At the make time new warning : re2c not found.
Ok, I install re2c and new try : "pecl install SPL_Types" and new error :

In file included from /usr/include/php5/ext/spl/spl_iterators.h:27,
                 from /tmp/pear/download/SPL_Types/spl_type.c:34:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: Aucun fichier ou dossier de ce type
In file included from /usr/include/php5/ext/spl/spl_iterators.h:27,
                 from /tmp/pear/download/SPL_Types/spl_type.c:34:
/usr/include/php5/ext/pcre/php_pcre.h:45: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php5/ext/pcre/php_pcre.h:46: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php5/ext/pcre/php_pcre.h:52: erreur: expected specifier-qualifier-list before ‘pcre’
make: *** [spl_type.lo] Erreur 1

At this time i can't do more, too complicated for me.
But I try to understand : php-pear include pecl command, pecl command ever use phpize command. phpize command is included only in php5-dev packet. Why php-pear command doas'nt have php5-dev dependencie ?

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
Package: php-pear 5.2.6-2ubuntu4.1
PackageArchitecture: all
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: php5
Uname: Linux 2.6.27-11-generic i686

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu php5 Edit question
Assignee:
No assignee Edit question
Solved by:
Alban
Solved:
2009-06-07
Last query:
2009-06-07
Last reply:
2009-06-07

This question was originally filed as bug #346535.

Alban (seza) said : #1
Alban (seza) said : #2

For resolve : " pcre.h: Aucun fichier ou dossier de ce type " error, download the complete php archive, extract and find in the extrected dir the pcre source copy them to /usr/include/php5/pcre. Adapt the php_pcre.h and that's work.

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Alban (seza) said : #4

That's not a bug, Seriously ? Just a question, and no one can just answer by "yes, there is a problem, a little mistake or this a liscensing problem with pcre." I don't know!!

But just let this expire and ok there is no probleme with the php-pear paquet : you can see no bug, no question. it's easy to let it expire after 15 days and forget all problem.

In fact there is 2 big problem :

PECL don't be a part of php-pear paquet !!
There is a need to a php-pecl paquet who install phpize, php5-dev, etc... and all needed for compilation.

PHP5-dev provide bad (or incomplete) php5 header. It is simply impossible to compil any paquet who use or need pcre header. And if this is not a bug, what's a bug ? Just look at the bug-tracker in pecl paquet for see all bug is declared cause 'pcre.h missing' problem.

There's 98 persons who receive this question and no one can answer. This is the ubuntu's way of life : "Ubuntu work very well, if there si a problem just ignore it and it's still working !!!"

If you don't understand me cause I'm a french asshole, you have just to say "can you explain please ?" and I'll try to speak better.

Micah Gersten (micahg) said : #5

There is no problem with the actual ubuntu package or any of the ubuntu software. The bug is with the pecl package that you are trying to install. I suggest going to pecl.php.net and filing a bug for the package there.

Pawell (p-franc) said : #6

The pecl extension is fine. This is a dependency bug in php5-dev package which requires pcre files but has no dependency on the pcre dev package.

For resolving the error it is enough to install libpcre3-dev package.

Alban (seza) said : #7

Thank you Pawell for your answer. And try to help.

I'm sorry ubuntu's developper don't accept make a mistake and close their eyes on that.

Micah Gersten (micahg) said : #8

php5-dev has the minimum requirements for building php5 extensions. Some extensions will require more dependencies and those dependencies are specified on the pecl site.

Alban (seza) said : #9

For me, the problem come from php5-pear and not php5-dev.

- First:
The php5-pear is the main way for install pecl extention. All pecl extensions neads to be compiled with php5-dev.
Why php5-dev is not a dependencie of php5-pear ? Why is not dependencie with compiling tools (make, re2c, etc...).

- Second:
This is certainly a better way make a php5-pecl paquet. Pear is not pecl, pecl require other thing taht pear. Today php5-pear is a perfect response for pear needings but not for pecl. Why not create a php5-pecl paquet who require php5-dev etc...

Thank for your response Micah Gersten.

Micah Gersten (micahg) said : #10

I would suggest making a proposal on brainstorm.ubuntu.com.

Alban wrote:
> Question #66141 on php5 in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/php5/+question/66141
>
> Status: Answered => Open
>
> Alban is still having a problem:
> For me, the problem come from php5-pear and not php5-dev.
>
> - First:
> The php5-pear is the main way for install pecl extention. All pecl extensions neads to be compiled with php5-dev.
> Why php5-dev is not a dependencie of php5-pear ? Why is not dependencie with compiling tools (make, re2c, etc...).
>
> - Second:
> This is certainly a better way make a php5-pecl paquet. Pear is not pecl, pecl require other thing taht pear. Today php5-pear is a perfect response for pear needings but not for pecl. Why not create a php5-pecl paquet who require php5-dev etc...
>
> Thank for your response Micah Gersten.
>
>

Alban (seza) said : #11

Yes this should be a good idea.

I can't make a proposal. I have a very bad english. I can't push good argument, explain correctly all elements. If someone would make a proposal at ubuntu brainstorm this is a good thing.

Thanks. I think I can close the question now.