Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206970 - dev-lang/php - mbstring uses a bundled dev-libs/oniguruma copy
Summary: dev-lang/php - mbstring uses a bundled dev-libs/oniguruma copy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Lowest enhancement
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 274512
  Show dependency tree
 
Reported: 2008-01-22 00:54 UTC by Jakub Moc (RETIRED)
Modified: 2010-06-01 16:01 UTC (History)
2 users (show)

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


Attachments
patch against php-5.2.6 to use the system oniguruma install (php-5.2.6-unbundle-onig.patch,3.88 KB, patch)
2008-05-01 20:39 UTC, Christian Hoffmann (RETIRED)
Details | Diff
patch against php-5.2.6 to use the system oniguruma install (but still allow using the bundled version) (011_all_external-onig.patch,7.74 KB, patch)
2008-05-04 10:08 UTC, Christian Hoffmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2008-01-22 00:54:43 UTC
Split from Bug 206963...

<snip>
Symbol onig_alloc_init@@ (64-bit UNIX System V ABI AMD x86-64 architecture)
present 3 times
  /usr/lib64/php5/bin/php-cgi
  /usr/lib64/php5/bin/php
Symbol onig_bbuf_init@@ (64-bit UNIX System V ABI AMD x86-64 architecture)
present 3 times
  /usr/lib64/php5/bin/php-cgi
  /usr/lib64/php5/bin/php
Symbol onig_chain_reduce@@ (64-bit UNIX System V ABI AMD x86-64 architecture)
present 3 times
  /usr/lib64/php5/bin/php-cgi
  /usr/lib64/php5/bin/php
Symbol onig_compile@@ (64-bit UNIX System V ABI AMD x86-64 architecture)
present 3 times
  /usr/lib64/php5/bin/php-cgi
  /usr/lib64/php5/bin/php
Symbol onig_end@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 3
times
  /usr/lib64/php5/bin/php-cgi
  /usr/lib64/php5/bin/php
</snip>
Comment 1 Christian Hoffmann (RETIRED) gentoo-dev 2008-01-22 16:28:17 UTC
I'll try to fix that when doing the big php ebuild + eblits stuff. I want to switch to using external pcre again as well.
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-07 18:34:13 UTC
Just for reference, neither 4.7.1 nor 5.9.1 are compatible (I checked by simply replacing the bundled lib by the updated version). I'll try to contact the maintainer of the relevant extension to update the bundled lib (and code) and maybe even make using the system lib possible. If he is unresponsive or doesn't want to, I'll try it myself.
Comment 3 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-01 15:05:33 UTC
Hm, forgot to update that bug. The maintainer replied on 2008-04-08.

----------- snip -----------
The current bundled version of Oniguruma is version 4.4.4 with
minimal modification.

PHP specific definition is defined in php_orig_compat.h,
it is included in oniguruma.h.
> > #include "php_onig_compat.h"

It is necessary to avoid the name colision with regex library.
The reason of bundling is ,
- Oniguruma isn't widely used.
- We cannot support all version of Oniguruma.
- Minimal modification as shown before is necessary to use with PHP.

----------- snip -----------


I'll try my luck maybe...
Comment 4 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-01 20:38:54 UTC
Ok, I was able to hack up ext/mbstring to use the system library, and after some digging it turned out to be simpler than I thought.
It drops a reference to KOI8 (not KOI8-R) from the mbstring source, but apparently this has never been exposed to php userspace anyway (as such, there should be no behavior change). This change was necessary as recent oniguruma versions no longer export the relevant symbol.
I'm attaching the patch, just for reference. It's not nice (as it is not dynamic), but I don't care unless upstream wants to include it (I'll mail it).

I'll add it to the tree when the "big php rework" gets committed. Maybe in some weeks, maybe once 5.3 is ready...
Comment 5 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-01 20:39:39 UTC
Created attachment 151558 [details, diff]
patch against php-5.2.6 to use the system oniguruma install
Comment 6 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-04 10:08:45 UTC
Created attachment 151781 [details, diff]
patch against php-5.2.6 to use the system oniguruma install (but still allow using the bundled version)

New patch, I decided it would be better to still allow using the bundled version, so that we can send it upstream and get it included, hopefully. :)
Comment 7 Christian Hoffmann (RETIRED) gentoo-dev 2008-12-18 22:46:28 UTC
Just a status update... we'll be doing this in 5.3, a similar patch went into upstream's PHP_5_3 branch.
Comment 8 Matti Bickel (RETIRED) gentoo-dev 2010-06-01 16:01:44 UTC
php-5.3 supports using the system oniguruma out of the box. From what I got out of the source, it's reasonably similar to what hoffie's patch does, so i'm closing this bug.