homebrew-avr icon indicating copy to clipboard operation
homebrew-avr copied to clipboard

avr-gcc@11 fails to build

Open alexisvl opened this issue 1 year ago • 2 comments

avr-gcc@11 fails to build:

==> make BOOT_LDFLAGS=-Wl,-headerpad_max_install_names
Last 15 lines from /Users/alex/Library/Logs/Homebrew/avr-gcc@11/02.make:
../../gcc/config/avr/avr.c:10243:36: error: assigning to 'unnamed_section_callback' (aka 'void (*)(const char *)') from incompatible type 'void (const void *)': type mismatch at 1st parameter ('const char *' vs 'const void *')
  data_section->unnamed.callback = avr_output_data_section_asm_op;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/config/avr/avr.c:10244:35: error: assigning to 'unnamed_section_callback' (aka 'void (*)(const char *)') from incompatible type 'void (const void *)': type mismatch at 1st parameter ('const char *' vs 'const void *')
  bss_section->unnamed.callback = avr_output_bss_section_asm_op;
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=gnu++11  -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag    -DHAVE_CONFIG_H -I. -Ianalyzer -I../../gcc -I../../gcc/analyzer -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o analyzer/analyzer-selftests.o -MT analyzer/analyzer-selftests.o -MMD -MP -MF analyzer/.deps/analyzer-selftests.TPo ../../gcc/analyzer/analyzer-selftests.cc
clang++ -std=gnu++11  -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag    -DHAVE_CONFIG_H -I. -Ianalyzer -I../../gcc -I../../gcc/analyzer -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o analyzer/bar-chart.o -MT analyzer/bar-chart.o -MMD -MP -MF analyzer/.deps/bar-chart.TPo ../../gcc/analyzer/bar-chart.cc
clang++ -std=gnu++11  -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag    -DHAVE_CONFIG_H -I. -Ianalyzer -I../../gcc -I../../gcc/analyzer -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o analyzer/call-string.o -MT analyzer/call-string.o -MMD -MP -MF analyzer/.deps/call-string.TPo ../../gcc/analyzer/call-string.cc
5 errors generated.
make[2]: *** [avr.o] Error 1

02.make

Full command output:

error.txt

macOS 12.5

clang 13.1.6

Let me know what else I can provide here - I'm pretty new to homebrew

alexisvl avatar Jul 22 '22 02:07 alexisvl

Same problem on a M1 Max MacBook.

