mupen64plus / mupen64plus-core

Core module of the Mupen64Plus project
1.32k stars 258 forks source link

mupen doesnt run on linux #892

Closed a-rabin closed 4 months ago

a-rabin commented 3 years ago

Hello, when I try to run mupen on linux, i get this error: mupen64plus: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

any fixes?

richard42 commented 3 years ago

you need to install the SDL2 libraries.

a-rabin commented 3 years ago

how do i do that?

a-rabin commented 3 years ago

okay i tried it but then it shows this error: Illegal instruction (core dumped) Any help?

Jj0YzL5nvJ commented 3 years ago

Dynamic linker issue.

780

Related issues: #641 #754 #797 #822

Any help?

uname -a
lsb_release -a
a-rabin commented 3 years ago

Linux penguin 5.4.109-26094-g381754fbb430 #1 SMP PREEMPT Thu Jul 15 22:47:24 PDT 2021 x86_64 GNU/Linux

No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster

here

a-rabin commented 3 years ago

also i did try this compile script, but it keeps complaining of missing libraries. the current is freetype2

Jj0YzL5nvJ commented 3 years ago

Search examples for APT

apt-cache search libfreetype | grep -i dev
apt-cache search libpng | grep -i dev
apt list -a libx11-dev
apt show -a libgl1-mesa-dev
Jj0YzL5nvJ commented 3 years ago

This can be useful with dependencies that are difficult to trace by name.

a-rabin commented 3 years ago

okay but now theres an error saying that theres some makefile error?

... Package hidapi-hidraw was not found in the pkg-config search path. Perhaps you should add the directory containinghidapi-hidraw.pc' to the PKG_CONFIG_PATH environment variable No package 'hidapi-hidraw' found CC _obj/plugin_front.o Package hidapi-hidraw was not found in the pkg-config search path. Perhaps you should add the directory containing hidapi-hidraw.pc' to the PKG_CONFIG_PATH environment variable No package 'hidapi-hidraw' found CC _obj/plugin_back.o ../../src/plugin_back.c: In function ‘pb_performIo’: ../../src/plugin_back.c:304:6: warning: unused variable ‘op_was_extio’ [-Wunused-variable] int op_was_extio[MAX_OPS] = { }; ^~~~~~~~~~~~ At top level: ../../src/plugin_back.c:231:13: warning: ‘timing’ defined but not used [-Wunused-function] static void timing(int start, const char *label) ^~~~~~ Package hidapi-hidraw was not found in the pkg-config search path. Perhaps you should add the directory containinghidapi-hidraw.pc' to the PKG_CONFIG_PATH environment variable No package 'hidapi-hidraw' found CC _obj/gcn64lib.o In file included from ../../src/gcn64lib.c:20: ../../src/gcn64_priv.h:4:10: fatal error: hidapi.h: No such file or directory

include "hidapi.h"

      ^~~~~~~~~~

compilation terminated. make: *** [Makefile:307: _obj/gcn64lib.o] Error 1 make: Leaving directory '/home/tungstenboy/src/mupen64plus-input-raphnetraw/projects/unix' `

Jj0YzL5nvJ commented 3 years ago

apt-cache search hidapi | grep -i dev

You can also mod the script and remove input-raphnetraw from M64P_COMPONENTS or any other components if you wish. It might be handy to run the script with -j4 or -j8 as parameter, who knows.

a-rabin commented 3 years ago

now i get this error: `In file included from ../../src/GlideHQ/TxFilter.h:29, from ../../src/GlideHQ/TxFilterExport.cpp:28: ../../src/GlideHQ/TxHiResCache.h:37:10: fatal error: boost/filesystem.hpp: No such file or directory

include <boost/filesystem.hpp>

      ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make: [Makefile:512: _obj/GlideHQ/TxFilterExport.o] Error 1 make: Waiting for unfinished jobs.... In file included from ../../src/GlideHQ/TxFilter.h:29, from ../../src/GlideHQ/TxFilter.cpp:28: ../../src/GlideHQ/TxHiResCache.h:37:10: fatal error: boost/filesystem.hpp: No such file or directory

