public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* php-4.1.0 on Cygwin
@ 2001-12-11 17:43 Ryan T. Sammartino
  2001-12-11 22:46 ` Gerrit P. Haase
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan T. Sammartino @ 2001-12-11 17:43 UTC (permalink / raw)
  To: Cygwin List


I am attempting to build php-4.1.0 on Cygwin.  So far I have had to make
the following changes to get things to compile.  I am almost certain
that this is the Wrong Way(TM) to solve this problem, so if anyone could
suggest the Right Way(TM) before I send these patches to the PHP guys,
I'd appreciate it.  Also, read on about _imp__ craziness...


---cut here---
--- php-4.1.0/ext/openssl/openssl.c.orig	Tue Dec 11 14:52:34 2001
+++ php-4.1.0/ext/openssl/openssl.c	Tue Dec 11 14:58:38 2001
@@ -24,6 +24,7 @@
 #include "config.h"
 #endif
 
+
 #include "php.h"
 #include "php_openssl.h"
 
@@ -39,6 +40,12 @@
 #include <openssl/pem.h>
 #include <openssl/err.h>
 
+/* Hack for Cygwin.  Without this, timezone is a function */
+#if defined __CYGWIN__
+#define timezone ((long int) _timezone)
+#endif
+
+
 static unsigned char arg2of3_force_ref[] =
                        { 3, BYREF_NONE, BYREF_FORCE, BYREF_NONE };
 static unsigned char arg2of4_force_ref[] =
--- php-4.1.0/ext/standard/datetime.c.orig	Tue Dec 11 14:58:16 2001
+++ php-4.1.0/ext/standard/datetime.c	Tue Dec 11 14:59:02 2001
@@ -35,6 +35,11 @@
 
 #include "php_parsedate.h"
 
+/* Hack for Cygwin.  Without this, timezone is a function */
+#if defined __CYGWIN__
+#define timezone ((long int) _timezone)
+#endif
+
 char *mon_full_names[] =
 {
 	"January", "February", "March", "April",
---cut here---


Now I get to a link stage, and I get:


/bin/sh /home/ryans/src/php-4.1.0/cygwin-build/libtool --silent --mode=link gcc -I. -I/home/ryans/src/php-4.1.0/ -I/home/ryans/src/php-4.1.0/cygwin-build/main -I/home/ryans/src/php-4.1.0 -I/home/ryans/src/php-4.1.0/cygwin-build/Zend -I/home/ryans/src/php-4.1.0/ext/mysql/libmysql -I/home/ryans/src/php-4.1.0/ext/xml/expat -I/home/ryans/src/php-4.1.0/main -I/home/ryans/src/php-4.1.0/Zend -I/home/ryans/src/php-4.1.0/TSRM  -I/home/ryans/src/php-4.1.0/cygwin-build/TSRM -g -O2   -o php -export-dynamic	 stub.lo libphp4.la 
Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)
./.libs/libphp4.a(xml.o): In function `zm_info_xml':
/home/ryans/src/php-4.1.0/ext/xml/xml.c:237: undefined reference to `_imp__php_XML_ExpatVersion'
./.libs/libphp4.a(xml.o): In function `xml_parser_dtor':
/home/ryans/src/php-4.1.0/ext/xml/xml.c:304: undefined reference to `_imp__php_XML_ParserFree'
./.libs/libphp4.a(xml.o): In function `zif_xml_parser_create':
/home/ryans/src/php-4.1.0/ext/xml/xml.c:1080: undefined reference to `_imp__php_XML_ParserCreate'
/home/ryans/src/php-4.1.0/ext/xml/xml.c:1084: undefined reference to `_imp__php_XML_SetUserData'
*** snip

so my question is, where does that _imp__ come from?  Something to do
with DLLs I can guess, but I'm a DLL dummy on Winblows.  How do I either
get rid of that _imp__ or how do I properly add it to the php_XML_*
functions?



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: php-4.1.0 on Cygwin
  2001-12-11 17:43 php-4.1.0 on Cygwin Ryan T. Sammartino
@ 2001-12-11 22:46 ` Gerrit P. Haase
  2001-12-12 22:52   ` Ryan T. Sammartino
  0 siblings, 1 reply; 4+ messages in thread
From: Gerrit P. Haase @ 2001-12-11 22:46 UTC (permalink / raw)
  To: Ryan T. Sammartino; +Cc: Cygwin List

Hallo Ryan,

Am 2001-12-12 um 01:04 schriebst du:

> I am attempting to build php-4.1.0 on Cygwin.  So far I have had to make
> the following changes to get things to compile.  I am almost certain
> that this is the Wrong Way(TM) to solve this problem, so if anyone could
> suggest the Right Way(TM) before I send these patches to the PHP guys,
> I'd appreciate it.  Also, read on about _imp__ craziness...

