Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113128 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19242 invoked from network); 9 Feb 2021 21:49:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Feb 2021 21:49:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 959D91804D0 for ; Tue, 9 Feb 2021 13:34:06 -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=-0.6 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from web138.dnchosting.com (web138.dnchosting.com [104.171.28.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 9 Feb 2021 13:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=colannino.dev; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kUm6/yW/5k3coGdQJbtvE+EGN2CeSa1ecoyeQAFkCjI=; b=t+8+0gp3H234uZPqqUiB0K9Lyg anmvvX94UywxopqQTaY9+NSaWMfV1fuWz8LhrxBcpjDcJiv7+ZhUc5DcXNLJ2BWGcTsYc0YEOoEt3 6j88YipeFE8MatCND4/m35RAAmrteTbhspkiDyWhj83vIud/iuExLeh+jtqjnm5ynuDwHxaOCAmoh fTCTq50/tynsRt/9xljq0daJaC7ijUvr4LA2LaftbA/KMLIQBV0iomrFCqnZ0BTfdbYqTth4pJBk3 /cmCAoUlQomtOX5smu8+Hi+1/yzEnDilgnDVPku9Z2tNrSlywzlOA/IV5neUaS9ZdM9OjMySQ5y/4 IV1a+9yg==; Received: from cpe-23-243-43-243.socal.res.rr.com ([23.243.43.243]:37544 helo=[192.168.0.13]) by web138.dnchosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1l9adz-0003se-2B for internals@lists.php.net; Tue, 09 Feb 2021 21:34:04 +0000 To: internals@lists.php.net References: Message-ID: <11d0583d-1ffb-8f49-87a9-edc1c7a26ad8@colannino.dev> Date: Tue, 9 Feb 2021 13:33:58 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-OutGoing-Spam-Status: No, score=-0.5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - web138.dnchosting.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - colannino.dev X-Get-Message-Sender-Via: web138.dnchosting.com: authenticated_id: james@colannino.dev X-Authenticated-Sender: web138.dnchosting.com: james@colannino.dev X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, there is a forwarder that points to the actual sender. Subject: Re: [PHP-DEV] Unknown SIZEOF_SIZE_T when compiling extension against PHP 8.0.2 From: composer@colannino.dev On 2/9/21 12:59 PM, composer@colannino.dev wrote: > Recently, I've tried compiling a custom extension against PHP 8.0.2 > and have received the following error: > > In file included from > /home/james/git/trogdor-pp/src/php7/trogdord/game.cpp:1: > /home/james/local/php8.0.2/include/php/Zend/zend_long.h:124:3: error: > #error "Unknown SIZEOF_SIZE_T" >   124 | # error "Unknown SIZEOF_SIZE_T" >       |   ^~~~~ > > I've not encountered this before and I'm not sure what's changed about > my environment other than I upgraded from 8.0.1 to 8.0.2. Does anyone > know why this is happening? I dug into the header to see what the > problem was, and it's related to the definition of SIZEOF_SIZE_T, but > I'm not able to debug any further. > > Any help would be appreciated. Thank you! It looks like I can resolve this by doing: extern "C" {     #include "php.h"     #include "php_config.h" } Instead of just: extern "C" {     #include "php.h" } I'm not sure what changed (the old way still works for me when I compile against 7.3 and 7.4, and it was working previously for me as recently as 8.0.1), but the extra include fixes the problem for me, so I'm considering this solved. Thanks, everyone!