Morning David,

    To confirm it was something to do with opcache, I removed opcache from
the source tree:

    krakjoe@fiji:/usr/src/php-src$ ./configure --disable-all | grep static
    checking if cc static flag -static works... yes
    checking whether to build static libraries... yes

    That's pretty strange, it doesn't seem connected to opcache, at least
on my os (ubuntu).

    So I try this, still no opcache in tree:

    krakjoe@fiji:/usr/src/php-src$ ./configure --disable-all
--disable-static | grep static
    checking if cc static flag -static works... yes
    checking whether to build static libraries... yes

    So I dig around in configure ... and find this:

    enable_shared=yes
enable_static=yes

case $php_sapi_module in
  shared)
    enable_static=no
    case $with_pic in
      yes)
        standard_libtool_flag='-prefer-pic'
        ;;
      no)
        standard_libtool_flag='-prefer-non-pic'
        ;;
    esac
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
    ;;
  *)
    standard_libtool_flag='-prefer-non-pic -static'
    if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
      enable_shared=no
    fi
    ;;
esac

   Unconditionally setting enable_static here makes --enable-static be
ignored.

   Over to someone else who understands why this is the case ...

Cheers
Joe






On Fri, Apr 29, 2016 at 12:25 AM, David Zuelke <d...@heroku.com> wrote:

> On 20.03.2016, at 22:10, David Zuelke <d...@heroku.com> wrote:
> >
> > On 10.03.2016, at 16:56, David Zuelke <d...@heroku.com> wrote:
> >>
> >>> On 08.03.2016, at 16:18, Andrea Faulds <a...@ajf.me> wrote:
> >>>
> >>> Hi,
> >>>
> >>> David Zuelke wrote:
> >>>> Is this intentional? Related to opcache's "can only be built shared"
> status? But why would that trigger static builds? Or is it a bug?
> >>>
> >>> While we're at it, why is Opcache still built as shared? Does
> something prevent it being statically-linked?
> >>
> >> I remember something about PCRE and whether or not that's linked
> statically or not. Can't find it right now.
> >>
> >> Either way, it'd be great if someone in-the-know could chime in on this
> matter ;)
> >
> > Just a little *bump*... anyone got any idea here?
> >
> > Thanks!
>
> And another *bump*... anyone from Zend maybe?
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to