mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.68k stars 780 forks source link

Compiling errors on Debian 10 (problems with make) #1999

Open foxsouns opened 3 years ago

foxsouns commented 3 years ago

When running make, it brings up this long list of "gl* not found"-esk stuff, and i dont know how to fix it.

It ends out with collect2: error: ld returned 1 exit status make[2]: *** [sdl/CMakeFiles/mgba-sdl.dir/build.make:164: sdl/mgba] Error 1 make[1]: *** [CMakeFiles/Makefile2:377: sdl/CMakeFiles/mgba-sdl.dir/all] Error 2 make: *** [Makefile:152: all] Error 2

The whole dump is at https://pastebin.com/PQi6c9u2

Thank you in advance.

endrift commented 3 years ago

Can you get me the contents of sdl/CMakeFiles/mgba-sdl.dir/link.txt?

foxsouns commented 3 years ago

Can you get me the contents of sdl/CMakeFiles/mgba-sdl.dir/link.txt?

/usr/bin/cc -Wall -Wextra -Wno-missing-field-initializers - pthread -O3 -DNDEBUG -rdynamic CMakeFiles/mgba-sdl.dir/sdl- audio.c.o CMakeFiles/mgba-sdl.dir/sdl-events.c.o CMakeFiles/ mgba-sdl.dir/gl-common.c.o CMakeFiles/mgba-sdl.dir/main.c.o CMakeFiles/mgba-sdl.dir/gles2-sdl.c.o CMakeFiles/mgba-sdl.di r/sw-sdl2.c.o -o mgba -Wl,-rpath,/home/latula/BuildDir/mgba /build: ../libmgba.so.0.9.0 -lSDL2 -ledit -lz -lpng -lelf -l m -lz -lpng -lelf -lm

endrift commented 3 years ago

Hmmm, do you have OpenGL support enabled? Can you get me the contents of CMakeCache.txt too? That will be long so you should attach it.

foxsouns commented 3 years ago

not sure how to enable opengl support, but here's CMakeCache.txt https://pastebin.com/k7Nrk7JU ( if you could help me out there, i'd greatly appreciate it :> )

endrift commented 3 years ago

I can see from this file that it is enabled, but it's missing the libraries. Make sure mesa-common-dev is installed.

Also, what GPU do you have installed?

foxsouns commented 3 years ago

ive already got mesa-common-dev installed, and i have an intel celeron cpu with an nvidia video chip.

endrift commented 3 years ago

Do you have the Nvidia proprietary GPU drivers installed? If so, make sure libglvnd-dev is installed too.

foxsouns commented 3 years ago

libglvnd-dev was already installed :<

Dimensional commented 3 years ago

The ~joys~ of troubleshooting. Looking the cache over again, it looks like it's not properly detecting the location of the GL headers and libraries, as shown between lines 450 and 480.

Also looks like the cache is set for GL as off while GLES2 is on. Line 33 and 36.

At line 540 it seems to use the qtGL libraries too.

I'm not sure what the cache means around line 990 when it says internal.

These may be one of those uncommon pkgconfig bugs I've seen floating around, where the package that is used to install the libraries doesn't properly update the pkgconfig database, causing things to fail in the future. I haven't figured out how to manually update that database to correct things like that.

foxsouns commented 3 years ago

is there anything i could do to help?

endrift commented 3 years ago

I am having trouble reproducing this. Can you paste the output of dpkg --get-selections | grep gl? You may need to install glx-diversions and glx-alternative-nvidia.

foxsouns commented 3 years ago

oh, thats back before i got my new computer! haha let me go through, reinstall, try recompiling, and report back. maybe it's just my computer? something to do with missing deps? anyways, ill try again, and see if it's still broken.

endrift commented 2 weeks ago

Did you ever try this again? I forgot to follow up.