As an exercise in making Protrekkr more Haiku-friendly, I’m trying to move the configuration file from ./ptk.cfg to ~/config/settings/protrekkr_config but it seems to be read-only. How am I doing this wrong? Code fragment follows:
@SamuraiCrow, you don’t need to manually use setarch if you’re using haikuporter. But you need to invoke it differently: haikuporter protrekkr_x86 so it knows you want the secondary arch, and not the primary one.
I’ve got conflicting definitions of int32_t within the 32-bit version of the code. One is typedef resolved to __haiku_std_int32, and the other identically named typedef resolves to __haiku_int32. It looks like one is from stdlib and the other is from POSIX. Oddly, a seemingly identical solution for int64_t works flawlessly. Now what?
You are mixing “int32” and “int32_t”. On haiku these are different types due to historical BeOS choices. I guess protrekkr tries to define its own int32 type. But on Haiku it can’t do that, because the type is defined in our system headers. So you have to remove the definition on protrekkr side
Without checking the recipe* maybe try to #ifdefHAIKU and #include <SupportDefs.h> for that definition (it works for other places where I’ve seen these conflicting types)?
You could run a search for this at haikuports for some examples.
Strike the above, checked a build on 32bit, worked out OK, launches fine.
A few changes (mostly cosmetic) would be needed for the recipe, also no Deskbar link yet, icon set, binary rename?
EDIT: looked like I pulled in the wrong version for the recipe, the branch you still have has an older version and the new one seems to be in master branch?
I’m getting a bit confused also, I now see 3 different sources, the old recipe still in the repo points to the one from falkTX, you got one here, and there is still the original upstream …
The conflict was because Haiku’s int32 was defined in 2 places, using the one in variables.h solves it (as int32 was already there, was just missing the one for int64).
Thanks! I knew there were conflicting definitions but I didn’t know from the error text where the other one was! I’ll change the one in variables.h to fit.
It looks to me, that the POSIX include is given preference by LibSDL1.2.x over the C standard library. I hope that I don’t have to patch SDL_Config.h in that package just to get the 32 bit Haiku version to work.