On 29 March 2011 23:49, Maciej Jaros <egil@xxxxx> wrote: > Hi. > > I'm trying to compile PHP YAZ on Windows 7 32-bit with Visual Studio 2008 > Express. I've seen some of people on this list were succesful, but archives > seem to be missing some of crucial e-mails... Or maybe just the wiki.php.net > :-(. > > Anyway from various manuals on the web I got the following. > > I have: > * YAZ (4.1.7) - installed (full install with sources) to c:\Program > Files\YAZ > * PHP (5.3.6 TS) sources in c:\PHP\dev > * PHP_YAZ (1.0.14 from Pecl page) in c:\PHP\dev\ext\yaz > * bison and flex in c:\PHP\dev_extra > * and of course Visual Studio Express 2008 installed > > I've changed c:\PHP\dev\ext\yaz\config.w32 so that it checks for yaz4.lib > rather then yaz3.lib > > I run VC9 express console and run: > cd c:\PHP\dev > set PATH=%PATH%;c:\PHP\dev_extra > set PHP_YAZ=c:\Program Files\YAZ\ > buildconf.bat > configure --disable-all --enable-cli --with-yaz=shared > > Still I get: > Checking for yaz/yaz-version.h ... <not found> > Checking for yaz/yaz-version.h ... <not found> > > I've tried setting PHP_YAZ=c:\Program Files\YAZ\include\, but that don't > help either. It does help when I set: > set INCLUDE=%INCLUDE%;c:\Program Files\YAZ\include\ > But then it says: > Problem reading true\yaz\yaz-version.h > So then I change configure.js and manually set (just before > file_get_contents(yaz_h...)): > yaz_h = "c:\\Program Files\\YAZ\\include\\"; > and set (just before CHECK_LIB("yaz4.lib"...)): > PHP_YAZ = "c:\\Program Files\\YAZ\\lib\\"; > > And OK, then nmake works, but then again I know there just have to be a > better way ;-). > > I'd like to make some step-by-step instructions on how to build YAZ for PHP > 5.3 and this just seem to be a bit too much. > > Regards, > Nux. > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Is YAZ and/or the YAZ libraries thread safe? I build locally for CLI and FastCGI, so a non-thread-safe build is better for me - as I understand things, a non-thread-safe build will be faster than a thread-safe build. My instructions ... 1 - Install YAZ and add the C:\Program Files\YAZ\bin directory to your path. The compiled extension needs access to the Yaz code at run time. 2 - Copy C:\Program Files\YAZ\include and C:\Program Files\YAZ\lib directories to your vc9\x86\deps directory (preserve the YAZ subdirectory in the include directory). 3 - Checkout pecl/yaz/trunk to the vc9\x86\pecl\yaz (or the branch or tag that you want to build). 4 - Edit the yaz\config.w32 to use the V4 library - though, it may be worth building against the v3 library first to see if all the tests pass - I get some failures. 5 - Run buildconf. This will make configure.js aware of the yaz extension. 6 - Run configure with --enable-yaz=shared (and any other options you want. Maybe --disable-zts) 7 - Once built, the extension will be in Release\php_yaz.dll (non-thread-safe) or Release_TS\php_yaz.dll (thread-safe). Copy this to your C:\PHP5\ext directory. Make sure you copy the right one as you cannot mix thread safety. 8 - Try ... php -ddisplay_startup_errors=1 -m to see if the module is recognised correctly. See also http://news.php.net/php.internals.win 764 to 776 and http://news.php.net/php.windows 30524+ Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php