Closed yepher closed 2 years ago
12.3.1
cd ./HTMLConverter/ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build --buildmode=c-archive -ldflags "-s -w" -o ./htmlconverter-amd64.a GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build --buildmode=c-archive -ldflags "-s -w" -o ./htmlconverter-arm64.a lipo -create -output htmlconverter.a htmlconverter-amd64.a htmlconverter-arm64.a cp htmlconverter-amd64.h htmlconverter.h # github.com/chamburr/glance /usr/local/go/pkg/tool/darwin_amd64/link: running ar failed: exit status 1 /opt/local/bin/ranlib: object: $WORK/b001/exe/a.out.a(go.o) malformed object (unknown load command 1) ar: internal ranlib command failed # runtime/cgo gcc_arm64.S:28:16: error: brackets expression not supported on this target stp x29, x30, [sp, #-96]! ^ gcc_arm64.S:32:2: error: unknown use of instruction mnemonic without a size suffix mov x29, sp ^ gcc_arm64.S:34:16: error: brackets expression not supported on this target stp x19, x20, [sp, #80] ^ gcc_arm64.S:37:16: error: brackets expression not supported on this target stp x21, x22, [sp, #64] ^ gcc_arm64.S:40:16: error: brackets expression not supported on this target stp x23, x24, [sp, #48] ^ gcc_arm64.S:43:16: error: brackets expression not supported on this target stp x25, x26, [sp, #32] ^ gcc_arm64.S:46:16: error: brackets expression not supported on this target stp x27, x28, [sp, #16] ^ gcc_arm64.S:50:2: error: unknown use of instruction mnemonic without a size suffix mov x19, x0 ^ gcc_arm64.S:51:2: error: unknown use of instruction mnemonic without a size suffix mov x20, x1 ^ gcc_arm64.S:52:2: error: unknown use of instruction mnemonic without a size suffix mov x0, x2 ^ gcc_arm64.S:54:2: error: invalid instruction mnemonic 'blr' blr x20 ^~~ gcc_arm64.S:55:2: error: invalid instruction mnemonic 'blr' blr x19 ^~~ gcc_arm64.S:57:16: error: brackets expression not supported on this target ldp x27, x28, [sp, #16] ^ gcc_arm64.S:60:16: error: brackets expression not supported on this target ldp x25, x26, [sp, #32] ^ gcc_arm64.S:63:16: error: brackets expression not supported on this target ldp x23, x24, [sp, #48] ^ gcc_arm64.S:66:16: error: brackets expression not supported on this target ldp x21, x22, [sp, #64] ^ gcc_arm64.S:69:16: error: brackets expression not supported on this target ldp x19, x20, [sp, #80] ^ gcc_arm64.S:72:16: error: brackets expression not supported on this target ldp x29, x30, [sp], #96 ^ fatal error: lipo: can't open input file: htmlconverter-amd64.a (No such file or directory) cp: htmlconverter-amd64.h: No such file or directory
Doing this fixes the issue:
export PATH=/usr/bin:$PATH
Environment
12.3.1
(Non Arm Mac Book Pro)Bug Information