php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78664 --enable-shared=no not work
Submitted: 2019-10-12 11:43 UTC Modified: 2019-10-13 18:36 UTC
From: yejk2k at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: *Compile Issues
PHP Version: 7.3.10 OS: CentOS 7 docker latest
Private report: No CVE-ID: None
 [2019-10-12 11:43 UTC] yejk2k at gmail dot com
Description:
------------
I want to statically build php binary, embeded libpng、libjpeg、libwebp、libfreetype,this makes it easy to run directly on another server

I have used `--enable-shared=no`,but libtool checking whether to build shared libraries is still yes, shouldn't it be no ?


I have see http://www.phpinternalsbook.com/php7/build_system/building_php.html#the-configure-script and http://www.phpinternalsbook.com/php7/build_system/building_extensions.html#loading-shared-extensions, but nothing to gain

related question: https://stackoverflow.com/questions/58344185/what-does-enable-shared-pkgs-in-the-php-configure-param-mean

Test script:
---------------
  ./configure --prefix=/usr/local/php-7.3 \
    --enable-shared=no \
    --enable-static=yes \
    --with-fpm-user=admin \
    --with-fpm-group=admin \
    --enable-fpm \
    --with-curl \
    --with-gd \
    --with-zlib \
    --with-pdo-mysql \
    --with-openssl \
    --with-libdir=lib64 \
    --enable-mbstring \
    --enable-simplexml



Expected result:
----------------
checking whether to build shared libraries no

Actual result:
--------------
checking whether to build shared libraries yes

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-13 18:36 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-10-13 18:36 UTC] cmb@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

> I want to statically build php binary, embeded libpng、libjpeg、
> libwebp、libfreetype,this makes it easy to run directly on
> another server

But has known disadvantages.  Anyhow, the PHP build system does
not build these libs, but merely links them.  If it finds dynamic
libs it links dynamically, if it finds static libs it links
statically.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC