| Auteur | Message |
|---|---|
|
le: 22. 11. 2004 [15:31]
|
|
|
roger@infomed.sld.cu
Roger Peña Escob
Auteur du fil
Inscrit depuis: 31.12.1969
Interventions: 0
|
holas les cuento que hace casi dos semanas estoy envuelto en la tarea de compil= ar binarios windows de openisis y de php-openisis en mi linux, usando MinGW cual ha sido el resultado hasta el momento? bueno, openisis fue exito total, logre hacer el binario openisis.exe y co= rre sin problemas, ya sea compilado estaticamente o con bibliotecas compartidas, = pues tambien pude hacer las dll y la .a de openisis (necesarias para el php-openisis) sim embargo con php-openisis no he tenido todo el existo que me gustaria,= compilo sin errores la dll del modulo pero cuando el php la intenta cargarla no puede= porque la dll no informa ningun valor para las versiones del API, ni las de debug, ni l= as de thread, tampoco el nombre de modulo ni su version ... me da la idea de que existe un problema con las variables tipo *_INI_* de= l PHP estos son los tips que he seguido para compilar las cosas, por si alguien= se desidde a probar: Cross-compilacion del PHP en Linux para windows comentar la linea: #include "win95nt.h" del fichero: main/php.h 2- eliminar el error: /usr/local/cross-tools/src/php-4.3.2/Zend/../TSRM/tsrm_config.w32.h:9:20:= crtdbg.h: No such file or directory para esto hay que pasar la variable ZEND_DEBUG=3D0 3- eliminar el error: /usr/local/cross-tools/src/php-4.3.2/TSRM/tsrm_win32.h:104:7: warning: no= newline at end of file para esto basta abrir ese fichero, hacer un cambio, salvar, revertir el c= ambio y salvar Pasos para crear los binarios de windows en tu linux 1- obtener las herramientas de cross-compilacion, el gcc por ejemplo 1- puedes compilar tu mismo el gcc para cross-compilacion, hay manuale= s y howto en internet de como hacerlo 2- puedes bajar los binarios ya listos para tu glibc 2- las herramientas de cross-compilacion (cross-tools) las vamos a instal= ar en /usr/local, aunque make.mingw tiene establecido ponerlo en /opt ... 3- compilar openisis 1- el comando make debe de ejecutarse asi: WIN32=3D1 make asi se activan determinadas variables en el Makefile y en los fuentes d= e openisis 2- si ejecutas el comando "make" pues vas a obtener errores como los si= guientes: /usr/local/cross-tools/lib/gcc/i386-mingw32msvc/3.4.1/../../../../i386-mi= ngw32msvc/include/sys/time.h:6: error: redefinition of `struct _timeb' openisis.c: In function `millis': openisis.c:229: error: structure has no member named `time' openisis.c:229: error: structure has no member named `time' openisis.c:229: error: structure has no member named `millitm' openisis.c:229: error: structure has no member named `millitm' 3- para eliminar estos errores solo hay que comentar la linea 38 del fi= chero openisis.c, esa linea es: #define timeval _timeb 4- se vuelve a ejecutar el comando: "WIN32=3D1 make" y el openisis comp= ila con algunos warnings, pero al final obtienes en el directorio win el ejecutable openisis.exe y la bibliotec= a libopenisis.a 5- sin embargo, puede que ud desee en lugar de la biblioteca libopenisi= s.a una dll, para esto solo tiene que modificar un poco el fichero Makefile y= n la linea que empieza por $(MTO)/libopenisis.so cambiar la extension de la li= b por .dll 6- luego ejecutar WIN32=3D1 make shared 7- debe ocurrir la compilacion sin problemas 4- compilacion del PHP-OpenIsis 1- modificar ligeramente el fichero "compile" que trae la distribucion = de php-openisis. lo siguiente es un diff entre los dos ficheros [roger@laptop-roger isis-1.0.3p3]$ diff cross-compile compile 12,13d11 < ZEND_DEBUG=3D0 < CPPFLAGS=3D"-DHAVE_CONFIG_H -DZEND_DEBUG -DWIN32 -DZEND_WIN32 -DPHP_WIN= 32" cross-configure.sh --enable-isis=3Dshared --with-php-config=3D`dirname $phpize`/php-config 15,16c13,16 < cross-make.sh < #cross-make.sh install --- > CPPFLAGS=3D"-DHAVE_CONFIG_H" ./configure --enable-isis=3Dshared > --with-php-config=3D`dirname $phpize`/php-config > > make > make install [roger@laptop-roger isis-1.0.3p3]$ 2- ejecutar ./cross-compile 3- vas a obtener varios errores y algunos warnings: /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: initiali= zer element is not constant /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: (near in= itialization for `ini_entries[0].on_modify') /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: initiali= zer element is not constant /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: (near in= itialization for `ini_entries[0]') /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: initiali= zer element is not constant /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: (near in= itialization for `ini_entries[1].on_modify') /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: initiali= zer element is not constant /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: (near in= itialization for `ini_entries[1]') /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:103: error: initiali= zer element is not constant /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:103: error: (near in= itialization for `ini_entries[2]') estos errores ocurren cuando se inicializa algunas variables en el fiche= ro php.ini 4- solo temporal, no es la solcion definitiva, pero comentemos las lin= eas 101 y 102 del fichero isis.c 5- ahora el sistema compila pero con warnings, el mas importante de to= dos es : libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32m= svc shared libraries 6- para que se eliminen los errores anteriores soloo basta pasar las "= FLAGS" de compilacion: -DLIBZEND_EXPORTS este es el script que uso para cross-compilar el php-openisis: #!/bin/sh phpize=3D${phpize:-"/usr/local/cross-tools/bin/phpize"} if test -f $phpize; then $phpize else echo "You have to install PHP first. Make sure phpize script is l= ocated at $phpize" exit 1 fi aclocal ZEND_DEBUG=3D0 PHP_EXPORTS=3D0 ZEND_EXPORTS=3D0 EXTRA_LDFLAGS=3D"-L/usr/local/cross-tools/lib -lphp4ts -Wl,-s,--warn-unresolved-symbols,--no-undefined,--allow-shlib-undefined,-= -noinhibit-exec" CPPFLAGS=3D"-DHAVE_CONFIG_H -DZEND_DEBUG -DWIN32 -DZEND_WIN32 -DPHP_WIN32= -DLIBZEND_EXPORTS -DPHP_EXPORTS -DSAPI_EXPORTS -DTSRM_EXPORTS -DCWD_EXPORTS" EXTRA_LDFLAGS=3D"$EXTRA_LDFLAGS" CPPFLAGS=3D"$CPPFLAGS" cross-configure.s= h --enable-isis=3Dshared --with-php-config=3D`dirname $phpize`/php-config cross-make.sh #cross-make.sh install saludos roger ---------------------------------------------------------------------- Nodo central de la red Infomed (http://www.sld.cu) Usuario linux: 97152 (http://counter.li.org) Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu) "Whatever you do will be insignificant, but it is very important that you do it." Gandhi ---------------------------------------------------------------------- ------------------------------------------------- Este mensaje fue enviado usando el servicio de correo en web de Infomed http://webmail.sld.cu ------------------------------------------ Posted to Phorum via PhorumMail |
|
le: 22. 11. 2004 [17:12]
|
|
|
braulio
Braulio Solano Rojas
Inscrit depuis: 16.05.2008
Interventions: 2
|
Hola About the cross-compiling of openisis.exe you can find a step-by-step at http://solsoft.co.cr/openisis/. I am going to put some more material there, be checking it. Bye. B. > holas > > les cuento que hace casi dos semanas estoy envuelto en la tarea de > compilar binarios > windows de openisis y de php-openisis en mi linux, usando MinGW > cual ha sido el resultado hasta el momento? > > bueno, openisis fue exito total, logre hacer el binario openisis.exe y > corre sin > problemas, ya sea compilado estaticamente o con bibliotecas compartidas, > pues tambien > pude hacer las dll y la .a de openisis (necesarias para el php-openisis) > > sim embargo con php-openisis no he tenido todo el existo que me gustaria, > compilo sin > errores la dll del modulo pero cuando el php la intenta cargarla no puede > porque la dll > no informa ningun valor para las versiones del API, ni las de debug, ni > las de thread, > tampoco el nombre de modulo ni su version ... > me da la idea de que existe un problema con las variables tipo *_INI_* del > PHP > > estos son los tips que he seguido para compilar las cosas, por si alguien > se desidde a > probar: > > Cross-compilacion del PHP en Linux para windows > > comentar la linea: > #include "win95nt.h" > del fichero: main/php.h > > 2- eliminar el error: > /usr/local/cross-tools/src/php-4.3.2/Zend/../TSRM/tsrm_config.w32.h:9:20: > crtdbg.h: No > such file or directory > para esto hay que pasar la variable ZEND_DEBUG=0 > > 3- eliminar el error: > /usr/local/cross-tools/src/php-4.3.2/TSRM/tsrm_win32.h:104:7: warning: no > newline at end > of file > para esto basta abrir ese fichero, hacer un cambio, salvar, revertir el > cambio > y salvar > > > > Pasos para crear los binarios de windows en tu linux > > 1- obtener las herramientas de cross-compilacion, el gcc por ejemplo > 1- puedes compilar tu mismo el gcc para cross-compilacion, hay manuales > y howto en > internet > de como hacerlo > 2- puedes bajar los binarios ya listos para tu glibc > > 2- las herramientas de cross-compilacion (cross-tools) las vamos a > instalar en /usr/local, > aunque make.mingw tiene > establecido ponerlo en /opt ... > > 3- compilar openisis > 1- el comando make debe de ejecutarse asi: > WIN32=1 make > asi se activan determinadas variables en el Makefile y en los fuentes de > openisis > > 2- si ejecutas el comando "make" pues vas a obtener errores como los > siguientes: > > /usr/local/cross-tools/lib/gcc/i386-mingw32msvc/3.4.1/../../../../i386-mingw32msvc/include/sys/time.h:6: > error: redefinition of `struct _timeb' > openisis.c: In function `millis': > openisis.c:229: error: structure has no member named `time' > openisis.c:229: error: structure has no member named `time' > openisis.c:229: error: structure has no member named `millitm' > openisis.c:229: error: structure has no member named `millitm' > > 3- para eliminar estos errores solo hay que comentar la linea 38 del > fichero openisis.c, > esa linea es: #define timeval _timeb > > 4- se vuelve a ejecutar el comando: "WIN32=1 make" y el openisis compila > con algunos > warnings, pero al final > obtienes en el directorio win el ejecutable openisis.exe y la biblioteca > libopenisis.a > 5- sin embargo, puede que ud desee en lugar de la biblioteca > libopenisis.a > una dll, para esto solo tiene que modificar un poco el fichero Makefile y > n la > linea que empieza por $(MTO)/libopenisis.so cambiar la extension de la lib > por > .dll > 6- luego ejecutar WIN32=1 make shared > 7- debe ocurrir la compilacion sin problemas > > 4- compilacion del PHP-OpenIsis > 1- modificar ligeramente el fichero "compile" que trae la distribucion > de php-openisis. > lo siguiente es un diff entre los dos ficheros > > [roger@laptop-roger isis-1.0.3p3]$ diff cross-compile compile > 12,13d11 > < ZEND_DEBUG=0 > < CPPFLAGS="-DHAVE_CONFIG_H -DZEND_DEBUG -DWIN32 -DZEND_WIN32 -DPHP_WIN32" > cross-configure.sh --enable-isis=shared --with-php-config=`dirname > $phpize`/php-config > 15,16c13,16 > < cross-make.sh > < #cross-make.sh install > --- >> CPPFLAGS="-DHAVE_CONFIG_H" ./configure --enable-isis=shared >> --with-php-config=`dirname $phpize`/php-config >> >> make >> make install > [roger@laptop-roger isis-1.0.3p3]$ > > 2- ejecutar ./cross-compile > 3- vas a obtener varios errores y algunos warnings: > > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: > initializer element is > not constant > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: (near > initialization for > `ini_entries[0].on_modify') > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: > initializer element is > not constant > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:101: error: (near > initialization for > `ini_entries[0]') > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: > initializer element is > not constant > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: (near > initialization for > `ini_entries[1].on_modify') > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: > initializer element is > not constant > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:102: error: (near > initialization for > `ini_entries[1]') > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:103: error: > initializer element is > not constant > /home/roger/Bibliotecas/OpenIsis/isis-1.0.3p3/isis.c:103: error: (near > initialization for > `ini_entries[2]') > > estos errores ocurren cuando se inicializa algunas variables en el > fichero > php.ini > 4- solo temporal, no es la solcion definitiva, pero comentemos las > lineas > 101 y 102 del fichero isis.c > 5- ahora el sistema compila pero con warnings, el mas importante de > todos > es : > libtool: link: warning: undefined symbols not allowed in > i386-pc-mingw32msvc shared > libraries > > 6- para que se eliminen los errores anteriores soloo basta pasar las > "FLAGS" de > compilacion: > -DLIBZEND_EXPORTS > > > este es el script que uso para cross-compilar el php-openisis: > #!/bin/sh > > phpize=${phpize:-"/usr/local/cross-tools/bin/phpize"} > if test -f $phpize; then > $phpize > else > echo "You have to install PHP first. Make sure phpize script is > located at > $phpize" > exit 1 > fi > > aclocal > ZEND_DEBUG=0 > PHP_EXPORTS=0 > ZEND_EXPORTS=0 > EXTRA_LDFLAGS="-L/usr/local/cross-tools/lib -lphp4ts > -Wl,-s,--warn-unresolved-symbols,--no-undefined,--allow-shlib-undefined,--noinhibit-exec" > CPPFLAGS="-DHAVE_CONFIG_H -DZEND_DEBUG -DWIN32 -DZEND_WIN32 -DPHP_WIN32 > -DLIBZEND_EXPORTS > -DPHP_EXPORTS -DSAPI_EXPORTS -DTSRM_EXPORTS -DCWD_EXPORTS" > > EXTRA_LDFLAGS="$EXTRA_LDFLAGS" CPPFLAGS="$CPPFLAGS" cross-configure.sh > --enable-isis=shared --with-php-config=`dirname $phpize`/php-config > > cross-make.sh > #cross-make.sh install > > saludos > roger > > ---------------------------------------------------------------------- > Nodo central de la red Infomed (http://www.sld.cu) > Usuario linux: 97152 (http://counter.li.org) > Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu) > > "Whatever you do will be insignificant, but it is very important > that you do it." > Gandhi > ---------------------------------------------------------------------- > > > ------------------------------------------------- > Este mensaje fue enviado usando el servicio de correo en web de Infomed > http://webmail.sld.cu > > ------------------------------------------ Posted to Phorum via PhorumMail |
|
le: 23. 11. 2004 [07:29]
|
|
|
roger@infomed.sld.cu
Roger Peña Escob
Auteur du fil
Inscrit depuis: 31.12.1969
Interventions: 0
|
Mensaje citado por braulio@solsoft.co.cr: > Hola > > About the cross-compiling of openisis.exe you can find a step-by-step a= t > http://solsoft.co.cr/openisis/. > > > yes, nice to have it on web but i'm cross-compiling, i mean, i'm using linux and use the MinGW's gcc = in order get windows binaries in my Linux of course, the procedure is the same, but you have to invoque 'WIN32=3D1 = make' insted of just 'make' to get openisis.exe, you should also put the stepts to get th= e libopenisis.dll or libopenisis.a libraries, we need if we want to compile= php-openisis why should i use Windows if i can use Linux another thing, why use openisis-0.8.6 if version 0.8.8 is already out and= works with the same procedure openisis-0.9.0 is diferent, i had to disable the compilation of the serve= r object in order to get openisis.exe, but anyway, i like 0.8.x better, it is anouth for me= > I am going to put some more material there, be checking it. > please let us know when you update that pages > > Cross-compilacion del PHP en Linux para windows > > > > comentar la linea: > > #include "win95nt.h" > > del fichero: main/php.h ok, this morning, i just uncomment the line and comment the ofending code= inside win95nt.h, it was the definition of uint and ulong and pid_t, they were d= efined previusly in other includes files I'm still having problems with php-openisis module, it compite without pr= oblems, not any warning but when it is "upload" by php in the windows system, php complai= n telling me this: PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=3D0, debug=3D0, thread-safety=3D0 PHP compiled with module API=3D20020429, debug=3D0, thread-safety=3D1 These options need to match in Unknown on line 0 so you see, php even can see what is the name of the module, not it versi= on, and others numbers cu roger ---------------------------------------------------------------------- Nodo central de la red Infomed (http://www.sld.cu) Usuario linux: 97152 (http://counter.li.org) Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu) "Whatever you do will be insignificant, but it is very important that you do it." Gandhi ---------------------------------------------------------------------- ------------------------------------------------- Este mensaje fue enviado usando el servicio de correo en web de Infomed http://webmail.sld.cu ------------------------------------------ Posted to Phorum via PhorumMail |
|
le: 23. 11. 2004 [16:13]
|
|
|
braulio
Braulio Solano Rojas
Inscrit depuis: 16.05.2008
Interventions: 2
|
Hi! > Mensaje citado por braulio@solsoft.co.cr: > >> Hola >> >> About the cross-compiling of openisis.exe you can find a step-by-step at >> http://solsoft.co.cr/openisis/. >> >> >> > > yes, nice to have it on web > but i'm cross-compiling, i mean, i'm using linux and use the MinGW's gcc > in order > get windows binaries in my Linux MinGW is still MinGW on Windows. > of course, the procedure is the same, but you have to invoque 'WIN32=1 > make' insted of > just 'make' to get openisis.exe, you should also put the stepts to get the > libopenisis.dll or libopenisis.a libraries, we need if we want to compile > php-openisis > > why should i use Windows if i can use Linux Then why cross-compiling at all? > another thing, why use openisis-0.8.6 if version 0.8.8 is already out and > works with the > same procedure I am using the 0.8.6 version at a workshop. I am trying to teach people to get in touch with openisis. I really don't care very much about the version since they where able to do the exercises. Something happened at http://openisis.org/Doc/GetIt since the 0.8.8 version is not available there. There was also I believe a 0.8.8 version by Serhij Dubyk compiled with MVC++ 6.0. Be careful with the cross-compiled version of 0.8.8 since I got troubles with it. > openisis-0.9.0 is diferent, i had to disable the compilation of the server > object in order > to get openisis.exe, but anyway, i like 0.8.x better, it is anouth for me > > > >> I am going to put some more material there, be checking it. >> > please let us know when you update that pages OK! >> > Cross-compilacion del PHP en Linux para windows >> > >> > comentar la linea: >> > #include "win95nt.h" >> > del fichero: main/php.h > > ok, this morning, i just uncomment the line and comment the ofending code > inside > win95nt.h, it was the definition of uint and ulong and pid_t, they were > defined previusly > in other includes files > > I'm still having problems with php-openisis module, it compite without > problems, not any > warning but when it is "upload" by php in the windows system, php complain > telling me > this: > > PHP Warning: Unknown(): (null): Unable to initialize module > Module compiled with module API=0, debug=0, thread-safety=0 > PHP compiled with module API=20020429, debug=0, thread-safety=1 > These options need to match > in Unknown on line 0 > > > so you see, php even can see what is the name of the module, not it > version, and others > numbers That is what I told you about the references. B. ------------------------------------------ Posted to Phorum via PhorumMail |
|
le: 24. 11. 2004 [04:48]
|
|
|
paul@malete.org
Klaus Ripke
Inscrit depuis: 31.12.1969
Interventions: 0
|
Hola On Tuesday 23 November 2004 23:13, braulio @ solsoft.co[dot]cr wrote: > Something happened at http://openisis.org/Doc/GetIt since the 0.8.8 > version is not available there. There was also I believe a 0.8.8 versi= on > by Serhij Dubyk compiled with MVC++ 6.0. sorry, the links were gone ... restored now Serhij's http://openisis.org/tar/VisualC_adapted.zip is 0.8.6 based saludos ------------------------------------------ Posted to Phorum via PhorumMail |
|
le: 04. 12. 2004 [15:52]
|
|
|
Braulio José Solano Rojas
Inscrit depuis: 31.12.1969
Interventions: 0
|
Hallo... Klaus Ripke wrote: > Hola > > On Tuesday 23 November 2004 23:13, braulio @ solsoft.co[dot]cr wrote: > > Something happened at http://openisis.org/Doc/GetIt since the 0.8.8 > > version is not available there. There was also I believe a 0.8.8 version > > by Serhij Dubyk compiled with MVC++ 6.0. > sorry, the links were gone ... restored now > > Serhij's http://openisis.org/tar/VisualC_adapted.zip is 0.8.6 > based Actually there was a file called Win32_OpenIsis_0.8.8_modification_etc.zip there, which I am including as an attachment. ¡Pura Vida! Braulio |