==> Installing osx-cross/avr/avr-gcc@11
==> Patching
==> Applying gcc-11.3.0-arm.diff
patching file Makefile.def
patching file Makefile.in
patching file Makefile.tpl
patching file c++tools/config.h.in
patching file c++tools/configure
patching file c++tools/configure.ac
patching file c++tools/resolver.cc
patching file c++tools/resolver.h
patching file c++tools/server.cc
patching file config/gcc-plugin.m4
patching file config/mh-darwin
patching file configure
patching file configure.ac
patching file fixincludes/configure
patching file gcc/Makefile.in
patching file gcc/aclocal.m4
patching file gcc/ada/gcc-interface/Make-lang.in
patching file gcc/ada/gcc-interface/Makefile.in
patching file gcc/ada/gcc-interface/decl.c
patching file gcc/ada/sigtramp-ios.c
patching file gcc/builtins.def
patching file gcc/c-family/c-attribs.c
patching file gcc/c-family/c-opts.c
patching file gcc/c-family/c-pch.c
patching file gcc/c/c-decl.c
patching file gcc/c/c-tree.h
patching file gcc/c/c-typeck.c
patching file gcc/calls.c
patching file gcc/calls.h
patching file gcc/common.opt
patching file gcc/config.gcc
patching file gcc/config.host
patching file gcc/config.in
patching file gcc/config/aarch64/aarch64-builtins.c
patching file gcc/config/aarch64/aarch64-c.c
patching file gcc/config/aarch64/aarch64-protos.h
patching file gcc/config/aarch64/aarch64-sve-builtins.cc
patching file gcc/config/aarch64/aarch64.c
patching file gcc/config/aarch64/aarch64.h
patching file gcc/config/aarch64/aarch64.md
patching file gcc/config/aarch64/aarch64.opt
patching file gcc/config/aarch64/constraints.md
patching file gcc/config/aarch64/darwin.h
patching file gcc/config/aarch64/darwinpcs.md
patching file gcc/config/aarch64/falkor-tag-collision-avoidance.c
patching file gcc/config/aarch64/host-aarch64-darwin.c
patching file gcc/config/aarch64/predicates.md
patching file gcc/config/aarch64/t-aarch64-darwin
patching file gcc/config/aarch64/x-darwin
patching file gcc/config/avr/avr.c
patching file gcc/config/darwin-driver.c
patching file gcc/config/darwin.c
patching file gcc/config/darwin.h
patching file gcc/config/darwin.opt
patching file gcc/config/host-darwin.c
patching file gcc/config/host-darwin.h
patching file gcc/config/host-hpux.c
patching file gcc/config/host-linux.c
patching file gcc/config/host-netbsd.c
patching file gcc/config/host-openbsd.c
patching file gcc/config/host-solaris.c
patching file gcc/config/i386/darwin.h
patching file gcc/config/i386/host-mingw32.c
patching file gcc/config/i386/i386.c
patching file gcc/config/i386/i386.h
patching file gcc/config/pa/pa.c
patching file gcc/config/rs6000/rs6000.c
patching file gcc/configure
patching file gcc/configure.ac
patching file gcc/coretypes.h
patching file gcc/cp/call.c
patching file gcc/cp/class.c
patching file gcc/cp/cp-tree.h
patching file gcc/cp/decl.c
patching file gcc/cp/decl.h
patching file gcc/cp/decl2.c
patching file gcc/cp/g++spec.c
patching file gcc/cp/module.cc
patching file gcc/cp/name-lookup.c
patching file gcc/cp/parser.c
patching file gcc/cp/typeck.c
patching file gcc/cp/typeck2.c
patching file gcc/cumulative-args.h
patching file gcc/d/d-spec.cc
patching file gcc/doc/extend.texi
patching file gcc/doc/gty.texi
patching file gcc/doc/invoke.texi
patching file gcc/doc/tm.texi
patching file gcc/doc/tm.texi.in
patching file gcc/function.c
patching file gcc/function.h
patching file gcc/gcc.c
patching file gcc/gengtype-state.c
patching file gcc/gengtype.c
patching file gcc/gengtype.h
patching file gcc/ggc-common.c
patching file gcc/ggc-tests.c
patching file gcc/ggc.h
patching file gcc/ginclude/stddef.h
patching file gcc/hash-map.h
patching file gcc/hash-set.h
patching file gcc/hash-table.h
patching file gcc/hash-traits.h
patching file gcc/hosthooks-def.h
patching file gcc/hosthooks.h
patching file gcc/jit/Make-lang.in
patching file gcc/machmode.h
patching file gcc/objc/objc-act.c
patching file gcc/objc/objc-next-metadata-tags.h
patching file gcc/objc/objc-next-runtime-abi-01.c
patching file gcc/objc/objc-next-runtime-abi-02.c
patching file gcc/objc/objc-runtime-shared-support.c
patching file gcc/output.h
patching file gcc/poly-int.h
patching file gcc/print-tree.c
patching file gcc/stringpool.c
patching file gcc/target.def
patching file gcc/target.h
patching file gcc/targhooks.c
patching file gcc/targhooks.h
patching file gcc/testsuite/g++.dg/abi/aarch64_guard1.C
patching file gcc/testsuite/g++.dg/abi/arm_va_list.C
patching file gcc/testsuite/g++.dg/ext/arm-bf16/bf16-mangle-aarch64-1.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-1.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-2.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-3.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-4.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-5.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-6.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-7.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-8.C
patching file gcc/testsuite/g++.dg/ext/attr-unavailable-9.C
patching file gcc/testsuite/g++.dg/modules/bad-mapper-1.C
patching file gcc/testsuite/g++.dg/torture/darwin-cfstring-3.C
patching file gcc/testsuite/g++.target/aarch64/no_unique_address_1.C
patching file gcc/testsuite/g++.target/aarch64/no_unique_address_2.C
patching file gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp
patching file gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
patching file gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp
patching file gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
patching file gcc/testsuite/gcc.dg/attr-aligned.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-1.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-2.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-3.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-4.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-5.c
patching file gcc/testsuite/gcc.dg/attr-unavailable-6.c
patching file gcc/testsuite/gcc.dg/builtin-apply2.c
patching file gcc/testsuite/gcc.dg/cwsc1.c
patching file gcc/testsuite/gcc.dg/darwin-aligned-globals.c
patching file gcc/testsuite/gcc.dg/darwin-comm-1.c
patching file gcc/testsuite/gcc.dg/darwin-segaddr.c
patching file gcc/testsuite/gcc.dg/pr26427.c
patching file gcc/testsuite/gcc.dg/pubtypes-2.c
patching file gcc/testsuite/gcc.dg/pubtypes-3.c
patching file gcc/testsuite/gcc.dg/pubtypes-4.c
patching file gcc/testsuite/gcc.dg/tls/pr78796.c
patching file gcc/testsuite/gcc.dg/torture/darwin-cfstring-3.c
patching file gcc/testsuite/gcc.dg/torture/pr100786.c
patching file gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
patching file gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c
patching file gcc/testsuite/gcc.dg/tree-ssa/stdarg-4.c
patching file gcc/testsuite/gcc.dg/tree-ssa/stdarg-5.c
patching file gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_dup.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_get.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_reinterpret.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfcvt-compile.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfcvt-nosimd.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfcvtnq2-untied.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfmlalbt-compile.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfmmla-compile.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
patching file gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
patching file gcc/testsuite/gcc.target/aarch64/arm_align_max_pwr.c
patching file gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
patching file gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
patching file gcc/testsuite/gcc.target/aarch64/c-output-template-4.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/aarch64-darwin.exp
patching file gcc/testsuite/gcc.target/aarch64/darwin/complex-in-regs.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d1.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d2-00.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d2-01.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d2-02.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d2-03.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d2-04.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d3.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/darwinpcs-d4.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/float128-00.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/homogeneous-aggr.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/k+r-00.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/tu-accesses-0.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/variadic-00.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/variadic-01.c
patching file gcc/testsuite/gcc.target/aarch64/darwin/variadic-02.c
patching file gcc/testsuite/gcc.target/aarch64/dbl_mov_immediate_1.c
patching file gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
patching file gcc/testsuite/gcc.target/aarch64/inline-lrint_1.c
patching file gcc/testsuite/gcc.target/aarch64/ldp_stp_13.c
patching file gcc/testsuite/gcc.target/aarch64/memset-corner-cases.c
patching file gcc/testsuite/gcc.target/aarch64/no-inline-lrint_1.c
patching file gcc/testsuite/gcc.target/aarch64/pr62308.c
patching file gcc/testsuite/gcc.target/aarch64/pr78255.c
patching file gcc/testsuite/gcc.target/aarch64/pr78561.c
patching file gcc/testsuite/gcc.target/aarch64/pr80295.c
patching file gcc/testsuite/gcc.target/aarch64/pr87305.c
patching file gcc/testsuite/gcc.target/aarch64/pr92424-1.c
patching file gcc/testsuite/gcc.target/aarch64/pr94201.c
patching file gcc/testsuite/gcc.target/aarch64/pr94577.c
patching file gcc/testsuite/gcc.target/aarch64/pr97535.c
patching file gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-2.c
patching file gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-3.c
patching file gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute.c
patching file gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
patching file gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
patching file gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c
patching file gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
patching file gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
patching file gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp
patching file gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
patching file gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp
patching file gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
patching file gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp
patching file gcc/testsuite/gcc.target/aarch64/symbol-range-tiny.c
patching file gcc/testsuite/gcc.target/aarch64/uaddw-3.c
patching file gcc/testsuite/gcc.target/i386/memcpy-strategy-10.c
patching file gcc/testsuite/gcc.target/i386/memcpy-strategy-5.c
patching file gcc/testsuite/gcc.target/i386/memset-strategy-5.c
patching file gcc/testsuite/gcc.target/i386/memset-strategy-7.c
patching file gcc/testsuite/gcc.target/i386/pr89261.c
patching file gcc/testsuite/gfortran.dg/coarray/caf.exp
patching file gcc/testsuite/gfortran.dg/dg.exp
patching file gcc/testsuite/gfortran.dg/pr95690.f90
patching file gcc/testsuite/lib/asan-dg.exp
patching file gcc/testsuite/lib/atomic-dg.exp
patching file gcc/testsuite/lib/scanasm.exp
patching file gcc/testsuite/lib/target-libpath.exp
patching file gcc/testsuite/lib/target-supports.exp
patching file gcc/testsuite/obj-c++.dg/attributes/method-unavailable-1.mm
patching file gcc/testsuite/obj-c++.dg/attributes/method-unavailable-2.mm
patching file gcc/testsuite/obj-c++.dg/attributes/method-unavailable-3.mm
patching file gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm
patching file gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm
patching file gcc/testsuite/obj-c++.dg/pr101666-0.mm
patching file gcc/testsuite/obj-c++.dg/pr101666-1.mm
patching file gcc/testsuite/obj-c++.dg/pr101666.inc
patching file gcc/testsuite/obj-c++.dg/property/at-property-unavailable-1.mm
patching file gcc/testsuite/obj-c++.dg/property/at-property-unavailable-2.mm
patching file gcc/testsuite/obj-c++.dg/property/dotsyntax-unavailable-1.mm
patching file gcc/testsuite/obj-c++.dg/torture/strings/const-cfstring-4.mm
patching file gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
patching file gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
patching file gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
patching file gcc/testsuite/objc.dg/attributes/method-unavailable-1.m
patching file gcc/testsuite/objc.dg/attributes/method-unavailable-2.m
patching file gcc/testsuite/objc.dg/attributes/method-unavailable-3.m
patching file gcc/testsuite/objc.dg/gnu-api-2-class-meta.m
patching file gcc/testsuite/objc.dg/gnu-api-2-class.m
patching file gcc/testsuite/objc.dg/pr101666-0.m
patching file gcc/testsuite/objc.dg/pr101666-1.m
patching file gcc/testsuite/objc.dg/pr101666.inc
patching file gcc/testsuite/objc.dg/property/at-property-unavailable-1.m
patching file gcc/testsuite/objc.dg/property/at-property-unavailable-2.m
patching file gcc/testsuite/objc.dg/property/dotsyntax-unavailable-1.m
patching file gcc/testsuite/objc.dg/torture/strings/const-cfstring-4.m
patching file gcc/testsuite/objc.dg/torture/strings/const-str-10.m
patching file gcc/testsuite/objc.dg/torture/strings/const-str-11.m
patching file gcc/testsuite/objc.dg/torture/strings/const-str-9.m
patching file gcc/tree-cfg.c
patching file gcc/tree-core.h
patching file gcc/tree-nested.c
patching file gcc/tree.c
patching file gcc/tree.h
patching file gcc/value-range.h
patching file gcc/varasm.c
patching file gcc/vec.h
patching file gcc/wide-int.h
patching file libatomic/Makefile.am
patching file libatomic/Makefile.in
patching file libatomic/configure
patching file libatomic/configure.ac
patching file libatomic/testsuite/Makefile.in
patching file libatomic/testsuite/lib/libatomic.exp
patching file libbacktrace/configure
patching file libbacktrace/configure.ac
patching file libcc1/Makefile.am
patching file libcc1/Makefile.in
patching file libcc1/configure
patching file libcc1/configure.ac
patching file libcody/netclient.cc
patching file libcpp/include/line-map.h
patching file libffi/Makefile.am
patching file libffi/Makefile.in
patching file libffi/configure
patching file libffi/configure.ac
patching file libgcc/config.host
patching file libgcc/config/aarch64/heap-trampoline.c
patching file libgcc/config/aarch64/lse.S
patching file libgcc/config/aarch64/sfp-machine.h
patching file libgcc/config/aarch64/t-darwin
patching file libgcc/config/aarch64/t-heap-trampoline
patching file libgcc/config/i386/heap-trampoline.c
patching file libgcc/config/i386/t-heap-trampoline
patching file libgcc/config/t-darwin
patching file libgcc/config/t-darwin-min-1
patching file libgcc/config/t-darwin-min-4
patching file libgcc/config/t-darwin-min-5
patching file libgcc/config/t-darwin-min-8
patching file libgcc/config/t-darwin-rpath
patching file libgcc/config/t-slibgcc-darwin
patching file libgcc/configure
patching file libgcc/configure.ac
patching file libgcc/libgcc-std.ver.in
patching file libgcc/libgcc2.h
patching file libgfortran/Makefile.am
patching file libgfortran/Makefile.in
patching file libgfortran/config/fpu-aarch64.h
patching file libgfortran/configure
patching file libgfortran/configure.ac
patching file libgfortran/configure.host
patching file libgfortran/kinds-override.h
patching file libgfortran/libgfortran.spec.in
patching file libgfortran/mk-kinds-h.sh
patching file libgo/configure
patching file libgo/configure.ac
patching file libgomp/Makefile.am
patching file libgomp/Makefile.in
patching file libgomp/configure
patching file libgomp/configure.ac
patching file libiberty/aclocal.m4
patching file libiberty/configure
patching file libiberty/configure.ac
patching file libiberty/simple-object-mach-o.c
patching file libitm/Makefile.am
patching file libitm/Makefile.in
patching file libitm/config/aarch64/sjlj.S
patching file libitm/configure
patching file libitm/configure.ac
patching file libitm/configure.tgt
patching file libitm/testsuite/lib/libitm.exp
patching file libitm/testsuite/libitm.c++/c++.exp
patching file libobjc/Makefile.in
patching file libobjc/configure
patching file libobjc/configure.ac
patching file liboffloadmic/configure
patching file liboffloadmic/configure.ac
patching file liboffloadmic/plugin/Makefile.in
patching file liboffloadmic/plugin/aclocal.m4
patching file liboffloadmic/plugin/configure
patching file liboffloadmic/plugin/configure.ac
patching file libphobos/configure
patching file libphobos/configure.ac
patching file libphobos/libdruntime/Makefile.am
patching file libphobos/libdruntime/Makefile.in
patching file libphobos/libdruntime/gcc/emutls.d
patching file libphobos/libdruntime/gcc/unwind/generic.d
patching file libphobos/src/Makefile.am
patching file libphobos/src/Makefile.in
patching file libphobos/testsuite/lib/libphobos.exp
patching file libphobos/testsuite/testsuite_flags.in
patching file libquadmath/Makefile.am
patching file libquadmath/Makefile.in
patching file libquadmath/configure
patching file libquadmath/configure.ac
patching file libsanitizer/asan/Makefile.am
patching file libsanitizer/asan/Makefile.in
patching file libsanitizer/configure
patching file libsanitizer/configure.ac
patching file libsanitizer/hwasan/Makefile.am
patching file libsanitizer/hwasan/Makefile.in
patching file libsanitizer/lsan/Makefile.am
patching file libsanitizer/lsan/Makefile.in
patching file libsanitizer/tsan/Makefile.am
patching file libsanitizer/tsan/Makefile.in
patching file libsanitizer/ubsan/Makefile.am
patching file libsanitizer/ubsan/Makefile.in
patching file libssp/Makefile.am
patching file libssp/Makefile.in
patching file libssp/configure
patching file libssp/configure.ac
patching file libstdc++-v3/configure
patching file libstdc++-v3/configure.ac
patching file libstdc++-v3/src/Makefile.am
patching file libstdc++-v3/src/Makefile.in
patching file libtool.m4
patching file libvtv/configure
patching file libvtv/configure.ac
patching file lto-plugin/Makefile.in
patching file lto-plugin/configure
patching file lto-plugin/configure.ac
patching file zlib/configure
patching file zlib/configure.ac
==> ../configure --target=avr --prefix=/opt/homebrew/Cellar/avr-gcc@11/11.3.0 --libdir=/opt/homebrew/Cellar/avr-gcc@11/1
==> make BOOT_LDFLAGS=-Wl,-headerpad_max_install_names
Last 15 lines from /Users/45gfg9/Library/Logs/Homebrew/avr-gcc@11/02.make:
    readonly_data_section->unnamed.callback = avr_output_data_section_asm_op;
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/config/avr/avr.c:10243:36: error: assigning to 'unnamed_section_callback' (aka 'void (*)(const char *)') from incompatible type 'void (const void *)': type mismatch at 1st parameter ('const char *' vs 'const void *')
  data_section->unnamed.callback = avr_output_data_section_asm_op;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/config/avr/avr.c:10244:35: error: assigning to 'unnamed_section_callback' (aka 'void (*)(const char *)') from incompatible type 'void (const void *)': type mismatch at 1st parameter ('const char *' vs 'const void *')
  bss_section->unnamed.callback = avr_output_bss_section_asm_op;
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=gnu++11  -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag    -DHAVE_CONFIG_H -I. -Ianalyzer -I../../gcc -I../../gcc/analyzer -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o analyzer/complexity.o -MT analyzer/complexity.o -MMD -MP -MF analyzer/.deps/complexity.TPo ../../gcc/analyzer/complexity.cc
5 errors generated.
make[2]: *** [avr.o] Error 1
make[2]: *** Waiting for unfinished jobs....
rm gcc.pod
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
avr-gcc@11 fails to build https://github.com/osx-cross/homebrew-avr/issues/280

