libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.09k stars 1.81k forks source link

Linking fails without -lGL explicitly added #12430

Open hizzlekizzle opened 3 years ago

hizzlekizzle commented 3 years ago

Description

When RogueScholar helpfully updated the debian packaging used in the PPAs, he explicitly enabled a bunch of stuff and I've been trying to maintain as many of these as possible to ensure a feature-filled build, but I'm running into linking errors if I don't explicitly add LD='-lGL' at the command line or here: https://github.com/libretro/RetroArch/blob/master/Makefile#L201

I would assume we don't want to add -lGL there in the Makefile to avoid breaking with platforms that either don't support GL at all or don't want to depend on it for whatever reason, and it should be happening automatically anyway, AFAIK.

Here are the flags I'm configuring with: --disable-nvda --disable-winrawinput --enable-blissbox \ --disable-gdi --enable-caca --enable-sixel --enable-rgui \ --enable-materialui --enable-xmb --enable-ozone --disable-stripes \ --enable-ssl --enable-systemmbedtls --disable-builtinmbedtls --enable-sdl2 \ --enable-libusb --enable-dbus --enable-systemd --enable-udev \ --enable-threads --enable-ffmpeg --disable-mpv --enable-ssa \ --enable-networking --enable-networkgamepad --enable-command \ --enable-miniupnpc --disable-builtinminiupnpc --enable-opengl \ --enable-opengles --enable-opengles3 --enable-opengles3_1 \ --enable-opengles3_2 --enable-x11 --enable-xrandr --enable-xinerama \ --enable-kms --enable-plain_drm --enable-wayland --enable-dynamic_egl \ --enable-egl --disable-vg --disable-builtinzlib --enable-zlib \ --enable-alsa --disable-tinyalsa --disable-audioio --disable-oss \ --disable-rsound --enable-al --enable-jack --disable-network_video \ --disable-coreaudio --enable-pulse --enable-freetype --enable-xvideo \ --enable-v4l2 --enable-flac --disable-builtinflac --enable-parport \ --enable-mmap --enable-qt --enable-xshm --enable-builtinglslang \ --enable-videoprocessor --enable-cdrom --enable-slang --enable-osmesa

Expected behavior

Linking should happen without adding additional linker flags.

Actual behavior

linking fails in the last step of compilation.

Steps to reproduce the bug

  1. use the aforementioned configure flags
  2. make

Version/Commit

You can find this information under Information/System Information

Environment information

hizzlekizzle commented 3 years ago

any thoughts on this @twinaphex ?

GavinDarkglider commented 2 years ago

I have looked into this myself, developing lakka for the switch, and it has to do with enabling opengl and opengles at the same time. You can get around that, by adding support for opengl, but it only enables the GL1 renderer, and standard openGL cores dont launch, because they create gl context which isnt supported by gles retroarch currently.