From nobody Thu May 18 21:27:36 2023 X-Original-To: ports-bugs@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 4QMjk12xB0z4C2hw for ; Thu, 18 May 2023 21:27:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QMjk10k9Sz40Sp for ; Thu, 18 May 2023 21:27:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684445257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j1phcLLSjl1WkHaA9p3WezZYSLZkjYyF+rh04cWvscs=; b=uzF9sFVNy6NHo8tupFY8r55adiiojbqLkrGgsg2+uRTwtk4lZPn31WkrXD08AhumSzGhbl Rcow+d29gPYbvTvSVPFiX1tXKeJPbB/fiLucBG21KrEGw/MHUrVfk2+BRXBsB9NvzhuE9n 09l/P3iXBrK3gw38S3f9Aglv6yB19sJaGJFe8LtOWW1ZBsAJOkjrNSnLPg4rqC8spdr9ze WbfvPeRtnf/M3WmJCFx5l9S/aZh/OGp8rsVEeumxk8rv6/TDHVvf6R8MJc6MyXFSsPIEQT 9wk+Xlg6vDkG9mTJq6H4kDb8MeCgp1UoWzYpLYpy/PelnW2q3v7nxRyKLS5DvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684445257; a=rsa-sha256; cv=none; b=C/6TNBzJtBV2qKWC/9YoxqhYZmvuM60GY6oq5azlUio37a4sA4pxjUKiznomOnz/HCpFt/ lpNLsR//P1jy9czR7XoYKUAph8n2A3uAWOzXkBkRlbcuBdYD2gf0yqgmmPlZMk6+CKrTVQ 7Rep5plmn6T1qf1nYiJtp2N6d0SNqANfRMAus1+d2M4XmFdtKWrKNOqu3xhAzD1Np2rAqu 3vaI5SI98whPlqF+r0MpT3n7I1MjgcbK5A17jcnyxhCwFeN9WfN0505mts0HEmqFYdze/c ibkCVl38DT4CexX5gJgozobzZKKqCOwfjw0JXVPZM8PYv2JMQ8c4tDdt0t0JMQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QMjk06wR7z11ls for ; Thu, 18 May 2023 21:27:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34ILRaa2019407 for ; Thu, 18 May 2023 21:27:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34ILRaM8019406 for ports-bugs@FreeBSD.org; Thu, 18 May 2023 21:27:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 271498] databases/postgresql15-server: fix build with clang 16 (as system compiler) Date: Thu, 18 May 2023 21:27:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pgsql@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271498 Bug ID: 271498 Summary: databases/postgresql15-server: fix build with clang 16 (as system compiler) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: pgsql@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: pgsql@FreeBSD.org Flags: maintainer-feedback?(pgsql@FreeBSD.org) During an exp-run for llvm 16 (see bug 271047), it turned out that databases/postgresql15-server failed to build with clang 16 as the base system compiler: In file included from llvmjit.c:38: ../../../../src/include/jit/llvmjit_emit.h:112:23: warning: call to undeclared function 'LLVMBuildStructGEP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] LLVMValueRef v_ptr =3D LLVMBuildStructGEP(b, v, idx, ""); ^ ../../../../src/include/jit/llvmjit_emit.h:112:15: error: incompatible integer to pointer conversion initializing 'LLVMValueRef' (aka 'struct LLVMOpaqueValue *') with an expression of type 'int' [-Wint-conversion] LLVMValueRef v_ptr =3D LLVMBuildStructGEP(b, v, idx, ""); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../src/include/jit/llvmjit_emit.h:114:9: warning: call to undecl= ared function 'LLVMBuildLoad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] return LLVMBuildLoad(b, v_ptr, name); ^ ../../../../src/include/jit/llvmjit_emit.h:114:9: error: incompatible int= eger to pointer conversion returning 'int' from a function with result type 'LLVMValueRef' (aka 'struct LLVMOpaqueValue *') [-Wint-conversion] return LLVMBuildLoad(b, v_ptr, name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and many more similar errors. The same applies to the slave ports postgresql11-server, postgresql12-server, postgresql13-server, and postgresql14-server. This is because PostgreSQL's llvmjit support is not yet ready for LLVM 16's API changes. In LLVM 15 functions like LLVMBuildStructGEP were already declared deprecated, but in LLVM 16 these have been removed (and replaced with LLVMBuildStructGEP2, etc). Until PostgreSQL updates their llvmjit for the changed APIs, I would like to reintroduce the LLVM version restriction that was removed in , but slightly adjusted: there is no more need to check for LLVM ports below 10. Another thing that is required is to pass a CLANG variable to the configure script, pointing to the same version that is used for the LLVM bindings. Otherwise, the .bc files will get compiled by the base system compiler, and this can lead to a ThinLTO link error, if the base system compiler is a newer version of llvm. --=20 You are receiving this mail because: You are the assignee for the bug.=