[Xapian-discuss] Compiling the PHP bindings with Cygwin ?
olly at survex.com
Tue Feb 14 13:17:03 GMT 2006
Keep discussion on the list please.
On Tue, Feb 14, 2006 at 01:51:42PM +0100, Thomas Deniau wrote:
> Olly Betts <olly at survex.com> a ecrit :
> >I think this is the correct way. The .a that you generate like this
> >isn't actually a static version of the DLL - it's what they call an
> >"import library", and effectively contains stub definitions which
> >you link against. But at run time the DLL is loaded and used.
> pexports fails when I try to use it on the php5apache2.dll anyway (sorry, I
> don't have the exact error, the machine I'm using to connect to the Net is
> severed from our internal network).
Never mind, --enable-runtime-pseudo-reloc route is the better route
anyway since if we can get it to work we can avoid the user needing
to perform any extra steps. You already need it to build a
xapian-core DLL on windows, so it's not a problem to use it here too.
> >You can easily try this by building PHP's xapian-bindings with:
> >make xapian_la_LDFLAGS='-avoid-version -module -no-undefined
> That fails too. When I add '-Lmyphpdir -lphp5apache2' to these flags, the
> link succeeds, but it produces a static xapian.a file that PHP can't load
> instead of a DLL file.
Ah yes, you'll need those too.
I'm very suprised it builds a ".a" since we disable static libraries
explicitly in configure. If you failed to specify "-no-undefined" I
can see this might happen though perhaps, so that's something to check.
> So I tried to use dllwrap to make it a dll, but I get again the same
> unresolved symbols error (in addition, the Xapian symbols are now
> undefined, too), even when I add the flags above (and -lxapian
> -L/usr/local/lib) to --driver-flags .
I think we need to work out why we don't get a DLL in the first place.
Could you save the output from "make xapian_la_LDFLAGS=[...]" as well as
"config.log" on a floppy and then email them?
More information about the Xapian-discuss