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

sdl ld error #299

Closed
JupiterRider opened this issue Nov 5, 2023 · 3 comments · Fixed by #300
Closed

sdl ld error #299

JupiterRider opened this issue Nov 5, 2023 · 3 comments · Fixed by #300

Comments

@JupiterRider
Copy link
Contributor

go.mod

module game

go 1.21.3

require github.com/gen2brain/raylib-go/raylib v0.0.0-20231104153637-1e13bd47a649

main.go

package main

import rl "github.com/gen2brain/raylib-go/raylib"

func main() {
        rl.InitWindow(1280, 720, "Game")
        defer rl.CloseWindow()

        for !rl.WindowShouldClose() {
                rl.BeginDrawing()
                rl.ClearBackground(rl.White)
                rl.EndDrawing()
        }
}

Running go build -tags sdl results in the following error:

# game
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-3620036020/000016.o: undefined reference to symbol 'exp@@GLIBC_2.29'
/usr/bin/ld: /usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
@gen2brain
Copy link
Owner

Ok, thanks. I have an idea why it was not an issue for me. Glibc 2.29 looks like an older version of Glibc, on an older distro, not sure from which version (I am on 2.38) libm is just a stub, it is not needed anymore, so with or without it doesn't matter.

@JupiterRider
Copy link
Contributor Author

@gen2brain Where does this GLIBC_2.29 come from? I've installed 2.38 (Archlinux):

core/glibc 2.38-7 [installed]
    GNU C Library

@gen2brain
Copy link
Owner

Eh, not sure then, but glibc also keeps older symbols around. There was also no issues in Ubuntu (github actions).

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

Successfully merging a pull request may close this issue.

2 participants