From nobody Wed Mar 22 06:49:31 2023 X-Original-To: apache@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PhJxB745vz3ywtN for ; Wed, 22 Mar 2023 06:49:34 +0000 (UTC) (envelope-from eval@veng.tk) Received: from serv (veng.tk [83.217.1.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "serv", Issuer "serv" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PhJx96Ff0z413J for ; Wed, 22 Mar 2023 06:49:33 +0000 (UTC) (envelope-from eval@veng.tk) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of eval@veng.tk designates 83.217.1.10 as permitted sender) smtp.mailfrom=eval@veng.tk; dmarc=none Received: from HP7320 (wcp.iptk.ru [83.217.1.12]) by serv (8.16.1/8.16.1) with ESMTP id 32M6nVpD061049 for ; Wed, 22 Mar 2023 10:49:31 +0400 (+04) (envelope-from eval@veng.tk) Date: Wed, 22 Mar 2023 10:49:31 +0400 From: Eugene To: apache@FreeBSD.org Subject: Not building on i386 Message-Id: <20230322104931.b1299b966afb05c60022dd4f@veng.tk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) List-Id: Support of apache-related ports List-Archive: https://lists.freebsd.org/archives/freebsd-apache List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-apache@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [0.23 / 15.00]; HFILTER_HELO_5(3.00)[serv]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_HAM_LONG(-0.98)[-0.979]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[apache@FreeBSD.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:31138, ipnet:83.217.0.0/22, country:RU]; DMARC_NA(0.00)[veng.tk]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[apache@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PhJx96Ff0z413J X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N Hello When trying to build www/apache24 on the i386 platform, an error occurs while building the http2 module: h2_util.c:1183:23: error: result of comparison of constant 9223372036854775807 with expression of type 'apr_size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] && b->length > APR_INT64_MAX) ~~~~~~~~~ ^ ~~~~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[6]: stopped in /usr/obj/ports/usr/ports/www/apache24/work/httpd-2.4.56/modules/http2 *** Error code 1 Stop. make[5]: stopped in /usr/obj/ports/usr/ports/www/apache24/work/httpd-2.4.56/modules/http2 *** Error code 1 Stop. make[4]: stopped in /usr/obj/ports/usr/ports/www/apache24/work/httpd-2.4.56/modules *** Error code 1 Stop. make[3]: stopped in /usr/obj/ports/usr/ports/www/apache24/work/httpd-2.4.56 *** Error code 1 Stop. make[2]: stopped in /usr/obj/ports/usr/ports/www/apache24/work/httpd-2.4.56 *** Error code 1 As a result, Apache cannot be built on a 32-bit system. A patch is required to resolve this issue. ------------------------------- The original function where the error occurs /******************************************************************************* * h2_util for bucket brigades ******************************************************************************/ static void fit_bucket_into(apr_bucket *b, apr_off_t *plen) { /* signed apr_off_t is at least as large as unsigned apr_size_t. * Problems may arise when they are both the same size. Then * the bucket length *may* be larger than a value we can hold * in apr_off_t. Before casting b->length to apr_off_t we must * check the limitations. * After we resized the bucket, it is safe to cast and substract. */ if ((sizeof(apr_off_t) == sizeof(apr_int64_t) && b->length > APR_INT64_MAX) || (sizeof(apr_off_t) == sizeof(apr_int32_t) && b->length > APR_INT32_MAX) || *plen < (apr_off_t)b->length) { /* bucket is longer the *plen */ apr_bucket_split(b, *plen); } *plen -= (apr_off_t)b->length; } -------------------------------- I do so in order to somehow compile Apache static void fit_bucket_into(apr_bucket *b, apr_off_t *plen) { /* signed apr_off_t is at least as large as unsigned apr_size_t. * Problems may arise when they are both the same size. Then * the bucket length *may* be larger than a value we can hold * in apr_off_t. Before casting b->length to apr_off_t we must * check the limitations. * After we resized the bucket, it is safe to cast and substract. */ if ((sizeof(apr_off_t) == sizeof(apr_int32_t) && b->length > APR_INT32_MAX) || *plen < (apr_off_t)b->length) { /* bucket is longer the *plen */ apr_bucket_split(b, *plen); } *plen -= (apr_off_t)b->length; } But as intended, this is not entirely correct. We need a beautiful and correct solution to correct the situation -- Eugene