darling
darling copied to clipboard
Cannot run Go compiler
Expected Result
Run a normal executable
Actual Result
Cannot mmap segment __LINKEDIT at 0x19ff000: File exists
Steps To Reproduce
darling shell installer -pkg ./go1.18.2.darwin-amd64.pkg -target /$ darling shell go --version
System Information What system are you using?
| Software | Version |
|---|---|
| Linux Kernel | 5.17.4 |
| Darling | b48b35c945d6d28b891c500ee4ae09f9512f5f56 |
the same error happened on Darwin Kernel Version 19.6.0 x86_64 when run a binary of Golang.
Linux kernel is 5.4.0-125-generic
Any updates on this?
$ darling shell installer -pkg go1.20.2.darwin-amd64.pkg -target /
installer: Package name is Go
installer: Installing at base path /
installer: Installing selected choice Go
installer: Installing package org.golang.go version go1.20.2 (242215 KB)
Removing previous installation
installer: Extracting files
Fixing permissions
installer: Installation complete
Darling [/Volumes/SystemRoot/home/acheong/workspace/test]$ cat hello.go
package main
func main() {
println("Hello world")
}
Darling [/Volumes/SystemRoot/home/acheong/workspace/test]$ go build hello.go
Cannot mmap segment __LINKEDIT at 0x1aa2000: File exists
Darling [/Volumes/SystemRoot/home/acheong/workspace/test]$
The issue basically running all Golang app
I do not know much about Go and Mac OS, but I think Cannot mmap segment __LINKEDIT at ...: File exists is printed because __LINKEDIT probably usually has same vmaddr with __DWARF in Go executable files. I build Go programs on Linux only and this is a workaround, but I was able to build and run programs when doing something like GOOS=darwin go build -ldflags "-w" hello.go.