OpenParsec / openparsec

GNU General Public License v2.0
51 stars 8 forks source link

Unable to compile on Raspberry Pi 4 #55

Closed zerojay closed 2 years ago

zerojay commented 3 years ago

Hi, I'm attemping to compile the source on a Raspberry Pi 4 and I'm currently running into the following error:

../../../../src/libparsec/g_telep.cpp: In function ‘void Teleporter_Rotation_Transform(float, float, geomv_t (*)[4])’: ../../../../src/libparsec/g_telep.cpp:33:18: error: ‘_isnan’ was not declared in this scope

define isnan(x) _isnan(x)

              ^~~~~~

make[1]: [Makefile:820: obj/x32/Debug/g_telep.o] Error 1 make[1]: Waiting for unfinished jobs.... make: *** [Makefile:17: client] Error 2

CrazySpence commented 3 years ago

Haven't tried the Pi build since the 3 but I do have a 4 handy so I'll give it a shot and see what happens

uberlinuxguy commented 3 years ago

first pass here, the isnan() function should be declared in <math.h> which is included and not spitting out an error.

See: https://linux.die.net/man/3/isnan

What's odd is the #ifndef right above that line is failing. Not sure why. This may be an issue of some standard library changing it's behavior and now a flag is needed or a compat-* version is needed because Open Parsec is so old.

But that is just my $0.02 without digging too deeply into it.

I think you will run into another issue though, the 32-bit vs 64-bit issue. Open Parsec will not compile and run properly on a 64-bit system. There are embedded pointers that do not function with 64-bit at all, or something like that. I'm sure someone with better recall could let us all in on what is the gotcha there.

zerojay commented 3 years ago

Good thing I'm not on a 64-bit system then, as the Pi4 is using 32-bit still so far.

uberlinuxguy commented 3 years ago

Oh boy, it's totally Friday. For some reason, my uncaffeinated brain thought the Pi 4 had a 64 bit os... I haven't messed much with the 4. Please ignore that part and I blame the lack of Caffeine and the fact that it's Friday Morning.

(walks away mumbling: "Don't answer emails before noon... don't answer emails before noon....")

zerojay commented 3 years ago

There is a 64-bit OS but it's not really ready for primetime yet.

CrazySpence commented 3 years ago

So good news is I can reproduce your problem, I crap out on the teleporter for the same reason so now I'll try and sort that out as that never used to happen

CrazySpence commented 3 years ago

I commented out the block that redefines to _isnan(x) and it compiled

Now im adding the assets to see if it runs

CrazySpence commented 3 years ago

I got it to run but it looks insane, the music is playing, I can see some of the default GFX, but no space, no menu

Maybe this doesn't like the new VCore, or maybe they deprecated the old GLES

uberlinuxguy commented 2 years ago

@mattthias has been poking around today and making me want to get my hands dirty. ... the biggest issue is that openparsec won't compile on 64-bit. I feel like someone once submitted a patch that did some preliminary work, but I don't remember where that was.

I suppose getting a Pi-4 would be a good start... Or perhaps the Pi 3B would be enough horse power to run this beast... more than likely.

I don't even know if windows supports 32-bit apps anymore.... This feeling of getting my hands dirty might be fleeting if the 64-bit hurdle cannot be overcome.

CrazySpence commented 2 years ago

The pi 4 problem is that the new Video Core runs off a different (probably newer) API, i think it does OpenGL directly actually. Will still compile and work fine on a 3 I tried it a few months ago but I haven't looked into it in depth as interest in the project had waned.

If that's changing however I'll dive back in