Compiling VVVVVV on Haiku

VVVVVV just had its source code opened up on GitHub. Seeing as no one has seemingly tried to compile it on Haiku, I tried doing it myself here. It needs libsdl2_devel and sdl2_mixer_devel, along with their dependencies.

Building it on x86_64 is successful after adding a few defined(__HAIKU__) in some of the source files, however the compile fails at linking with this:

/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `calculateBaseDir':
physfs.c:(.text+0x1efc): undefined reference to `__PHYSFS_platformCalcBaseDir'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `PHYSFS_init':
physfs.c:(.text+0x20dd): undefined reference to `__PHYSFS_platformInit'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `doDeinit':
physfs.c:(.text+0x273f): undefined reference to `__PHYSFS_platformDeinit'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `PHYSFS_getCdRomDirs':
physfs.c:(.text+0x2f3f): undefined reference to `__PHYSFS_platformDetectAvailableCDs'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): relocation R_X86_64_PC32 against undefined hidden symbol `__PHYSFS_platformDetectAvailableCDs' can not be used when making a shared object
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
CMakeFiles/VVVVVV.dir/build.make:551: recipe for target 'VVVVVV' failed
make[2]: *** [VVVVVV] Error 1
CMakeFiles/Makefile2:137: recipe for target 'CMakeFiles/VVVVVV.dir/all' failed
make[1]: *** [CMakeFiles/VVVVVV.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

If there’s anyone who could help with this, it’d be greatly appreciated.

1 Like

You will need a physfs_platform enabled.
Hopefully that points you in the right direction.

I see that the program uses the built-in version of physfs.
I think it is necessary to configure (or patch) to use system physfs library (from haikuports).

Wouldn’t that mean Haiku support can’t be merged into mainline @3dEyes? I think any support can only be merged if it can work with the static libraries included.

Looked into physfs_platforms.h and it seems that it doesn’t use that file when on Haiku:

Yeah my bad.
Well anyway, this is missing:

1 Like

System physfs library used.


On what platform was this done? Also, what changes were made to get it to use the system library?

Another thing that should be addressed, does the game’s custom license of not allowing commercial use prevent it from being packaged up and put into Haiku’s repos?

Of course, this can also be a self-created license

Just to clarify, does this refer to a custom license from the packager or the original author?

Haiku allows to use the common licenses for packages, but it also allows to use custom license too (so one can just copy the original license into the package).
Haiku is non-commercial use, thus there should be no problem with packaging.

Yes, you put a own license file into your package folder in the license Folder and this one are add it the system license finde during installation. But it need to be a diffent one (name) as current in the system

On what platform was this done?

I use Haiku x86_64, but what’s the difference? This will work on a 32 bit systems also.

Also, what changes were made to get it to use the system library?

remove “…/third_party/physfs” line from INCLUDE_DIRECTORIES
remove “ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})” line
change physfs-static to physfs in “TARGET_LINK_LIBRARIES(VVVVVV physfs-static tinyxml-static lodepng-static)” line

LOL. Is it weird my first thought when I saw VVVVVV was open sourced was "I should port that to Haiku.
Thanks for beating me to it :slight_smile:

Be sure to upstream anything you can to VVVVVV’s github via PR’s

After working with one of the maintainers of VVVVVV (flibitijibibo), the game can now be built from master using the static PhysicsFS library:


If a package for it will be built, should it use upstream or a modified fork that uses the system’s PhysicsFS library (as a dependency)?

Addendum: I’ve also sent an email to Terry Cavanagh (game creator), asking if a license exception can be made for Haiku that will allow us to distribute the game data along with the code itself. Will update back when he responds.


Sure, if the game does not run without it, you need to add all dependencies

Thanks, upstream will only need libsdl2 and sdl2_mixer.

Update: Terry Cavanagh has given permission for a Haiku package of the game to come with the data files as a license exception.

Now I gotta figure out how to make a package and get it into the repos. :sweat_smile:


You can get started here:

Read through the wiki home page and then click the link that says A Gentle Introduction to HaikuPorter #1
You can also look at the already existing recipes for reference ofc.