veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.17k stars 219 forks source link

pkg-config issue with sdl2_gfx 0.4.35->0.4.39 #601

Closed kazzmir closed 1 month ago

kazzmir commented 1 month ago

Go version: 1.22.2 linux/amd64 Go-SDL2 version: 0.4.39 SDL2 version: 2.0.10 OS: ubuntu 20.04 Architecture: amd64

When I upgraded my program to use go-sdl2 v0.4.39 from v0.4.35 the build complained that it couldn't find sdl2_gfx.pc. Apparently on my system the pc file was named SDL2_gfx.pc, rather than lowercase. I resolved this locally by symlinking SDL2_gfx.pc to sdl2_gfx.pc, and then the build was happy.

This commit seems to be referencing sdl2_gfx.pc.

https://github.com/veandco/go-sdl2/commit/d9801e0db990b3aacb6386d0e6d29e3890f3c10f

I'm not sure which is correct, SDL2_gfx or sdl2_gfx. I installed SDL2_gfx via apt.

apt show libsdl2-gfx-dev
Package: libsdl2-gfx-dev
Version: 1.0.4+dfsg-3
Priority: optional
Section: universe/libdevel
Source: libsdl2-gfx
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian SDL packages maintainers <pkg-sdl-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 129 kB
Depends: libsdl2-dev, libsdl2-gfx-1.0-0 (= 1.0.4+dfsg-3)
Suggests: libsdl2-gfx-doc
Homepage: https://www.ferzkopp.net/joomla/content/view/19/14/
Download-Size: 29.9 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

in the pkgconfig directory

/usr/lib/x86_64-linux-gnu/pkgconfig $ ls -l | grep -i sdl2
lrwxrwxrwx 1 root root   11 May 27 19:45 sdl2_gfx.pc -> SDL2_gfx.pc
-rw-r--r-- 1 root root  275 Oct 19  2018 SDL2_gfx.pc
-rw-r--r-- 1 root root  283 Feb  3  2020 SDL2_image.pc
-rw-r--r-- 1 root root  275 Dec 16  2019 SDL2_mixer.pc
-rw-r--r-- 1 root root  693 Apr 13  2020 sdl2.pc
veeableful commented 1 month ago

Hi @kazzmir, thanks for reporting the issue. I updated the pkg-config name to SDL2_gfx. Would you be able to try v0.4.40? Thanks!

kazzmir commented 1 month ago

v0.4.40 seems to have worked, thanks!