hitchhikr/protrekkr

Missing Build Instructions

Closed this issue · 13 comments

It would be very helpful to have a section in the README.MD file about how to build the software.

I thought that would be rather straightforward. You just have to build the src/extralibs with the provided makefiles (actually the repository contains the lib already compiled) & then the tracker.
Are you running into some sort of issues during compilation ?

I am. On 64-bit Linux every typedef long long unsigned uint64_t; needs to be replaced with #include instead due to a type collision. Also C++17 doesn't allow pointer=&value; so *pointer=value; needs to be corrected in 2 places. The linker needs -lpthread for multithreading. My code now builds but segfaults on running.

That include should be cstdint. GitHub blocked the angle braces.

The seg fault is coming from the *pointer=value; in xml.cpp.

Thanks. I'll need to think on that part some more then.

Also it's using oss so you'll probably have to install the oss emulation of alsa. I planed to move the audio output to alsa but never did (it shouldn't be too hard).

I thought that would be rather straightforward. You just have to build the src/extralibs with the provided makefiles (actually the repository contains the lib already compiled) & then the tracker.

Happens to me all the time, I get too comfortable with my own codebase and I totally miss how confusing it can be for the newcomers to get started. I'd say anything that requires more than ./configure && make && make install needs some mention in the README.md.

Are you running into some sort of issues during compilation ?

Yes. I always end up with a zip file that contains some assets (I'm guessing) but no executable files. I'd actually appreciate a small list of steps to produce the macOS app from the source code. I'd be happy to cook a PR for the instructions as soon as I get it right.

Basically, you'll have to do a "make -f makefile.macosx" and it should create an universal binary but i don't think newer OSX can compile ppc code (it was made a long time ago on OSX Tiger). Splitting that file in two may work (if SDL 1 64 bit even exists).

I see, maybe the arch is the problem, indeed. When I perform that, I get this on an Intel Mac running macOS 11.4:

g++ -c -o ptk_ppc.o  -O3 -mcpu=G4 -fomit-frame-pointer -ffast-math --prefetch-loop-arrays -faltivec -maltivec -mtune=G4 -fno-rtti -I/Library/Frameworks/SDL.framework/Headers -Lsrc/extralibs/sdl_draw -Lsrc/extralibs/zlib-1.2.3 -L/library/frameworks -fno-strict-aliasing -arch ppc -D __MACOSX__ -D __GCC__ -D __MACOSX_CORE__ -D __BIG_ENDIAN__ -D __MOT_SWAP__ -D __AIFF__ src/ptk.cpp
clang: error: unsupported option '--prefetch-loop-arrays'; did you mean '-fprefetch-loop-arrays'?
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
make: *** [ptk_ppc.o] Error 1

Yeah, PowerPC support was dropped at Snow Leopard (10.6). (Then it was all downhill from there IMO.)

@hitchhikr
Thanks for the updated build script for Linux64. It works from PulseAudio using its OSS emulator.

padsp ./ptk_linux

diogoeichert: i'll see what i can do about that.

SamuraiCrow: I'll move the linux version from oss to alsa.

macos Monterey 12.4, 2019 macbook pro intel, receiving errors trying to build those extralibs, seems like layers of missing or misconfigured dependencies [edit] on my end obviously [/edit], haven't gotten to the bottom of the layers yet. Currently just running the windows binary through wine. +1 for a README!

UPDATE at least one problem:

In file included from src/draw_hline.cpp:24:
src/../include/sdl_draw.h:27:10: fatal error: 'SDL/SDL.h' file not found
#include <SDL/SDL.h>

seems to be n issue with how homebrew installed sdl. I'll keep bashing away and updating the careless void on my progress

Doing brew postinstall sdl has resolved that error and replaced it with a new one:

clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.4u.sdk' [-Wmissing-sysroot]

Try it again, it should work now...