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

XBuilding #569

Open
jkassis opened this issue May 4, 2023 · 7 comments
Open

XBuilding #569

jkassis opened this issue May 4, 2023 · 7 comments

Comments

@jkassis
Copy link

jkassis commented May 4, 2023

Go version:
go version go1.19.4 darwin/arm64

Go-SDL2 version:
require github.com/veandco/go-sdl2 v0.4.34

SDL2 version:
??

OS:
MacOS

Architecture:
arm64

Having trouble with cross-platform builds inside a Docker container on MacOS arm64 (Macbook M2) host OS...

The build is easily replicated by...

git clone https://github.com/jkassis/gas
cd go
go run bin/make.go setup
go run bin/make.go buildx

It uses an Ubuntu image setup for cross platform builds and a build script derived from the xgo project to build for multiple platforms using libraries vendored into the project on the HostOS.

Here's what I get from the docker builds...

[I] jkassis@Js-MacBook-Air ~/co/ga/go (main)> go run bin/make.go buildx                                                                                                                                                        05.03 18:28
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Building /source/go.mod...
Compiling for linux/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:5:11: fatal error: SDL.h: No such file or directory
    5 |  #include <SDL.h>
      |           ^~~~~~~
compilation terminated.
Compiling for linux/386...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:5:11: fatal error: SDL.h: No such file or directory
    5 |  #include <SDL.h>
      |           ^~~~~~~
compilation terminated.
Compiling for linux/arm-7...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:5:11: fatal error: SDL.h: No such file or directory
    5 |  #include <SDL.h>
      |           ^~~~~~~
compilation terminated.
Compiling for linux/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:5:11: fatal error: SDL.h: No such file or directory
    5 |  #include <SDL.h>
      |           ^~~~~~~
compilation terminated.

I'm concerned and confused by the references to what appear to be SDL1.x headers here.

@veeableful
Copy link
Contributor

Hi @jkassis, it looks like it can't find the SDL2 header file (which should be SDL.h under /usr/include/SDL2 directory). If it's on Ubuntu, has libsdl2-dev been installed?

@jkassis
Copy link
Author

jkassis commented May 5, 2023 via email

@jkassis
Copy link
Author

jkassis commented May 5, 2023 via email

@veeableful
Copy link
Contributor

Hi @jkassis, could you try without the static tag and see if it works? We have our special Go files for static tag so they might have interfered.

@jkassis
Copy link
Author

jkassis commented May 8, 2023

Hi @veeableful. I did try just now without the static tag. I'm seeing this, which reminds me of the errors that surfaced in https://github.com/veandco/go-sdl2/issues/555 for vendored builds...

Could the warning about the host and image platform have something to do with this?

[I] jkassis@Js-MacBook-Air ~/co/ga/go (main)> go run bin/make.go buildx                       05.08 06:53
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Building /source/go.mod...
Compiling for linux/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for darwin-10.10/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for darwin-10.10/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for windows-4.0/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Cleaning up build environment...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Building /source/go.mod...
Compiling for linux/amd64...
go build frogger: copying /tmp/go-build398559834/b001/exe/a.out: open /build/frogger-linux-amd64: operation not permitted
Compiling for linux/386...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/arm-7...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips64...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips64le...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mipsle...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for windows-4.0/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Compiling for windows-4.0/386...
# github.com/veandco/go-sdl2/sdl
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Compiling for darwin-10.10/amd64...
# github.com/veandco/go-sdl2/sdl
osxcross: warning: possibly dangerous include path specified: '-I /usr/include/SDL2'
osxcross: info: you can silence this warning via 'OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1' (env)
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for darwin-10.10/arm64...
# github.com/veandco/go-sdl2/sdl
osxcross: warning: possibly dangerous include path specified: '-I /usr/include/SDL2'
osxcross: info: you can silence this warning via 'OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1' (env)
In file included from vendor/github.com/veandco/go-sdl2/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Cleaning up build environment...

@jkassis
Copy link
Author

jkassis commented May 8, 2023

I did one more test after removing the vendor folder...

