-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Comments
Hi @jkassis, it looks like it can't find the SDL2 header file (which should be |
Thanks for looking into this @veeableful.
I can `ls` on the build container. SDL.h is there.
```
#9 [6/6] RUN ls -l /usr/include/SDL2
#9 sha256:3d2718aca6babdad36371547a63677b218362094ff9d77106485a3f559a971a6
#9 0.275 total 1836
#9 0.275 -rw-r--r-- 1 root root 4210 Apr 13 2020 SDL.h
#9 0.275 -rw-r--r-- 1 root root 11045 Apr 13 2020 SDL_assert.h
#9 0.275 -rw-r--r-- 1 root root 10839 Apr 13 2020 SDL_atomic.h
...
```
I'm setting these env variables through docker when running the build...
```
`-e", "FLAG_LDFLAGS="-w -s -D_REENTRANT -I/usr/include/SDL2
-lSDL2 -lSDL2main -lSDL2_image -lSDL2_mixer -lSDL2_ttf"`,
"-e", `CGO_CXXFLAGS="-I/usr/include/SDL2 -D_REENTRANT"`,
"-e", `CGO_CPPFLAGS="-I/usr/include/SDL2 -D_REENTRANT"`,
"-e", "OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1",
```
Maybe those linker flags are not right for a static build? I know the build
picks up those env vars because the OSXCROSS_NO_INCLUDE_PATH_WARNINGS
actually shuts the warnings down.
…On Thu, 4 May 2023 at 21:22, veeableful ***@***.***> wrote:
Hi @jkassis <https://github.com/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?
—
Reply to this email directly, view it on GitHub
<#569 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3WITHFB3WBRQNMGTJMH2TXER6A5ANCNFSM6AAAAAAXVES62M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Also, I updated https://github.com/jkassis/gas with the latest.
…On Fri, 5 May 2023 at 11:39, Jeremy Kassis ***@***.***> wrote:
Thanks for looking into this @veeableful.
I can `ls` on the build container. SDL.h is there.
```
#9 [6/6] RUN ls -l /usr/include/SDL2
#9 sha256:3d2718aca6babdad36371547a63677b218362094ff9d77106485a3f559a971a6
#9 0.275 total 1836
#9 0.275 -rw-r--r-- 1 root root 4210 Apr 13 2020 SDL.h
#9 0.275 -rw-r--r-- 1 root root 11045 Apr 13 2020 SDL_assert.h
#9 0.275 -rw-r--r-- 1 root root 10839 Apr 13 2020 SDL_atomic.h
...
```
I'm setting these env variables through docker when running the build...
```
`-e", "FLAG_LDFLAGS="-w -s -D_REENTRANT -I/usr/include/SDL2
-lSDL2 -lSDL2main -lSDL2_image -lSDL2_mixer -lSDL2_ttf"`,
"-e", `CGO_CXXFLAGS="-I/usr/include/SDL2 -D_REENTRANT"`,
"-e", `CGO_CPPFLAGS="-I/usr/include/SDL2 -D_REENTRANT"`,
"-e", "OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1",
```
Maybe those linker flags are not right for a static build? I know the
build picks up those env vars because the OSXCROSS_NO_INCLUDE_PATH_WARNINGS
actually shuts the warnings down.
On Thu, 4 May 2023 at 21:22, veeableful ***@***.***> wrote:
> Hi @jkassis <https://github.com/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?
>
> —
> Reply to this email directly, view it on GitHub
> <#569 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA3WITHFB3WBRQNMGTJMH2TXER6A5ANCNFSM6AAAAAAXVES62M>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Hi @jkassis, could you try without the |
Hi @veeableful. I did try just now without the static tag. I'm seeing this, which reminds me of the errors that surfaced in Could the warning about the host and image platform have something to do with this?
|
I did one more test after removing the vendor folder...
|
Hi @jkassis, perhaps you need to cross-compile SDL2 for other OS and architecture as well as it seems like it compiled fine on |
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...
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'm concerned and confused by the references to what appear to be SDL1.x headers here.
The text was updated successfully, but these errors were encountered: