Linux shared libs on FreeBSD

Christian Laursen xi at borderworlds.dk
Sun Jul 2 00:33:08 UTC 2006


bill <btt at impcp.com> writes:

> We have a third-party php extension that we need to use for a
> specific application here. The extension is compiled for Linux, but
> it appears that its possible to use them in FreeBSD under the Linux
> emulation.

It is, but it's not pretty.

> Its not working out so well for us, unfortunately. Here's what I've
> done, and hopefully someone can point out where we've gone wrong and
> maybe suggest a fix:
>
> 1) the PHP .so has been branded using: brandelf -t Linux <extname>
>
> 2) linux compatibility is enabled, linprocfs is mounted, etc.
>
> 3) the port linux_base-8-8.0_14 is installed and seems to be working
> properly.
>
> I think that should about do it, no?

Not quite. You can't mix native binaries and linux libraries.

You need to use a php built for linux and load your .so into that.
I had to do this once and chose to run php in cgi mode from a native
apache. If you want to use php as an apache module, you'll need an
apache built for linux as well.

-- 
Christian Laursen


More information about the freebsd-questions mailing list