Bug #71227 [ReO]: Can't compile php_curl statically

From: Date: Mon, 04 Jan 2016 12:22:11 +0000
Subject: Bug #71227 [ReO]: Can't compile php_curl statically
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198403@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71227&edit=1 ID: 71227 Updated by: ab@php.net Reported by: amir at zend dot com Summary: Can't compile php_curl statically Status: Re-Opened Type: Bug Package: *Compile Issues Operating System: Windows PHP Version: 7.0.1 Assigned To: ab Block user comment: N Private report: N New Comment: Hi Zeev, ext/curl is forced shared since http://git.php.net/?p=php-src.git;a=commit;h=deb0695069ef72d7a0936fdabaa7c9fea02f7fcd (like 5.2 times?). So nothing changed actually, 5.3 for sure behaves same already. There are many reasons for doing so, specifically with OpenSSL for link and runtime issues. But with other deps as well. We could indeed re-evaluate this case as this new technique used in 7.0 today http://git.php.net/?p=php-src.git;a=blob;f=UPGRADING.INTERNALS;hb=refs/heads/PHP-7.0#l311 . Amir, there's #winphp-dev on freenode where you could poke me for some direct discussions as well. If we can come up with a worky constelaltion, so could change it also at some other places (ext/ftp what comes in mind yet). Though please note that we only use libcurl_a.lib nowadays. Thanks. Previous Comments: ------------------------------------------------------------------------ [2016-01-04 09:10:57] zeev@php.net Anatol - what changed since 5.6, where it was possible to build ext/curl as static? Why does the dependency on OpenSSL make it impossible? Thanks! ------------------------------------------------------------------------ [2016-01-01 17:49:50] ab@php.net Thanks for the report. Yes, ext/curl won't build static as well as many other extensions on Windows. The reason are several limitations based on the concrete libraries builds, or their dependencies. In this case, the fact libcurl links with openssl enforces ext/curl to be always built shared. Thanks. ------------------------------------------------------------------------ [2015-12-27 13:57:00] amir at zend dot com Description: ------------ I'd like to compile php_curl statically into php but everything I tried only compiled it as a shared module. I used the following configure options (tried both '--with-curl' and '--with-curl=static' and also tried to compile only with libcurl.lib and only with libcurl_a.lib): .\configure --disable-all --enable-debug-pack --enable-cli --enable-ipv6 --disable-zts --enable-cgi --enable-com-dotnet --enable-filter --enable-pdo --with-libxml --with-iconv --with-openssl --enable-cgi --enable-zlib --enable-xmlreader --enable-xmlwriter --enable-session --with-mysqlnd --with-dom --enable-filter --enable-json --with-mysqli=shared --with-pdo-mysql=shared --enable-phar=shared --with-simplexml --with-xml --with-mcrypt=shared --enable-hash --enable-ftp --with-pdo-sqlite --with-sqlite3 --enable-zip --with-xmlrpc=shared --enable-ctype --with-mp=5 --with-gd=shared --enable-mbstring=shared --enable-bcmath=shared --enable-calendar=shared --enable-shmop=shared --enable-sockets=shared --with-wddx=shared --enable-tokenizer=shared --with-curl=static --with-oci8=shared,instantclient --with-xsl=shared --with-bz2=shared --enable-exif=shared --enable-intl=shared --with-gettext=shared --with-gmp=shared --with-imap=shared --with-ldap=shared --with-libwebp --enable-odbc=shared! --with-pgsql=shared --with-pdo-pgsql=shared --with-tidy=shared --enable-soap=shared --with-pdo-odbc=shared --enable-fileinfo=shared And got the following related to curl: Checking for library libcurl_a.lib;libcurl.lib ... ..\deps\lib\libcurl.lib Checking for curl/easy.h ... E:\bld\nightly\phpdev\vc14\x86\deps\include Checking for library ssleay32.lib ... ..\deps\lib\ssleay32.lib Checking for library libeay32.lib ... ..\deps\lib\libeay32.lib Checking for library winmm.lib ... <in LIB path> WinMM.Lib Checking for library wldap32.lib ... <in LIB path> Wldap32.Lib Enabling extension ext\curl [shared] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71227&edit=1

« previous php.bugs (#198403) next »