Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-23 Thread Pierre Joye
On Tue, Oct 22, 2013 at 9:20 PM, Kevin Ingwersen
ingwie2...@googlemail.com wrote:
 Hello!

 Thank you all for your great support. I have just returned from a trip and 
 will try to change the config.w32 file. Let's see if that will work, 
 otherwise I dont mind compiling my own libcurl with the suggested method to 
 get it fully static. On MacOS i know how to check if a file is static, and 
 what it depends on. (otool -L file). But not on windows. Maybe when I 
 google some, I can figure that out, and see how the libcurl in the deps 
 folder is built - hopefuly though :)

It is done automatically by the linker. However to help supporting
both in the same build tree, we use the _a prefix for static library
names, f.e. libpng_a.lib will be the static lib while libpng.lib will
be the dynamic one.

-- 
Pierre

@pierrejoye | http://www.libgd.org

--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-22 Thread Pierre Joye
On Tue, Oct 22, 2013 at 2:18 PM, Jan Ehrhardt php...@ehrhardt.nl wrote:
 Pierre Joye in php.pecl.dev (Tue, 22 Oct 2013 09:47:03 +0200):
hi,

On Tue, Oct 22, 2013 at 9:28 AM, Jan Ehrhardt php...@ehrhardt.nl wrote:
 Intriguing question by Kevin. I once made a curl.exe without any need
 for external DLL's, not even libeay32.dll and the like. Only the
 standard Windows dll's and the VC++ redistributables are needed.

It is indeed possible to compile a standalone curl.exe (see the
Makefile options I added to curl), but the question here is more about
the curl extension.

 Yes, I knew it was about php_curl.dll

Johannes is right, the last argument of the extension function is
about defining how php_curl will be built. I never tried to build it
statically.

 I did that yesterday. It compiled fine. See the link that you did not
 quote:
 https://dl.dropboxusercontent.com/u/8954372/php555static.zip
 There is a snapshot.txt and a phpinfo.htm in this zip with more info.

 This will not work with the deps in
 http://windows.php.net/downloads/php-sdk/
 because libcurl_a.lib, libssh2_a.lib, ssleay32_a.lib and libeay32_a.lib
 in those deps all are dependent on libeay32.dll and/or ssleay32.dll.
 Kevin will have to compile his own libs for SSH2 and SSL if he wants
 support for those protocols. With those static SSH2/SSL libs he has to
 recompile Curl to get a fully static libcurl_a.lib.

I would never ever suggest to compile ssl statiically. That does not
prevent to compile php_curl statically btw.

-- 
Pierre

@pierrejoye | http://www.libgd.org

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-22 Thread Jan Ehrhardt
Jan Ehrhardt in php.pecl.dev (Tue, 22 Oct 2013 14:18:26 +0200):
This will not work with the deps in
http://windows.php.net/downloads/php-sdk/
because libcurl_a.lib, libssh2_a.lib, ssleay32_a.lib and libeay32_a.lib
in those deps all are dependent on libeay32.dll and/or ssleay32.dll.

I checked again: libssh2_a.lib is already fully static in the deps on
php.net.

Jan

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-22 Thread Jan Ehrhardt
Pierre Joye in php.pecl.dev (Tue, 22 Oct 2013 14:39:59 +0200):
I would never ever suggest to compile ssl statically.

I do not want to be dependent on SSL DLL's with flaws in it. See this
bug in the SSL 0.9.8 libraries:
http://sourceforge.net/p/curl/bugs/1037/?page=3
That is why I patched SSL 0.9.8r and compiled the recompiled SSL libs
into curl.exe

SSL 1.0.1e does not have that bug, but on mixed environments with PHP
5.3 and 5.5 you have got a fat chance you'll use possibly flawed 0.9.8y
SSL-DLL's.

That does not prevent to compile php_curl statically btw.

But php5ts.dll/php5.dll will still need external SSL DLL's.

Jan

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-22 Thread Kevin Ingwersen
Hello!

Thank you all for your great support. I have just returned from a trip and will 
try to change the config.w32 file. Let's see if that will work, otherwise I 
dont mind compiling my own libcurl with the suggested method to get it fully 
static. On MacOS i know how to check if a file is static, and what it depends 
on. (otool -L file). But not on windows. Maybe when I google some, I can 
figure that out, and see how the libcurl in the deps folder is built - hopefuly 
though :)

Thanks again for your help, I will report the outcome tomorrow!

Regards, Ingwie
Am 22.10.2013 um 15:09 schrieb Jan Ehrhardt php...@ehrhardt.nl:

 Pierre Joye in php.pecl.dev (Tue, 22 Oct 2013 14:39:59 +0200):
 I would never ever suggest to compile ssl statically.
 
 I do not want to be dependent on SSL DLL's with flaws in it. See this
 bug in the SSL 0.9.8 libraries:
 http://sourceforge.net/p/curl/bugs/1037/?page=3
 That is why I patched SSL 0.9.8r and compiled the recompiled SSL libs
 into curl.exe
 
 SSL 1.0.1e does not have that bug, but on mixed environments with PHP
 5.3 and 5.5 you have got a fat chance you'll use possibly flawed 0.9.8y
 SSL-DLL's.
 
 That does not prevent to compile php_curl statically btw.
 
 But php5ts.dll/php5.dll will still need external SSL DLL's.
 
 Jan
 
 -- 
 PECL development discussion Mailing List (http://pecl.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-21 Thread Kevin Ingwersen
So, making it look like:
EXTENSION(curl, interface.c multi.c share.c curl_file.c, false);
instead may fix this? I am going to try.

I had my doubts because it could be that the extension was made in a way that 
made a static compile impossible.
Am 21.10.2013 um 16:00 schrieb Johannes Schlüter johan...@schlueters.de:

 On Mon, 2013-10-21 at 14:28 +0200, Kevin Ingwersen wrote:
 Is there anything I could do? I thought about editing config.w32 - but I had 
 my doubts on that one.
 
 Why doubts? That file defines what s possible.
 
 In there one can read
 EXTENSION(curl, interface.c multi.c share.c curl_file.c, true);
 which forces a shared build. This comes from this commit:
 https://github.com/php/php-src/commit/deb0695069ef72d7a0936fdabaa7c9fea02f7fcd
 
 johannes
 
 


--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PECL-DEV] Compiling CURL staticaly into PHP on Windows

2013-10-21 Thread Johannes Schlüter
On Mon, 2013-10-21 at 16:14 +0200, Kevin Ingwersen wrote:
 So, making it look like:
 EXTENSION(curl, interface.c multi.c share.c curl_file.c, false);
 instead may fix this? I am going to try.

This forces static, remove the option to let the configure options
decide.

 I had my doubts because it could be that the extension was made in a
 way that made a static compile impossible.

That might be the case and this is thee reason I linked the revision
introducing this, so you can do some research or talk to the author
whether he remembers.

johannes



-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php