Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116617 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53733 invoked from network); 9 Dec 2021 21:49:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 21:49:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 904C91804E3 for ; Thu, 9 Dec 2021 14:50:37 -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,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 ; Thu, 9 Dec 2021 14:50:36 -0800 (PST) Received: by mail-yb1-f169.google.com with SMTP id x32so17197453ybi.12 for ; Thu, 09 Dec 2021 14:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salesforce.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Abo9zFqfpGfT2KebB2HlWxpmQOKGI1kZW836GGy7Pg8=; b=Gultp0agykgQ9AWq6gDmQrcayMsYd+Ms3pyuKtZYkU/5ekr0c+DuNa3EwGWePPaxt0 ZAs2dJTrkbeXJdgNE4GX8bypVG8QApIOXl/97S6pmZbM1M48Y9g4FwirhV4VrJULpIjt D3KHDTbwkMji9lfjTVEJ5WzYXK1enUUrf3FMw= 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=Abo9zFqfpGfT2KebB2HlWxpmQOKGI1kZW836GGy7Pg8=; b=26/QjQmi+5l9+5l7fFZmditgEhKECRIhkjHQzzZ1+ehtI1y+Gf+ZcAot2CtWP+0uSC dI6soqD/b0qikkUqcdz1bmCnJSbv7bCczS3LAqvXkewr2+jpts0KBGnZltV8v4q0EJKZ 95QE43731q57J82CN4hSWRde39aGRjWfu1mdU1BX9pa8okjWr/88JGqhUa1ggniJnD7O jR/pApo+E6dzVY5KXjJYQVGj5xxH1V1R7V5pzqifYiZ0LlbkgN4HfxBG/oXW7oYUsuIt HCxmnMA3ExHnoyu6qqUEwnBfyvk5Bt5GA4SeJ5P1z1ihDOP001/p7bsi0X7u9vl5jNEU /ZkA== X-Gm-Message-State: AOAM530wMyUttUvJnoLCpuVzSf/AXA7iFHJzWP1jTY3GT5fMwqJSqKV1 mwx+/j7k0EOD3gt3kHfTQ/QOuwGbgRzzxxHBW6jFaNMfYGc= X-Google-Smtp-Source: ABdhPJyP4yBPZl1wZ1FVw9lTmNqlo1MLZgNTkqcS6iLD9SimCEaaGMPzwryoWw5LDgp8+7XF2heTpZL8LMh4HwNo0CY= X-Received: by 2002:a25:388d:: with SMTP id f135mr9389133yba.661.1639090236169; Thu, 09 Dec 2021 14:50:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: David Zuelke Date: Thu, 9 Dec 2021 23:50:25 +0100 Message-ID: To: Dan Ackroyd Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)? From: internals@lists.php.net ("David Zuelke via internals") Thanks for your response! I'm not removing PHP before *compiling*, I am removing it before *installing*: 1) download/extract PHP (as a build dependency) to $PREFIX 2) phpize 3) ./configure --prefix=$PREFIX 4) make 5) remove PHP from $PREFIX 6) make install The purpose is to have a clean $PREFIX directory that, in its entirety, can be compressed into an archive for distribution of only that extension's files. Does that make sense? On Thu, Dec 9, 2021 at 8:28 PM Dan Ackroyd wrote: > > On Wed, 8 Dec 2021 at 15:25, David Zuelke via internals > wrote: > > > > 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 > > The file src/php_raphf_api.dep is created when the source code is > compiled. It creates a list of which files were used in the > compilation of a C file. In this case src/php_raphf_api.c > > The '-include' directive apparently allows for a file to be listed, > but not error when it doesn't exist, apparently: > https://www.gnu.org/software/make/manual/html_node/Features.html so on > a fresh cleaned build, it shouldn't make any difference. > > > Which lists not only the extension's headers, but also all of PHP's > > (in include/main, include/Zend, and so forth): > > Yes. Those are the files that need to be present to compile that > source code file. It's used to check to see if a C file should be > recompiled, as one of it's dependencies has changed. The dep file is > also deleted when doing make clean. > > It doesn't appear to me that the change to the phpize and the dep file > is affecting other people....I think the problem you're seeing is > something unique to your build process. In particular: > > 1. Are you doing a make clean, or is there a chance of left over files > from a previous build? > > 2. Why are you (as far as I understand) deleting the PHP files in `5) > rm -rf $installdir`, before compiling the extension? The command `make > install` does a check on whether anything needs recompiling.....and I > believe it's failing because the files it's trying to check no longer > exist. > > > Is this intentional? If so, could someone explain the purpose of the change? > > Probably to make the build process less flaky, by explicitly checking > dependencies, so that there are fewer instances of "stuffs not > working.....I guess I'll do a make clean and see if that helps". > > cheers > Dan > Ack