Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145220 - dev-lang/php-5.1.4-r6 uses bundled libraries
Summary: dev-lang/php-5.1.4-r6 uses bundled libraries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 145406 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-27 00:00 UTC by Petteri Räty (RETIRED)
Modified: 2006-09-09 08:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2006-08-27 00:00:45 UTC
It is the Gentoo policy to use system installed versions of libraries always when possible. I noticed that the sqlite extension can't be built to use the system installed version. I talked to CHTEKK on #gentoo-web about this and he said that upstream prefers to use their own copies. Some other projects also bundle libraries but Gentoo does not use them. 

Quoting http://devzone.zend.com/node/view/id/760

"Often enough you will find that the bundled SQLite library is a bit dated, so building your PHP with an external library will allow you to benefit from the latest fixes and features of SQLite. It will also allow you to upgrade your SQLite library in future without having to recompile PHP."

Also building extensions as shared means that we can enable/disable them without having to re-emerge php which is quite a good bonus on servers.
Comment 1 Luca Longinotti (RETIRED) gentoo-dev 2006-08-27 08:47:59 UTC
Ok I just went through the PHP packages and checked where it uses bundled libs. Not in all cases it's possible to sobstitute them with external ones, as either we don't even have those in the tree, or in most cases the PHP team modifies/enhances them for PHP specifically. Following is a list of those I found that _could_ be made to use external libs instead of the bundled ones:

PHP 4.4.4
ext/dba - cdb support - could use dev-db/cdb
ext/pcre - PCRE support - could use dev-libs/libpcre

PHP 5.1.6
ext/dba - cdb support - could use dev-db/cdb
ext/pcre - PCRE support - could use dev-libs/libpcre
ext/sqlite - sqlite2 support - could use dev-db/sqlite-2*
ext/pdo_sqlite - sqlite3 support - could use dev-db/sqlite-3*

PHP Team: please vote on each of them, if we should use bundled or external. I'm in favour of using external for both sqlite extensions and cdb, but still unsure about PCRE... Atm PHP's PCRE (6.6) is more up-to-date than our latest stable (6.3), as is SQLite in 5.2.0RC2 (3.3.7, we only have 3.3.5 stable). Opinions/votes please!
Best regards, CHTEKK.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2006-08-27 09:29:45 UTC
(In reply to comment #1)
> 
> PHP Team: please vote on each of them, if we should use bundled or external.
> I'm in favour of using external for both sqlite extensions and cdb, but still
> unsure about PCRE... Atm PHP's PCRE (6.6) is more up-to-date than our latest
> stable (6.3), as is SQLite in 5.2.0RC2 (3.3.7, we only have 3.3.5 stable).
> Opinions/votes please!
> Best regards, CHTEKK.
> 

Well if your stable version is lagging behind with no reason, we can always request for the new ones to be marked stable.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-08-28 14:14:20 UTC
*** Bug 145406 has been marked as a duplicate of this bug. ***
Comment 4 Rodrigo Severo 2006-08-28 14:21:49 UTC
(In reply to comment #1)
> Opinions/votes please!

I believe that there should be 2 use flags for each of these libraries the internal one (foo) and the external one (foo-external).

I believe that the default should be the internal one so php in Gentoo will behave more like other php installations. If someone needs something different he just have to change foo to foo-external.

I made a patch for php5_1-sapi.eclass (see Bug #145406) that implements the pcre-external flag. It's seems to be working and is very simple. Any chance of this kind of support being included soon? 
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-08-28 14:23:46 UTC
+1 for using shared stuff instead of bundled. I'm definitely against adding more flags and such dual mess.
Comment 6 Luca Longinotti (RETIRED) gentoo-dev 2006-08-29 00:30:04 UTC
Yeah, I'm against having two flags (pcre/pcre-external, sqlite/sqlite-external, ...) too, that's absolutely not needed, as we're only talking about the used libraries here, not about extensions themselves, just about the libraries some of them use.
@betelgeuse: using a shared library to build those extensions doesn't mean the extensions themselves will be built as shared, please use the "sharedext" USE flag for that.
Best regards, CHTEKK.
Comment 7 Luca Longinotti (RETIRED) gentoo-dev 2006-08-29 13:04:19 UTC
Fixed in the tree. SQLite2/3 support is now using the external libs, as well as the PCRE support. CDB still uses the internal lib to compile, because the external ones don't appear to work.
This fixes it, enjoy!
Best regards, CHTEKK.
Comment 8 Luca Longinotti (RETIRED) gentoo-dev 2006-08-29 15:37:30 UTC
UPDATE: Remove PCRE support through external lib, it's broken (see http://bugs.php.net/bug.php?id=29914). Seems only the bundled lib works in an acceptable way... :( This will remain like this then, so in the end only SQLite were switched to use bundled libs.
Best regards, CHTEKK.