Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
On 2020-Jul-23, at 09:25, Mark Millard wrote: > > On 2020-Jul-22, at 21:02, Mark Millard wrote: > >> On 2020-Jul-22, at 17:16, Mark Millard wrote: >> >>> On 2020-Jul-22, at 14:11, Jan Beich wrote: >>> Mark Millard via freebsd-ppc 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 >>> >>> 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=/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=/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=/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 (g...@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=/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 (g...@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=0x0800 -DMESA_LLVM_VERSION_PATCH=1 . . . -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: >>> >>>
Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
On 2020-Jul-22, at 21:02, Mark Millard wrote: > On 2020-Jul-22, at 17:16, Mark Millard wrote: > >> On 2020-Jul-22, at 14:11, Jan Beich wrote: >> >>> Mark Millard via freebsd-ppc 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 >> >> 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=/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=/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=/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 (g...@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=/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 (g...@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=0x0800 -DMESA_LLVM_VERSION_PATCH=1 . . . -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
Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
On 2020-Jul-22, at 17:16, Mark Millard wrote: > On 2020-Jul-22, at 14:11, Jan Beich wrote: > >> Mark Millard via freebsd-ppc 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 > > 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=/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=/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=/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 (g...@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=/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 (g...@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=0x0800 -DMESA_LLVM_VERSION_PATCH=1 . . . -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. > I'm not sure how analogous gecko is but I'll note that /usr/ports/Mk/bsd.gecko.mk has the related and additional logic: BUILD_DEPENDS+=
Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
On 2020-Jul-22, at 14:11, Jan Beich wrote: > Mark Millard via freebsd-ppc 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 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=/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=/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=/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 (g...@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=/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 (g...@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=0x0800 -DMESA_LLVM_VERSION_PATCH=1 . . . -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. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: 32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
Mark Millard via freebsd-ppc 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 ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
32-bit powerpc graphics/mesa-dri build failure (poudriere based): "error: cannot redeclare builtin function" (e.g., __sync_add_and_fetch_8)
The error report material was: cc -Isrc/util/ed6d25d@@mesa_util@sta -Isrc/util -I../src/util -Iinclude -I../include -Isrc -I../src -Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -I../src/gallium/include -Isrc/gallium/auxiliary - I../src/gallium/auxiliary -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERS ION="19.0.8"' '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa;' -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DI RECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DDEBUG -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTR IBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -D_GNU_SOURCE -DUSE_GCC_ATOM IC_BUILTINS -DMISSING_64BIT_ATOMICS -DHAVE_SYS_SYSCTL_H -DHAVE_XLOCALE_H -DHAVE_DLFCN_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_STRTOD_L -DHA VE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_LIBDRM -DHAVE_LLVM=0x0800 -DMESA_LLVM_VERSION_PATCH=1 -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -fno-math-errno -fno-trapping-math -Qunused-arguments -Wno-missing-field-initializers -O2 -g -fstack-protector-stro ng -fno-strict-aliasing -fPIC -pthread -Werror=pointer-arith -Werror=vla -fvisibility=hidden -MD -MQ 'src/util/ed6d25d@@mesa_util@sta/u_atomic.c.o' -MF 'src/util/ed6d25d@@mesa_util@sta/u_atomic.c.o.d' -o 'src/util/ed6d25d@@mesa_util@sta/u_atomic.c.o' -c ../src/util/u_atomic.c ../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. # poudriere jail -l JAILNAME VERSION ARCH METHOD TIMESTAMP PATH FBSDpowerpc 13.0-CURRENT powerpc null 2019-12-31 01:21:28 /usr/obj/DESTDIRs/clang-powerpc-installworld-poud FBSDpowerpc64 13.0-CURRENT powerpc.powerpc64 null 2020-01-01 15:22:36 /usr/obj/DESTDIRs/clang-powerpc64-installworld-poud FBSDpowerpc was in use on/under: # uname -apKU FreeBSD FBSDG5L2 13.0-CURRENT FreeBSD 13.0-CURRENT #7 r363123M: Sun Jul 12 03:06:20 PDT 2020 markmi@FBSDFHUGE:/usr/obj/powerpc64vtsc_clang/powerpc.powerpc64/usr/src/powerpc.powerpc64/sys/GENERIC64vtsc-NODBG powerpc powerpc64 1300101 1300101 # svnlite info /usr/ports Path: /usr/ports Working Copy Root Path: /usr/ports URL: svn://svn.freebsd.org/ports/head Relative URL: ^/head Repository Root: svn://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 542111 Node Kind: directory Schedule: normal Last Changed Author: vanilla Last Changed Rev: 542111 Last Changed Date: 2020-07-12 21:32:18 -0700 (Sun, 12 Jul 2020) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ freebsd-ports@freebsd.org mailing list