From owner-freebsd-ports@freebsd.org Thu Jul 23 00:17:05 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED13F36511A for ; Thu, 23 Jul 2020 00:17:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-55.consmr.mail.gq1.yahoo.com (sonic315-55.consmr.mail.gq1.yahoo.com [98.137.65.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBtDw67xrz3Rsx for ; Thu, 23 Jul 2020 00:17:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Jx8lYhMVM1nAQWnjwiRFlwCvWBtu2KGLZGgv9WAGQikhLUIMwdIURw8brOxS_Jd szCwrMQcEfuM0sI1vEC1tKxDUoLPirjXlv7OwukBD3jPV.r7WzP_uPyehXaaZXoj.6zgtmBJWrRe FJ6zLkkQwn6yCJ7AG210384MAqrP8.faDqGh2ConW26P2gRZLmMZn6XvFvnZjU88Jox12Xz0SLua 5WEn5J2z9urJJAvBEUdvdCgRbnLWoLSkwC34.tZZuaa5X7zO0R2hbDY.jva1dZq0zIFppbemTfjq R4IeKez28OciSsMbDi7xle7UGfsQ0zizYpM2E4nAANNCnpSZdjjdfqe26OS1NN_z3bdZxLmPfGbF srb.CfJ547aZyb17qT1_jEoDSGZSOAQVi6L0b8AxGEh5req6A9tMMDZjc2itMVzNq94g2dAM2zxg bp.grtAWjeIaYmBM_PhnKR39WX71xLL3pBG7j1xOtES3c5ydsD0M6XnnqJ4ihx2HU7i.IqmsHJXY B8yL0ydO4PwmWAzougs6vbwgUX5DP..aRHnia7okj9PsfFSQd6YKE_EU1H5_QvtuR9E4nav3cXQ6 t40n9FfVVhx8DWRjoIVr2brl6sUcay8_Roc9wA0seC_MBN8E3WMYTmbrTqOtrPLyKV1UHiim_edP c3Vr.NZkCWYpAVN2CgE6A4dzNFn74MYYmxsLXj60hmAugpO2K5K_rtO2S6lLDzu4hyFVDS5vv4o4 Qrn7qzwUQ_Qv2t4XtFcgMmChbID9QxpfrgnIqeahfJGNA0hzLhMoD3dAebUQzDjikO01JdFH4Jxi VuoXbVbWtgXYs3TvmpbcS_VFvMGKCSeFjSuUPbBTwuwmEl7HzglSr2UED7ccvqa.B4jCHJidZtBK m3HGGot5orLXI7K2hr_3lkrgAzP4g45PF8BGQ4XUk6wH5rTxT0BclMsRWs6AdTyciIDvZSQiMeY8 UUbkWW3Or0mt_W_pu5FCmA5UThxMJJjbY_LVlWlSyWenXRKe1E0rGcYPzXu.m1OWlgOqpqxydamS B9vQkbiZW7m9s_qPi_Kf3lCE4fFREnl1QQWZ1zw7uH.DAkkE679eupS5orS4UqU9pVOjrguZcQO1 ysG4YhAF.YtDtXPpDcXlNv2pvNZMXuUdXHlt1m1dET8S9B0GM2blAHOT7yIkWrv60tw.0Dy_PzEJ 3iE8ObGHcGgmm6E3Wely1QKaZpLQWbi0dc5C6Ka5PR1uhLcpPZ7PyVswpa.EHeM2kmPCavx.4IKM wujLzo5CqYu6QnMuCFeENsvBHR8_jf9cyt23TVhG.T.KxvPcp0QKKkMIqMxEzh8LIW.RgOQw7WNF DUn0yrXV5s1ogvT_JtUtSMB2AllNSfuJ5fR5p5fo6SG9opljzD1eNVApbbWCp7USiPdbZBlQ1owy Q2w09gsp7AMOXiJKSa24AyyKuJ44- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Thu, 23 Jul 2020 00:17:01 +0000 Received: by smtp427.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7d10434794c546107b6fdb372008b1ec; Thu, 23 Jul 2020 00:16:59 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8) From: Mark Millard In-Reply-To: Date: Wed, 22 Jul 2020 17:16:59 -0700 Cc: "pkubaj@freebsd.org" , FreeBSD ports Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Jan Beich X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4BBtDw67xrz3Rsx X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.74 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.24)[-0.241]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.008]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-0.99)[-0.992]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.31:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 00:17:06 -0000 On 2020-Jul-22, at 14:11, Jan Beich wrote: > Mark Millard via freebsd-ppc writes: >=20 >> ../src/util/u_atomic.c:38:1: error: cannot redeclare builtin function = '__sync_add_and_fetch_8' >> __sync_add_and_fetch_8(uint64_t *ptr, uint64_t val) >> ^ >> ../src/util/u_atomic.c:38:1: note: '__sync_add_and_fetch_8' is a = builtin with type 'long long (volatile long long *, long long, ...)' >> ../src/util/u_atomic.c:38:1: error: definition of builtin function = '__sync_add_and_fetch_8' >> __sync_add_and_fetch_8(uint64_t *ptr, uint64_t val) >> ^ >> ../src/util/u_atomic.c:51:1: error: cannot redeclare builtin function = '__sync_sub_and_fetch_8' >> __sync_sub_and_fetch_8(uint64_t *ptr, uint64_t val) >> ^ >> ../src/util/u_atomic.c:51:1: note: '__sync_sub_and_fetch_8' is a = builtin with type 'long long (volatile long long *, long long, ...)' >> ../src/util/u_atomic.c:51:1: error: definition of builtin function = '__sync_sub_and_fetch_8' >> __sync_sub_and_fetch_8(uint64_t *ptr, uint64_t val) >> ^ >> ../src/util/u_atomic.c:64:1: error: cannot redeclare builtin function = '__sync_val_compare_and_swap_8' >> __sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, = uint64_t newval) >> ^ >> ../src/util/u_atomic.c:64:1: note: '__sync_val_compare_and_swap_8' is = a builtin with type 'long long (volatile long long *, long long, long = long, ...)' >> ../src/util/u_atomic.c:64:1: error: definition of builtin function = '__sync_val_compare_and_swap_8' >> __sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, = uint64_t newval) >> ^ >> 6 errors generated. >=20 > Try replacing files/patch-i386 with = https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5464 > On i386 (clang) one can sometimes avoid -latomic by bumping -march > (FreeBSD 11.4/12.2/13.0 defaults to i686) but powerpc (gcc) probably > can't use __sync* with 64-bit types without -latomic, making Meson > define MISSING_64BIT_ATOMICS to use src/util/u_atomic.c The context was head (so system-clang instead of gcc 4.2.1). But, looking in the logs, it seems to have used an odd mix of system-clang and devel/lvm80 materials: . . . Project name: mesa Project version: 19.0.8 Using 'CC' from environment with value: 'cc' Using 'CFLAGS' from environment with value: '-O2 -pipe -g = -fstack-protector-strong -fno-strict-aliasing ' Using 'LDFLAGS' from environment with value: ' = -Wl,-rpath=3D/usr/local/llvm80/lib -fstack-protector-strong ' Using 'CPPFLAGS' from environment with value: '' Using 'CXX' from environment with value: 'c++' Using 'CXXFLAGS' from environment with value: '-O2 -pipe -g = -fstack-protector-strong -fno-strict-aliasing ' Using 'LDFLAGS' from environment with value: ' = -Wl,-rpath=3D/usr/local/llvm80/lib -fstack-protector-strong ' Using 'CPPFLAGS' from environment with value: '' Using 'CC' from environment with value: 'cc' Using 'CFLAGS' from environment with value: '-O2 -pipe -g = -fstack-protector-strong -fno-strict-aliasing ' Using 'LDFLAGS' from environment with value: ' = -Wl,-rpath=3D/usr/local/llvm80/lib -fstack-protector-strong ' Using 'CPPFLAGS' from environment with value: '' C compiler for the host machine: cc (clang 10.0.1 "FreeBSD clang version = 10.0.1 (git@github.com:llvm/llvm-project.git = llvmorg-10.0.1-rc2-0-g77d76b71d7d)") C linker for the host machine: cc ld.lld 10.0.1 Using 'CXX' from environment with value: 'c++' Using 'CXXFLAGS' from environment with value: '-O2 -pipe -g = -fstack-protector-strong -fno-strict-aliasing ' Using 'LDFLAGS' from environment with value: ' = -Wl,-rpath=3D/usr/local/llvm80/lib -fstack-protector-strong ' Using 'CPPFLAGS' from environment with value: '' C++ compiler for the host machine: c++ (clang 10.0.1 "FreeBSD clang = version 10.0.1 (git@github.com:llvm/llvm-project.git = llvmorg-10.0.1-rc2-0-g77d76b71d7d)") C++ linker for the host machine: c++ ld.lld 10.0.1 Host machine cpu family: ppc Host machine cpu: powerpc . . . llvm-config found: YES (/usr/local/bin/llvm-config80) 8.0.1 Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, = bitwriter, engine, ipo, mcdisassembler, mcjit, native) found: YES 8.0.1 . . . cc . . . -DHAVE_LLVM=3D0x0800 -DMESA_LLVM_VERSION_PATCH=3D1 . . . -c = ../src/util/u_atomic.c . . . The system-clang devel/llvm80 mix seems to be at least declaring __sync_add_and_fetch_8 , __sync_sub_and_fetch_8 , and __sync_val_compare_and_swap_8 as builtin, possibly implicitly. At this point I'm unclear if: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5464 is relevant. The system-clang and devel/llvm80 mix just does not seem the right kind of thing to be doing in the build. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)