Same version macOS and clang.

$ clang -v
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

45gfg9 avatar Aug 18 '22 06:08 45gfg9

Same here.

luqasz avatar Sep 12 '22 21:09 luqasz

I was able to fix it for me by applying this patch: https://gist.github.com/jmechnich/5a31cf9c2ae8336109f48abd3e5488a0

You can brew edit avr-gcc@11 and add the following to the formula locally:

diff --git a/Formula/[email protected] b/Formula/[email protected]
index e8a0160..9e06fe9 100644
--- a/Formula/[email protected]
+++ b/Formula/[email protected]
@@ -65,6 +65,10 @@ class AvrGccAT11 < Formula
       url "https://raw.githubusercontent.com/Homebrew/formula-patches/22dec3fc/gcc/gcc-11.3.0-arm.diff"
       sha256 "e02006b7ec917cc1390645d95735a6a866caed0dfe506d5bef742f7862cab218"
     end
+    patch do
+      url "https://gist.githubusercontent.com/jmechnich/5a31cf9c2ae8336109f48abd3e5488a0/raw/e42700b3519a31a06dbdc6095a11e6d101fb75f3/[email protected]"
+      sha256 "79232a7dcbe71bcf4a0cc52e84cd509553d7b40b887771eec06ac340f5f502f6"
+    end
   end
 
   def version_suffix

