Ticket #134 (closed defect: released)

Opened 21 months ago

Last modified 20 months ago

win32 makefile updates for recent unicode changes

Reported by: mhammond Owned by: charlie
Priority: normal Milestone:
Component: MSVC makefiles Version: SVN trunk
Severity: normal Keywords:
Cc: olly, richard Blocked By:
Operating System: All Blocking:

Description

Recent unicode changes require an update to the win32 makefiles - attaching a patch. Note that the patch creates a new "libunicode.lib" from the new 'unicode' directory - I'm not sure if that is the intent or not

Attachments

win32_unicode_make.patch (4.6 kB) - added by mhammond 21 months ago.
as described
patch1.patch (9.7 kB) - added by charlie 21 months ago.
Patch to centralise list of libs

Change History

Changed 21 months ago by mhammond

as described

Changed 21 months ago by mhammond

Oops - the bindings will also need to have their makefiles changed. Including a patch for the Python makefiles as that is the only one I can test:

Index: win32_bindings_python.mak =================================================================== --- win32_bindings_python.mak (revision 8284) +++ win32_bindings_python.mak (working copy) @@ -29,6 +29,7 @@

"$(OUTLIBDIR)\libapi.lib" \ "$(OUTLIBDIR)\libqueryparser.lib" \ "$(OUTLIBDIR)\libremote.lib" \

+ "$(OUTLIBDIR)\libunicode.lib" \

"$(OUTLIBDIR)\libnet.lib"

LIB_XAPIAN_OBJS= ".\xapian_wrap.obj"

Changed 21 months ago by charlie

OK, I've tried the patches: 1. Everything builds OK. I'll make a patch for Omega as well. 2. HEAD still fails some network backend tests. I'll post about this elsewhere. 3. Python bindings fail a test: Running test: exception_base... FAILED 4. PHP bindings build and a patch is attached.

Changed 21 months ago by charlie

Patch for PHP bindings:

Index: win32_bindings_php.mak =================================================================== --- win32_bindings_php.mak (revision 8286) +++ win32_bindings_php.mak (working copy) @@ -28,6 +28,7 @@

"$(OUTLIBDIR)\libapi.lib" \ "$(OUTLIBDIR)\libqueryparser.lib" \ "$(OUTLIBDIR)\libremote.lib" \

+ "$(OUTLIBDIR)\libunicode.lib" \

"$(OUTLIBDIR)\libnet.lib" \ $(PHP_LIB)

Changed 21 months ago by mhammond

I guess we could consider having config.mak define (eg) XAPIAN_LIBS to be all the .lib files, and have all relevant makefiles reference that - then future similar changes are more likely to work with a single change?

Changed 21 months ago by olly

Is there a good reason why we don't build a DLL?

Changed 21 months ago by charlie

Yes, putting it all in config.mak would be sensible - everything always includes the same libs anyway. Probably best if I get that done here as it's a change across loads of files.

We build DLLs for the Python and PHP bindings; if we built a DLL for Xapian then we'd have to install/ship two DLLs rather than one. For the binary tools and examples we build EXEs, so they work standalone - I think that's best.

Changed 21 months ago by charlie

Ah - problem with the modified Python build file. The following patch should fix it:

Index: win32_bindings_python.mak =================================================================== --- win32_bindings_python.mak (revision 8286) +++ win32_bindings_python.mak (working copy) @@ -29,6 +29,7 @@

"$(OUTLIBDIR)\libapi.lib" \ "$(OUTLIBDIR)\libqueryparser.lib" \ "$(OUTLIBDIR)\libremote.lib" \

+ "$(OUTLIBDIR)\libunicode.lib" \

"$(OUTLIBDIR)\libnet.lib"

LIB_XAPIAN_OBJS= ".\xapian_wrap.obj"

@@ -88,9 +89,9 @@

-md modern $(SWIG) -I"$(XAPIAN_CORE_REL_PYTHON)" -I"$(XAPIAN_CORE_REL_PYTHON)\include"

-Werror -c++ -python -shadow -modern \

-outdir modern -o modern/xapian_wrap.cc ../xapian.i

- $(PERL_EXE) -pe "s/class Error:/class Error(Exception):/" modern/xapian.py > modern/xapian_py.tmp - -erase modern/xapian.py - -rename modern/xapian_py.tmp modern/xapian.py + $(PERL_EXE) -pe "s/class Error:/class Error(Exception):/" modern\xapian.py > modern\xapian_py.tmp + -erase modern\xapian.py + -rename modern\xapian_py.tmp xapian.py

"$(OUTDIR)\_xapian$(PY_DEBUG_SUFFIX).pyd" : "$(OUTDIR)" $(DEF_FILE)

$(LIB_XAPIAN_OBJS) \

$(XAPIAN_DEPENDENCIES)

Changed 21 months ago by richard

  • status changed from new to closed
  • resolution set to fixed

Should be fixed with latest commit, which applies the patches.

Charlie - please can you attach patches by uploading them (use the "Create a New Attachment" link) rather than pasting into the text area. I had quite a bit of trouble getting that last patch of yours to apply, because it was getting line-wrapped.

Changed 21 months ago by charlie

  • status changed from closed to reopened
  • resolution deleted

hmm - looks like win32_unicode.mak hasn't been created in HEAD. Did Mark's original patch get applied?

Changed 21 months ago by richard

Oops, I forgot to add the new file. Done.

Changed 21 months ago by charlie

Patch to centralise list of libs

Changed 21 months ago by richard

  • attachments.isobsolete changed from 0 to 1

(From update of attachment 64) Applied

Changed 21 months ago by richard

  • status changed from reopened to closed
  • resolution set to fixed

Marking bug as closed again, since patches are applied.

Changed 20 months ago by olly

  • resolution changed from fixed to released

Fixed in 1.0.0 release.

Changed 20 months ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.