Date: Wed, 22 Jul 2020 23:11:02 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: Mark Millard via freebsd-ppc <freebsd-ppc@freebsd.org> Cc: "pkubaj@freebsd.org" <pkubaj@FreeBSD.org>, FreeBSD ports <freebsd-ports@freebsd.org>, Mark Millard <marklmi@yahoo.com> Subject: Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8) Message-ID: <v9if-s1ax-wny@FreeBSD.org> In-Reply-To: <E062392D-1207-48D4-B503-5EC2227D2D20@yahoo.com> (Mark Millard via freebsd-ppc's message of "Tue, 21 Jul 2020 14:37:20 -0700") References: <E062392D-1207-48D4-B503-5EC2227D2D20.ref@yahoo.com> <E062392D-1207-48D4-B503-5EC2227D2D20@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Millard via freebsd-ppc <freebsd-ppc@freebsd.org> writes: > ../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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v9if-s1ax-wny>