[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: porting a PHP extension to Debian-Interix

	Thanks for the great info.  Perhaps if multibyte is not fully supported under Interix the path of least resistance (if just recompiling doesn't work) would be to  try to modify the build process I'm trying to port to just not support mb (this is meant to be a quick process for devs to test with, not a replacement for QA or prod builds).

	Dumb question: Once I install Debian / Interix, do I now have a new flavor of Interix, as opposed to Interix with some additional tools installed alongside the SUA Community tools?  In other words, do I have to stop installing those tools and only install through the Debian pm going forward?

-----Original Message-----
From: Martin Koeppe [mailto:mkoeppe@gmx.de] 
Sent: Friday, October 14, 2011 9:11 PM
To: Mike Newhall
Cc: debian-interix list
Subject: Re: porting a PHP extension to Debian-Interix

Hi Mike,

On Fri, 14 Oct 2011, Mike Newhall wrote:

> Hi all,
>                 I?m a new Interix user and list member, and kind of a 
> *nix newbie in general.  (If you?re on the SUA community forums, I?ve 
> posted a related but more general question already.)  I am trying to 
> get a build working under Interix that currently runs on CentOS and 
> uses PHP.  Right now I?m keeping it simple by focusing on one single 
> missing dependency; if I can get past this one, maybe I?ll know enough to be able to solve the next one.
> It?s an extension, mbstring or php5-mbstring, that apparently includes 
> a binary component, libmbfl.  I?m willing to invest the effort to 
> create a port / package of this if necessary.  I assume that even if 
> this package is available in some apt-compatible package repository, 
> it will not work out of the box on Interix.  I know it is available at 
> least as an rpm (along with the other bits to perform a proper php 
> install), not sure if it is packaged elsewhere as well.  So I guess my 
> first step should be to get the C source and try to compile it under 
> Interix, then if it works, submit any necessary changes to the 
> project?s maintainers, and make a new Debian/Interix package from 
> there.  Is this roughly correct?  Any porting advice from those who?ve done it before?

I don't know enough about php mbstring or libmbfl. A short google search on libmbfl shows it's a lib written in C, so yes, you definitely need to build it on Interix yourself to get an Interix binary of it. Even if you find an Interix binary version of libmbfl at Gentoo/Interix or at Rodney's tools site, you probably need to build it again for Debian/Interix. Especially .so libraries are mostly not binary compatible between package systems, e.g. because of library search paths etc.

WRT multibyte support on Interix in general: if libmbfl implements everyting on his own, you may be successful. If, on the other hand, libmbfl requires multibyte support in the C library, e.g. wprintf() function and others, you won't get it to work easily, because the standard Interix C lib unfortunately doesn't have these functions.
So currently no program on Debian/Interix supports multibyte encodings.

A short look into the Debian archive shows that the package php5-dev apparently contains at least parts of libmbfl, so you should start with that package.

For the patches: First get it to work correctly, then yes, try to send them to upstream maintainers for inclusion, but in parallel, they can be included in the Debian/Interix source package, so they are applied just before building, until they are accepted upstream, which sometimes can take some time and sometimes never will happen, depending on the patch.


Reply to: