Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jul 2006 02:33:04 +0200
From:      Christian Laursen <xi@borderworlds.dk>
To:        freebsd-questions@freebsd.org
Cc:        bill <btt@impcp.com>
Subject:   Re: Linux shared libs on FreeBSD
Message-ID:  <ygfirmg977j.fsf@dominion.borderworlds.dk>
In-Reply-To: <F52478E4-2337-4B7E-8C99-DA86A6AE4DBA@impcp.com> (bill's message of "Sat, 1 Jul 2006 06:52:19 -0400")
References:  <F52478E4-2337-4B7E-8C99-DA86A6AE4DBA@impcp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
bill <btt@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygfirmg977j.fsf>