depili

Results 39 comments of depili

in theory the following should work for cross compiling to M1: ``` #!/bin/bash export GOOS=darwin export GOARCH=arm64 export CGO_CFLAGS="-isysroot $(xcrun --sdk macosx11.1 --show-sdk-path) -arch arm64 -I/usr/local/include" export CGO_LDFLAGS="-isysroot $(xcrun --sdk...

When I try with the above on a docker container I first get several linker warnings about the static libs being on newer osx versions than the binary being linked...

That was with 0.4.1 initially, tried 0.4.10 also but still getting the same error on the linking stage. For reference my Dockerfile is ``` FROM debian:bullseye MAINTAINER Vesa-Pekka Palmu ENV...

and to be specific the the v4/cmd/sdl-clock of that project.

Seems to have fixed that linking error, now just running into other issues on my osx-crossbuild with (supposedly) the golang builtin time package... ``` Undefined symbols for architecture x86_64: "_clock_gettime",...

Actually, doing a quick test and just trying to compile the example from go-sdl2 readme results in linking errors with _clock_gettime: ``` package main import "github.com/veandco/go-sdl2/sdl" func main() { if...

Using git head (e59a63461da2cbc20cb0a5bbfc954730e50a5472) of osxcross, if that matters.

Unfortunately, I can't seem to get osxcross up with 10.13 as `build_compiler_rt.sh` fails, so can't test. Will try with go 1.16

Trying with go1.16.9 and SDK 10.11 still runs into a linking problem, just one this time: ``` ***@***.***:~/clock-8001/v4# cat foo.go package main import "github.com/veandco/go-sdl2/sdl" func main() { if err :=...

Finally had success, using `liushuyu/osxcross` container that is based on 10.14 SDK and go 1.16. For some reason my attempts of creating the SDK tarballs via the osxcross/tools/ scripts resulted...