Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#134 closed defect (released)

win32 makefile updates for recent unicode changes

Reported by: Mark Hammond Owned by: Charlie Hull
Priority: normal Milestone:
Component: MSVC makefiles Version: SVN trunk
Severity: normal Keywords:
Cc: Olly Betts, Richard Boulton Blocked By:
Blocking: Operating System: All

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 (2)

win32_unicode_make.patch (4.6 KB ) - added by Mark Hammond 18 years ago.
as described
patch1.patch (9.7 KB ) - added by Charlie Hull 18 years ago.
Patch to centralise list of libs

Download all attachments as: .zip

Change History (15)

by Mark Hammond, 18 years ago

Attachment: win32_unicode_make.patch added

as described

comment:1 by Mark Hammond, 18 years ago

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"

comment:2 by Charlie Hull, 18 years ago

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

  1. PHP bindings build and a patch is attached.

comment:3 by Charlie Hull, 18 years ago

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)

comment:4 by Mark Hammond, 18 years ago

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?

comment:5 by Olly Betts, 18 years ago

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

comment:6 by Charlie Hull, 18 years ago

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.

comment:7 by Charlie Hull, 18 years ago

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)

comment:8 by Richard Boulton, 18 years ago

Resolution: fixed
Status: newclosed

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.

comment:9 by Charlie Hull, 18 years ago

Resolution: fixed
Status: closedreopened

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

comment:10 by Richard Boulton, 18 years ago

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

by Charlie Hull, 18 years ago

Attachment: patch1.patch added

Patch to centralise list of libs

comment:11 by Richard Boulton, 18 years ago

attachments.isobsolete: 01

(From update of attachment 64) Applied

comment:12 by Richard Boulton, 18 years ago

Resolution: fixed
Status: reopenedclosed

Marking bug as closed again, since patches are applied.

comment:13 by Olly Betts, 18 years ago

Operating System: All
Resolution: fixedreleased

Fixed in 1.0.0 release.

Note: See TracTickets for help on using tickets.