Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build project #26

Closed
yepher opened this issue Aug 30, 2022 · 1 comment
Closed

Failing to build project #26

yepher opened this issue Aug 30, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yepher
Copy link

yepher commented Aug 30, 2022

Environment

  • App version: 4cd2ac9
  • macOS version: 12.3.1 (Non Arm Mac Book Pro)

Bug Information

  • What are you trying to do?: Build Project
  • What's the expected behavior: Build without error
  • What's the actual behavior:
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

@yepher yepher added the bug Something isn't working label Aug 30, 2022
@yepher
Copy link
Author

yepher commented Aug 30, 2022

Doing this fixes the issue:

export PATH=/usr/bin:$PATH

@yepher yepher closed this as completed Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant