windows build with libxml and iconv

php.internals

Rob Richards

22 years ago
Can someone with a clean windows build test the changes for the libxml/iconv linking. I believe it is working, but have so many copies of libxml/libxslt on my system I cant be 100% sure that it is. A few things. It currently is exporting all libxml symbols. It looks like there may be about 200K difference if we only export those we need, so any opinions on full or partial export? Also still trying to libxml to include all iconv symbols so that iconv is not needed in php4dllts.dsp to export its symbols. Not sure if this is necessary as compiler may be optimizing out the redundant functions. For Edin's builds we are going to need to seperate libs for the branches as these wont work with php 4 - libxml may, but libxslt wont as its static build is now linked dynamically against libxml. www.ctindustries.net/patches/winphplibxml.zip contains the libxml, libxslt as well as iconv files for building. iconv is the stock version, but is included for versioning. libxml.dll and libxslt/libexslt dlls are not needed, as we only need the static libs, but are included. php_libxml2.def needs to be placed in the ext/libxml directory. libxml is version 2.5.11, libxslt is version 1.0.33 and iconv is version 1.8 http://www.ctindustries.net/patches/winlibxml.diff.txt diff is only for the debug build right now. iconv.dsp was changed to link against php4ts_debug.lib for its iconv symbols. Seems to work though there's still an open bug (#26194) so the iconv() function isnt working. xsl.dsp was changed to link against php4ts_debug.lib for its libxml and iconv symbols php4dllts.dsp statically links against libxml and iconv. Edin, hopefully this is what you were looking for. Rob

Steph

22 years ago
Rob, I had severe problems with building on win98 because the batch file doesn't work here AT ALL. Following Frank's change I found that phpts.def was left permanently empty for me (says something about how long it is since I tested sqlite, eh?) even though php -m showed both libxml and sqlite modules as being compiled in.. I created phpts.def manually in the end and all works well with the versions of libxml2 and iconv you supplied. nb that meant downgrading both libxml2 and iconv here.. You kept an earlier error in your update for xsl.dsp: +# ADD LINK32 php4ts_debug.lib libxslt_a.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\Debug_TS/php_xsl.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" /libpath:"..\..\..\php_build\lib\libxslt" (should be Debug not Release in there) Nice little discovery for bug #26194 <?php echo libiconv("ISO-8859-1","UTF-8","This is a test."); ?> works...! - Steph

Rob Richards

22 years ago
From: Steph
> nb that meant downgrading both libxml2 and iconv here..
I dont think going with the 2.6.x branch for libxml is a good idea yet. Would like it to be out a while longer before using it for releases. It has some major changes in it as well as a bunch of new features so probably better to stick with 2.5.11 or 10 as they are stable. As far as iconv, I was just using the 1.8 as that is what the current release builds ship with. Unless you have a specific reason for a newer version, I'll leave it up to Edin to decide what version to use as he is going to need to maintain the different environments for the 4_3 and 5 builds since the libxml/libxslt libs wont be compatible for both of them. Edin, do you have any comments on this, as if we are going to go this route with static linking and re-exporting the symbols (as it seems the iconv piece is working), I would like to commit the changes soon, but doing so is going to screw up your builds until you have your environment set. Also, is there a place the libs can be placed once version issues are hashed out as I dont know about my bandwidth. They are currently sitting on a hosted site so my allocation is limited. Rob