Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116593 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60183 invoked from network); 8 Dec 2021 22:32:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Dec 2021 22:32:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3B881804DF for ; Wed, 8 Dec 2021 15:33:21 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 8 Dec 2021 15:33:21 -0800 (PST) Received: by mail-lf1-f45.google.com with SMTP id z7so8645061lfi.11 for ; Wed, 08 Dec 2021 15:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JtuiNstxy6c6ZsLYVtneZIhpUeqpEjJHTlwIQepMMBo=; b=ee2PeEvj+AnzRKmY6SJLq+pKz5pYa3AHW3+UxY+xxDkRHndU3H3hOp/obRglo2lkDM HDoj2vn682XzAZZ2ZWL8up+kE4oR6d2+itpOpvUkeesH/DoUILd1+bIlEvDjzO19BYoa 3c0HqOrhH1r87yvDuKsSU+m+Psnhk76XtDsaKOvlkVfNJ61l+H/kX3n01yHESVzytsk7 U2rTRvyyQ76QGQEH00qd7/Y8tfxr6gRahRRHW7oj+C5K4zhzqHGrbVNoqDdBjEsPk++f okCKpcFG+QDyI7R6adYnmQcbHGvIYcIySFZJCLCzy1ygT79uW/X5/QG6N5xXj3XtjM0s 4w9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JtuiNstxy6c6ZsLYVtneZIhpUeqpEjJHTlwIQepMMBo=; b=Pyv/66yjYTcvNyVlW10ZG1n0VNlbzy2l6ozMSjFhBZYgcfT/AY/aPusoRk+T5RgfSy Pv77OflisRpTJ8bLwHTzfAVuaXfwqQSESF1OXLZbGSC/08Bc/UEJB1t4xS3+8z1MzrpP Vta0XuoAQGA/b1QtpEI5AQk1fxbXScU4FH2+wI9B3tVl6keZBGRltrxcvjdBau+Cotll cXGXbjgurGpvPCzyWxr0VVUupoAzB5uZmysYFKU/BVsEea1pAIC9khntcjf44MZUKsxC ixFXMI4BQdn7Y9vt0/pvxEOHEpGFiPVUGe7cbckHhM/EZ32reIQbteqESaaeRrKZ1Ifr v01g== X-Gm-Message-State: AOAM53297h8GjaWfI9VquS5NcXWN8K6JWwB4X/ezKcbda1eRXDrWwarc v+Sfvjew0sXTVbd4FBaO4XUbwh+eZG9s6UeYytc= X-Google-Smtp-Source: ABdhPJwGo+hf7G7JQeeylyf9dYel6CQAXSgIfgdRNND3DwVu8z4J0E7zNd0AukgEiz1su0MaH7l1t+y3NAzvqeqLWQk= X-Received: by 2002:ac2:5e2a:: with SMTP id o10mr2398461lfg.291.1639006400010; Wed, 08 Dec 2021 15:33:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 9 Dec 2021 00:33:08 +0100 Message-ID: To: David Zuelke Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000041dd5905d2aaeaac" Subject: Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)? From: glash.gnome@gmail.com (Glash Gnome) --00000000000041dd5905d2aaeaac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, Can you tell me what the program is in step 7) > package up Thanks you, Le mer. 8 d=C3=A9c. 2021 =C3=A0 16:25, David Zuelke via internals < internals@lists.php.net> a =C3=A9crit : > Hi all, > > When building shared extensions for PHP for the purpose of packaging > and distributing the builds, the build environment obviously needs PHP > installed in the destination directory structure (for headers, phpize, > and so forth). > > But the resulting archive of the built extension should only contain > the shared object, and possibly the headers. > > A common pattern to do achieve is: > > 1) download/extract PHP to $installdir > 2) download/extract extension to $builddir > 3) phpize in $builddir > 4) make in $builddir > 5) rm -rf $installdir > 6) make install > 7) package up $installdir > > Step 6 installs the extension into $installdir - you end up with > /foo/bar/lib/php/extensions/no-debug-non-zts-20210902/something.so > > That doesn't work with PHP 8.1 anymore - the Makefile generated by > phpize now contains an include directive at the top level (near the > bottom), e.g.: > > -include src/php_raphf_api.dep > > Which lists not only the extension's headers, but also all of PHP's > (in include/main, include/Zend, and so forth): > > src/php_raphf_api.lo: /tmp/bob-2eBC7e/raphf-2.0.1/src/php_raphf_api.c \ > config.h /app/.heroku/php/include/php/main/php.h \ > /app/.heroku/php/include/php/main/php_version.h \ > /app/.heroku/php/include/php/Zend/zend_stream.h \ > /app/.heroku/php/include/php/main/streams/php_stream_context.h \ > =E2=80=A6 (many more from main/ and Zend/ here) > /app/.heroku/php/include/php/ext/standard/info.h php_raphf.h \ > php_raphf_api.h php_raphf.h > > This results in the 'make install' failing if, like in our step 5 > above, PHP itself has been (re-)moved since the 'make' (output that > follows is from a 'make -d install'): > > Considering target file 'src/php_raphf_api.lo'. > =E2=80=A6 > Considering target file '/app/.heroku/php/include/php/main/php.h'= . > File '/app/.heroku/php/include/php/main/php.h' does not exist. > Looking for an implicit rule for > '/app/.heroku/php/include/php/main/php.h'. > Trying pattern rule with stem 'php'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/php.h'= . > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main/php.h,v'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main/RCS/php.h,v'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main/RCS/php.h'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main/s.php.h'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main/SCCS/s.php.h'. > Trying pattern rule with stem 'php'. > Trying implicit prerequisite > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/php.h'= . > Looking for a rule with intermediate file > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/php.h'= . > Avoiding implicit rule recursion. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/php.h,= v'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/RCS/ph= p.h,v'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/RCS/ph= p.h'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/s.php.= h'. > Trying pattern rule with stem 'php.h'. > Trying implicit prerequisite > > '/app/.heroku/php/include/php/main//tmp/bob-1830jl/raphf-2.0.1/src/SCCS/s= .php.h'. > No implicit rule found for > '/app/.heroku/php/include/php/main/php.h'. > Finished prerequisites of target file > '/app/.heroku/php/include/php/main/php.h'. > Must remake target '/app/.heroku/php/include/php/main/php.h'. > make: *** No rule to make target > '/app/.heroku/php/include/php/main/php.h', needed by > 'src/php_raphf_api.lo'. Stop. > > Building extensions for 8.0 or lower doesn't generate such a > `src/php_EXTNAME_api.dep` file. > > Is this intentional? If so, could someone explain the purpose of the > change? I couldn't find anything insightful when browsing the Git > logs. > > The workaround is to > > make INSTALL_ROOT=3D$SOMETEMPDIR install > > and then move things into place for packaging, but I was still > wondering why this change was made in the first place. > > Thanks and greetings, > > David > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --00000000000041dd5905d2aaeaac--