wails: mac wails build error
Description
wails build error tips:Wails CLI v2.3.1
Build Options
Platform(s) | darwin/amd64
Compiler | /usr/local/go/bin/go
Skip Bindings | false
Build Mode | production
Frontend Directory | /*******/frontend
Obfuscated | false
Skip Frontend | false
Compress | false
Package | true
Clean Bin Dir | false
LDFlags |
Tags | []
Race Detector | false
Warning: go.mod is using Wails ‘2.1.0’ but the CLI is ‘v2.3.1’. Consider updating your project’s go.mod file.
Building target: darwin/amd64
• Generating bindings: ERROR
# algo-benchmark
/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
ld: file too small (length=0) file ‘/var/folders/q2/867r3wd554s8dv7bg9gmzf640000gn/T/go-link-3393189677/000000.o’ for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
exit status 2
ERROR
# algo-*****
/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
ld: file too small (length=0) file ‘/var/folders/q2/867r3wd554s8dv7bg9gmzf640000gn/T/go-link-3393189677/000000.o’ for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
exit status 2
♥ If Wails is useful to you or your company, please consider sponsoring the project:
To Reproduce
- first:sudo wails build -platform windows/arm64 -o algo.exe
- then:tips no platform
- sudo wails build -platform windows -o algo.exe
Expected behaviour
wails build success
Screenshots
No response
Attempted Fixes
No response
System Details
Wails CLI v2.3.1
Scanning system - Please wait (this may take a long time)...Done.
# System
OS | MacOS
Version | 13.0.1
ID | 22A400
Go Version | go1.18.3
Platform | darwin
Architecture | amd64
# Wails
Version | v2.3.1
# Dependencies
Dependency | Package Name | Status | Version
Xcode command line tools | N/A | Installed | 2396
npm | N/A | Installed | 8.11.0
*Xcode | N/A | Available |
*upx | N/A | Available |
*nsis | N/A | Available |
* - Optional Dependency
# Diagnosis
Your system is ready for Wails development!
Optional package(s) installation details:
- Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
- upx : Available at https://upx.github.io/
- nsis : More info at https://wails.io/docs/guides/windows-installer/
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (2 by maintainers)
I JUST noticed that after
walis build -clean -platform=windows/amd64, there’s a new filexxx-res.sysoappended to project root.I DELETED this new file and tried it again, guess what?
Nice investigation both. Deleting that file before build should be fine, though I’m amazed this affects Mac builds to the point where I think it might be a bug in the compiler…
We can improve this and delete it after a failed build. But I think we should also remove that file if it exists before doing a build. Just in case someone has it there for some reason.
Thank you so much
Yes, after delete this file, can I continue to build windows app?