> +/* Hack for Cygwin.  Without this, timezone is a function */

This hack is ok.

> ---cut here---


> Now I get to a link stage, and I get:


> /bin/sh /home/ryans/src/php-4.1.0/cygwin-build/libtool --silent --mode=link gcc -I. -I/home/ryans/src/php-4.1.0/ -I/home/ryans/src/php-4.1.0/cygwin-build/main -I/home/ryans/src/php-4.1.0
> -I/home/ryans/src/php-4.1.0/cygwin-build/Zend -I/home/ryans/src/php-4.1.0/ext/mysql/libmysql -I/home/ryans/src/php-4.1.0/ext/xml/expat -I/home/ryans/src/php-4.1.0/main
> -I/home/ryans/src/php-4.1.0/Zend -I/home/ryans/src/php-4.1.0/TSRM  -I/home/ryans/src/php-4.1.0/cygwin-build/TSRM -g -O2   -o php -export-dynamic      stub.lo libphp4.la 
> Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)
> ./.libs/libphp4.a(xml.o): In function `zm_info_xml':
> /home/ryans/src/php-4.1.0/ext/xml/xml.c:237: undefined reference to `_imp__php_XML_ExpatVersion'
> ./.libs/libphp4.a(xml.o): In function `xml_parser_dtor':
> /home/ryans/src/php-4.1.0/ext/xml/xml.c:304: undefined reference to `_imp__php_XML_ParserFree'
> ./.libs/libphp4.a(xml.o): In function `zif_xml_parser_create':
> /home/ryans/src/php-4.1.0/ext/xml/xml.c:1080: undefined reference to `_imp__php_XML_ParserCreate'
> /home/ryans/src/php-4.1.0/ext/xml/xml.c:1084: undefined reference to `_imp__php_XML_SetUserData'
> *** snip

> so my question is, where does that _imp__ come from?  Something to do
> with DLLs I can guess, but I'm a DLL dummy on Winblows.  How do I either
> get rid of that _imp__ or how do I properly add it to the php_XML_*
> functions?

There is a lib missing?  Have you linked against libexpat?

Ciao,

Gerrit P. Haase                            mailto:gp@familiehaase.de
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: php-4.1.0 on Cygwin
  2001-12-11 22:46 ` Gerrit P. Haase
@ 2001-12-12 22:52   ` Ryan T. Sammartino
  2001-12-18 16:55     ` Apache hack (was: Re: php-4.1.0 on Cygwin) Ryan T. Sammartino
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan T. Sammartino @ 2001-12-12 22:52 UTC (permalink / raw)
  To: Cygwin List


Just thought people on the list might like to know that configuring php 
with --disable-xml, one can build apache + php and get it all to play nice
with postgresql under Cygwin.

(Apache 1.3.22 doesn't quite build cleanly under Cygwin, and I'm working
on a patch for that, but it isn't too tough to get it to work).


-- 
Ryan T. Sammartino (ryants@shaw.ca)
http://members.shaw.ca/ryants/
The man who runs may fight again.
		-- Menander

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Apache hack (was: Re: php-4.1.0 on Cygwin)
  2001-12-12 22:52   ` Ryan T. Sammartino
@ 2001-12-18 16:55     ` Ryan T. Sammartino
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan T. Sammartino @ 2001-12-18 16:55 UTC (permalink / raw)
  To: Cygwin List

On Wed, Dec 12, 2001 at 10:12:05PM -0800, Ryan T. Sammartino wrote:
> 
> (Apache 1.3.22 doesn't quite build cleanly under Cygwin, and I'm working
> on a patch for that, but it isn't too tough to get it to work).
> 

Well, again, this is probably the Wrong Way(TM), but here is what I had
to do to get a working Apache (trivial patch):


---cut here---
--- src/Configure.orig	Tue Dec 18 16:20:32 2001
+++ src/Configure	Tue Dec 18 16:20:40 2001
@@ -1853,6 +1853,7 @@
 ## Now HS's POSIX regex implementation if needed/wanted. We do it
 ## now since AddModule may have changed it
 ##
+RULE_WANTHSREGEX=yes
 if [ "x$RULE_WANTHSREGEX" = "xyes" ]; then
     REGLIB="regex/libregex.a"
     SUBDIRS="regex $SUBDIRS"
---cut here---

-- 
Ryan T. Sammartino
http://members.shaw.ca/ryants/
I don't believe there really IS a GAS SHORTAGE.. I think it's all just
a BIG HOAX on the part of the plastic sign salesmen -- to sell more numbers!!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-19  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 17:43 php-4.1.0 on Cygwin Ryan T. Sammartino
2001-12-11 22:46 ` Gerrit P. Haase
2001-12-12 22:52   ` Ryan T. Sammartino
2001-12-18 16:55     ` Apache hack (was: Re: php-4.1.0 on Cygwin) Ryan T. Sammartino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).