[I] jkassis@Js-MacBook-Air ~/co/ga/go (main)> rm -R vendor                                                                                                                05.08 08:49
[I] jkassis@Js-MacBook-Air ~/co/ga/go (main)> go run bin/make.go buildx                                                                                                   05.08 08:49
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Building /source/go.mod...
Compiling for linux/arm64...
go: downloading cloud.google.com/go/profiler v0.3.1
go: downloading github.com/veandco/go-sdl2 v0.4.34
go: downloading cloud.google.com/go v0.105.0
go: downloading github.com/goradd/maps v0.1.4
go: downloading cloud.google.com/go/compute/metadata v0.2.3
go: downloading github.com/golang/protobuf v1.5.2
go: downloading cloud.google.com/go/compute v1.14.0
go: downloading github.com/google/pprof v0.0.0-20221103000818-d260c55eee4c
go: downloading github.com/googleapis/gax-go/v2 v2.7.0
go: downloading google.golang.org/api v0.107.0
go: downloading google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
go: downloading google.golang.org/grpc v1.52.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
go: downloading go.opencensus.io v0.24.0
go: downloading golang.org/x/net v0.7.0
go: downloading github.com/google/go-cmp v0.5.9
go: downloading golang.org/x/sys v0.5.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.1
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading golang.org/x/text v0.7.0
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for darwin-10.10/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for darwin-10.10/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for windows-4.0/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Cleaning up build environment...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Building /source/go.mod...
Compiling for linux/amd64...
go: downloading cloud.google.com/go/profiler v0.3.1
go: downloading github.com/veandco/go-sdl2 v0.4.34
go: downloading cloud.google.com/go v0.105.0
go: downloading github.com/goradd/maps v0.1.4
go: downloading cloud.google.com/go/compute/metadata v0.2.3
go: downloading github.com/golang/protobuf v1.5.2
go: downloading cloud.google.com/go/compute v1.14.0
go: downloading github.com/google/pprof v0.0.0-20221103000818-d260c55eee4c
go: downloading github.com/googleapis/gax-go/v2 v2.7.0
go: downloading google.golang.org/api v0.107.0
go: downloading google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
go: downloading google.golang.org/grpc v1.52.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
go: downloading go.opencensus.io v0.24.0
go: downloading golang.org/x/net v0.7.0
go: downloading github.com/google/go-cmp v0.5.9
go: downloading golang.org/x/sys v0.5.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.1
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading golang.org/x/text v0.7.0
go build frogger: copying /tmp/go-build2225081648/b001/exe/a.out: open /build/frogger-linux-amd64: operation not permitted
Compiling for linux/386...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/arm-7...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/arm64...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips64...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips64le...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mips...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for linux/mipsle...
# github.com/veandco/go-sdl2/sdl
In file included from /usr/include/SDL2/SDL_stdinc.h:31,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from ./sdl_wrapper.h:5,
                 from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: SDL2/_real_SDL_config.h: No such file or directory
    4 | #include <SDL2/_real_SDL_config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling for windows-4.0/amd64...
# github.com/veandco/go-sdl2/sdl
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Compiling for windows-4.0/386...
# github.com/veandco/go-sdl2/sdl
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
    2 |  #include <SDL2/SDL.h>
      |           ^~~~~~~~~~~~
compilation terminated.
Compiling for darwin-10.10/amd64...
# github.com/veandco/go-sdl2/sdl
osxcross: warning: possibly dangerous include path specified: '-I /usr/include/SDL2'
osxcross: info: you can silence this warning via 'OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1' (env)
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiling for darwin-10.10/arm64...
# github.com/veandco/go-sdl2/sdl
osxcross: warning: possibly dangerous include path specified: '-I /usr/include/SDL2'
osxcross: info: you can silence this warning via 'OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1' (env)
In file included from /go/pkg/mod/github.com/veandco/go-sdl2@v0.4.34/sdl/audio.go:4:
In file included from ./sdl_wrapper.h:5:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
/usr/include/SDL2/SDL_config.h:4:10: fatal error: 'SDL2/_real_SDL_config.h' file not found
#include <SDL2/_real_SDL_config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Cleaning up build environment...

@veeableful
Copy link
Contributor

Hi @jkassis, perhaps you need to cross-compile SDL2 for other OS and architecture as well as it seems like it compiled fine on linux/amd64. At least, I don't see the error that appeared on other builds when looking at the output that you provided. There is go build frogger: copying /tmp/go-build2225081648/b001/exe/a.out: open /build/frogger-linux-amd64: operation not permitted but I suppose that's simply a permission issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants