mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

Mupen cannot find libGL (***EDITED*** solved old issue!) #729

Closed wellinton-capixaba closed 3 years ago

wellinton-capixaba commented 3 years ago

Hello. While compiling it, this error message showed:

/usr/bin/ld: cannot find -lpng collect2: error: ld returned 1 exit status

Looking the above lines of code, I think I understood the reason:

gcc main/main.o main/util.o main/translate.o main/guifuncs.o main/config.o main/adler32.o main/ioapi.o main/md5.o main/mupenIniApi.o main/plugin.o main/rom.o main/savestates.o main/unzip.o memory/dma.o memory/flashram.o memory/memory.o memory/pif.o memory/tlb.o r4300/r4300.o r4300/bc.o r4300/compare_core.o r4300/cop0.o r4300/cop1.o r4300/cop1_d.o r4300/cop1_l.o r4300/cop1_s.o r4300/cop1_w.o r4300/exception.o r4300/interupt.o r4300/profile.o r4300/pure_interp.o r4300/recomp.o r4300/special.o r4300/regimm.o r4300/tlb.o r4300/x86_64/assemble.o r4300/x86_64/debug.o r4300/x86_64/gbc.o r4300/x86_64/gcop0.o r4300/x86_64/gcop1.o r4300/x86_64/gcop1_d.o r4300/x86_64/gcop1_l.o r4300/x86_64/gcop1_s.o r4300/x86_64/gcop1_w.o r4300/x86_64/gr4300.o r4300/x86_64/gregimm.o r4300/x86_64/gspecial.o r4300/x86_64/gtlb.o r4300/x86_64/regcache.o r4300/x86_64/rjump.o -pg -lz -lm -lpng -z execstack sdl-config --libs -L/usr/X11R6/lib -lGL -Wl,-export-dynamic -lpthread -ldl -o mupen64plus

It is looking for the libraries on this weird directory "usr/X11R6/lib" isn't.

If it is, which is the solution? create a symbolic link to libpng there? Or something else

If it is not, which can be the cause?

wellinton-capixaba commented 3 years ago

Ok, I was able to solve the problem, editing the Makefile and the pre.mk. However now I am facing the same issue with the openGL library.

"/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status"

I also edited the pre.mk file to try to solve, since the default dir, /usr/X11R6/lib, does not exist here. I changed it to: /usr/lib/mesa where the lib: libGL.so.1.2 it is, as it is a symbolic link to it called libGL.so.1.

The compiler invocation by make shows my modifications close to the final:

gcc main/main.o main/util.o main/translate.o main/guifuncs.o main/config.o main/adler32.o main/ioapi.o main/md5.o main/mupenIniApi.o main/plugin.o main/rom.o main/savestates.o main/unzip.o memory/dma.o memory/flashram.o memory/memory.o memory/pif.o memory/tlb.o r4300/r4300.o r4300/bc.o r4300/compare_core.o r4300/cop0.o r4300/cop1.o r4300/cop1_d.o r4300/cop1_l.o r4300/cop1_s.o r4300/cop1_w.o r4300/exception.o r4300/interupt.o r4300/profile.o r4300/pure_interp.o r4300/recomp.o r4300/special.o r4300/regimm.o r4300/tlb.o r4300/x86_64/assemble.o r4300/x86_64/debug.o r4300/x86_64/gbc.o r4300/x86_64/gcop0.o r4300/x86_64/gcop1.o r4300/x86_64/gcop1_d.o r4300/x86_64/gcop1_l.o r4300/x86_64/gcop1_s.o r4300/x86_64/gcop1_w.o r4300/x86_64/gr4300.o r4300/x86_64/gregimm.o r4300/x86_64/gspecial.o r4300/x86_64/gtlb.o r4300/x86_64/regcache.o r4300/x86_64/rjump.o -pg -lz -lm -z execstack sdl-config --libs -L/usr/lib/mesa -lGL -L/media/34GB/Arquivos-de-Programas-Linux/Png-1.0.19/lib/ -lpng -Wl,-export-dynamic -lpthread -ldl -o mupen64plus.

And yet it says cannot find libGL! What's going on here?

Jj0YzL5nvJ commented 3 years ago

https://gist.github.com/Jj0YzL5nvJ/5242753837eed35768e61c240f572ecd

wellinton-capixaba commented 3 years ago

Ok, the I found the error: There was no libGL.so, only the symbolic link libGL.so.1 and the actual library libGL.so.1.2. So I created a new symbolic link libGL.so pointing to libGL.so.1.2 and solved it.