emaculation / macemu

Basilisk II and SheepShaver Macintosh emulators, maintained
74 stars 14 forks source link

libsdl2 not recognized with Debian10 #133

Open soljup opened 4 years ago

soljup commented 4 years ago

Debian10 Buster new install on ASUS A8N-E motherboard... 'SDL major-version' does not recognize installed packages: libsdl2-2.0-0 nor libsdl-kitchensink1 (which includes libsdl2)

How is 'SDL_VERSION_ATLEAST(2,0,0)' determined? I did a 'grep -r SDL_VERSION_ATLEAST *' and couldn't find how it is assigned. As a hack, I commented-out //&& SDL_VERSION_ATLEAST(2,0,0) in main_unix.cpp so it would make (Since I know I have SDL2 installed) but fails to open display upon run.

SheepShaver configuration summary:

SDL support ...................... : video audio
SDL major-version ................ :
BINCUE support ................... : no
LIBVHD support ................... : no
FBDev DGA support ................ : no
XFree86 DGA support .............. : no
XFree86 VidMode support .......... : no
Using PowerPC emulator ........... : yes
Enable JIT compiler .............. : yes
Enable video on SEGV signals ..... : yes
ESD sound support ................ : no
GTK user interface ............... : gtk2
mon debugger support ............. : no
Addressing mode .................. : real
Bad memory access recovery type .. : siginfo

Configuration done. Now type "make".
root@CSI-debian10:/home/memyselfi/macemu/SheepShaver/src/Unix# make
g++ -I../kpx_cpu/include -I../kpx_cpu/src -DUSE_JIT -I../include -I. -I../CrossPlatform -I../slirp -DHAVE_CONFIG_H -D_REENTRANT -DDATADIR=\"/usr/local/share/SheepShaver\" -g -O2  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -c main_unix.cpp -o obj/main_unix.o
main_unix.cpp:838:38: error: missing binary operator before token "("
 #if __MACOSX__ && SDL_VERSION_ATLEAST(2,0,0)
                                      ^
make: *** [Makefile:200: obj/main_unix.o] Error 1
soljup commented 4 years ago

yeah, sorry. I was in root when I tried to launch. It launched under my username(with the hack mentioned above). SheepShaver Settings appears, and I configured them, but upon 'Start" the following alert... SheepShaver error: Cannot map Low Memory Globals: Operation not permitted.

I will check if this is due to one or more of the selinux boolians, e.g., allow_execheap, allow_execmem, allow_execmod, allow_execstack. All of which appear to be bad implementations if so. see _https://wiki.centos.org/TipsAndTricks/SelinuxBooleans

soljup commented 4 years ago

Nope. selinux not running nor installed. Stuck.

soljup commented 4 years ago

Apparently fails conftest.py "trap invalid opcode"

ianfixes commented 4 years ago

I had also struggled with this problem. Here are the places I got stuck:

I feel like I had some other information regarding this, but I'm not sure where I put it.

ianfixes commented 4 years ago

Possibly of use, I will try to check this out later https://github.com/digarok/gsplus/blob/master/appveyor.yml

rakslice commented 4 years ago

The immediate problem, the error at SDL_VERSION_ATLEAST at main-unix.cpp:838 is brokenness in the code, I've created a separate issue https://github.com/emaculation/macemu/issues/134 for it.

You are building without SDL there; If the configure script detected SDL it would say the version number next to SDL major-version: in the results message at the end of the configure run. Another clue is that the g++ command doesn't have any SDL things in it.

Are you missing libsdl2-dev or whatever it's called? Building code that uses a compiled library requires the library's headers, and if you're using the library from a package in your Linux distro, you'll need whatever the distro puts those headers in, e.g. a -dev package (Debian-style) or -devel package (Red Hat-style).

The error about low memory globals is because there's a kernel tunable you need to change; this should be better documented, see: https://github.com/emaculation/macemu/issues/135