puNES icon indicating copy to clipboard operation
puNES copied to clipboard

Failed to build on macOS, lacking "os_jstick.h"

Open afbytes opened this issue 2 years ago • 3 comments

On macOS 10.15, I have succeeded in configuring it by:

export PKG_CONFIG_PATH=/usr/local/opt/qt@5/lib/pkgconfig
./autogen.sh
./configure

But when I run make, I was prompted lacking the file "os_jstick.h":

$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in misc
make[2]: Nothing to be done for `all'.
Making all in src
Making all in audio
depbase=`echo wave.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2  -DRELEASE -DWITH_FFMPEG -Wall -Wextra -ffast-math -fmessage-length=0 -finline-functions -I/Users/alan/tmp/repos/emulator-nes/puNES/./src -I/Users/alan/tmp/repos/emulator-nes/puNES/./src/gui -I/Users/alan/tmp/repos/emulator-nes/puNES/./src/core -I/Users/alan/tmp/repos/emulator-nes/puNES/./src/video/shaders -DQT_NETWORK_LIB -F/usr/local/Cellar/qt@5/5.15.2/lib -DQT_SVG_LIB -F/usr/local/Cellar/qt@5/5.15.2/lib -DQT_WIDGETS_LIB -F/usr/local/Cellar/qt@5/5.15.2/lib -DQT_GUI_LIB -F/usr/local/Cellar/qt@5/5.15.2/lib -DQT_CORE_LIB -F/usr/local/Cellar/qt@5/5.15.2/lib -I/usr/local/Cellar/qt@5/5.15.2/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt@5/5.15.2/lib/QtSvg.framework/Headers -I/usr/local/Cellar/qt@5/5.15.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt@5/5.15.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers -I/usr/local/Cellar/ffmpeg/4.4_2/include  -MT wave.o -MD -MP -MF $depbase.Tpo -c -o wave.o wave.c &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from wave.c:24:
In file included from /Users/alan/tmp/repos/emulator-nes/puNES/./src/core/gui.h:19:
In file included from /Users/alan/tmp/repos/emulator-nes/puNES/./src/gui/qt.h:29:
In file included from /Users/alan/tmp/repos/emulator-nes/puNES/./src/core/jstick.h:25:
/Users/alan/tmp/repos/emulator-nes/puNES/./src/core/jstick_db.h:24:10: fatal error: 'os_jstick.h' file not found
#include "os_jstick.h"
         ^~~~~~~~~~~~~
1 error generated.
make[3]: *** [wave.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The reason would be lacking a port of "os_jstick.h" (and may be some other files) for macOS, since I could find porting files like:

/Users/alan/puNES/src/gui/linux/os_jstick.h
/Users/alan/puNES/src/gui/windows/os_jstick.h
/Users/alan/puNES/src/gui/bsd/os_jstick.h

Could someone please port puNES for macOS?

afbytes avatar Apr 10 '22 06:04 afbytes

If someone gives me a Mac I can do it :wink:. Of course I'm kidding but I always would have liked to port to Mac but for now I don't have enough funds to afford the expense. It would be necessary to write the video, audio and input management (os_joystick.c) and who knows that one day will have the opportunity to do so. Thanks anyway for your interest in my project.

punesemu avatar Apr 10 '22 08:04 punesemu

Maybe better to switch to Qt Gamepad as input library?

winterheart avatar Jan 10 '23 13:01 winterheart

The Qt Gamepad is no longer present in Qt6 (sooner or later I will switch to Qt6 as default libraries). In any case, it wouldn't be a problem to rewrite the input handling, the problem is only of an economic nature.

punesemu avatar Jan 10 '23 20:01 punesemu