include <boost/filesystem.hpp>

      ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make: *** [Makefile:512: _obj/GlideHQ/TxFilter.o] Error 1 make: Leaving directory '/home/tungstenboy/src/mupen64plus-video-glide64mk2/projects/unix' `

richard42 commented 3 years ago

Sounds like you're getting closer. For that one you need libboost-dev

a-rabin commented 3 years ago

sigh `../../src/GlideHQ/TxHiResCache.cpp: In member function ‘boolean TxHiResCache::loadHiResTextures(boost::filesystem::wpath, boolean)’: ../../src/GlideHQ/TxHiResCache.cpp:261:12: warning: ‘char strncpy(char, const char*, size_t)’ specified bound 4095 equals destination size [-Wstringop-truncation] strncpy(fname, it->path().leaf().string().c_str(), sizeof(fname));


    CXX _obj/GlideHQ/TxReSample.o
    CXX _obj/GlideHQ/TxDbg.o
    CXX _obj/GlideHQ/tc-1.1+/s2tc/s2tc_algorithm.o
    CXX _obj/GlideHQ/tc-1.1+/s2tc/s2tc_libtxc_dxtn.o
    LD  mupen64plus-video-glide64mk2.so
/usr/bin/ld: cannot find -lboost_filesystem
/usr/bin/ld: cannot find -lboost_system
collect2: error: ld returned 1 exit status
make: *** [Makefile:515: mupen64plus-video-glide64mk2.so] Error 1
make: Leaving directory '/home/tungstenboy/src/mupen64plus-video-glide64mk2/projects/unix'`
Jj0YzL5nvJ commented 3 years ago

Try sudo ldconfig to refresh the cache. If it fails again, remove video-glide64mk2 from M64P_COMPONENTS and: https://gist.github.com/Jj0YzL5nvJ/5242753837eed35768e61c240f572ecd#file-m64p_build-sh-L75-L78

cd "$ORIG/src/mupen64plus-audio-sdl2"
git reset --hard 7af6cf37fc8eccfcdb266029cce0a5685dbb553a
cd "$ORIG/src/mupen64plus-video-glide64mk2"
git apply ../../mupen64plus-video-glide64mk2_ae.patch

Strictly speaking you only need: M64P_COMPONENTS="core ui-console audio-sdl input-sdl rsp-cxd4 rsp-hle" The real deal are *GLideN64*, Angrylion-Plus** and the both *ParaLLEl's.

Jj0YzL5nvJ commented 3 years ago

If you can build that correctly, this will be of use to you. Example:

export PATH="/home/tungstenboy/m64p_test:$PATH"

In a new terminal:

m64pp --gfx mupen64plus-video-angrylion-plus.so --rsp mupen64plus-rsp-parallel.so ROM.z64
m64pp --gfx mupen64plus-video-GLideN64.so --rsp mupen64plus-rsp-hle.so ROM.z64

etc

For more examples, check out this.

P.S: You can also mod m64pp...

a-rabin commented 3 years ago

well i unfortunately have to go to bed now, ill try these tmrw (if i can)

a-rabin commented 3 years ago

this make: Leaving directory '/home/tungstenboy/src/mupen64plus-video-rice/projects/unix' make: Entering directory '/home/tungstenboy/src/mupen64plus-video-z64/projects/unix' Makefile:195: *** No GLEW development libraries found!. Stop. make: Leaving directory '/home/tungstenboy/src/mupen64plus-video-z64/projects/unix'

a-rabin commented 3 years ago

alright, i think it works now. and is there a gui frontend to this app?

Jj0YzL5nvJ commented 3 years ago

mupen64plus-ui-python mupen64plus-qt

There are other more popular GUIs, but they are not "frontends" in the traditional sense. I personally can't digest any of them.

The true purpose of m64pp is to be a template, to be copied, customized and renamed accordingly. In short it's a trial script for power users to mess.

a-rabin commented 3 years ago

i see. since im new to c++ programming, i think its gonna be a hard time for me, is there any way to change the controls?

Jj0YzL5nvJ commented 3 years ago

grep -EA43 'Input-SDL-Control1' "$HOME/.config/mupen64plus/mupen64plus.cfg" Edit mupen64plus.cfg. For the changes to be valid, you must first edit to mode = 0, otherwise the changes in Input-SDL-Control1 will be restarted at the next run.

See: http://www.mupen64plus.org/wiki/index.php?title=Mupen64Plus_Plugin_Parameters#Input-SDL http://www.mupen64plus.org/wiki/index.php?title=KeyboardSetup http://www.mupen64plus.org/wiki/index.php?title=ControllerSetup

since im new to c++ programming, i think its gonna be a hard time for me,

I have never touched C++, I know a little of Turbo C, Turbo Pascal, Delphi and some scripting languages to manipulate data. I'm only good at reverse engineering and find bugs =P

a-rabin commented 3 years ago

:P oh well, thanks for the helps! can i get a direct way to contact you if i have any problems?