Not really sure how / where I could submit this...

jmechnich avatar Oct 08 '22 19:10 jmechnich

fwiw, this has been already fixed on GCC's side (https://github.com/gcc-mirror/gcc/commit/4dc6d19222581c77a174d44d97507d234fb7e39b) 🙂

Patryk27 avatar Feb 17 '23 15:02 Patryk27

@Patryk27 could you make a PR? :)

ladislas avatar Feb 17 '23 19:02 ladislas

Judging from the commit message in the link above, It looks like this has only been fixed in gcc 12.1 and up though.

This still has to be backported to 11.x for GCC (and there does not seem to be an easy way to submit a PR to them).

jmechnich avatar Feb 18 '23 08:02 jmechnich

Ah, right, yes - it's GCC 12.

and there does not seem to be an easy way to submit a PR to them

Yeah, for this reason Nixpkgs also just incorporates this patch locally (https://github.com/NixOS/nixpkgs/pull/208657).

Patryk27 avatar Feb 18 '23 19:02 Patryk27

As nothing happened upstream since my post from Oct 2022, I have now submitted a PR to this repo.

I have no idea if it would have been more appropriate to put the patch into Homebrew/formula-patches but there you go...

jmechnich avatar Feb 19 '23 16:02 jmechnich

The most recent commits have fixed this issue for me (on macOS 13 arm64). Thanks @ladislas !

jmechnich avatar Feb 27 '23 17:02 jmechnich

glad to hear! I'll close the issue for now, feel free to open a new one if needed.

ladislas avatar Feb 27 '23 23:02 ladislas