SDL: Can't build on Illumos (OpenIndiana)

I’ll provide a smaller reproducible in an edit. But for now, this code of mine works on Windows, Mac, Linux, FreeBSD, DragonFly BSD, OpenBSD, and NetBSD. I wanted to support Illumos, and the only platform-specific code I needed to port over was the function I used to get the executable path, which is just a simple call to getexecname() on Illmuos. OpenIndiana is my test OS for this. The errors below.

https://gist.github.com/time-killer-games/0fadf100213c67ce58c5ea7ff578bbee

To reproduce with my personal project:

#!/bin/sh
git clone https://github.com/time-killer-games/libfiledialogs ~/libfiledialogs
~/libfiledialogs/filedialogs/build.sh

Judging from the nature of the errors, it looks like SDL2’s headers were written wrong on Illumos. It should be as simple as building a cpp file including SDL2/SDL.h and an empty main() function, and I’m about to verify that immediately after posting this ticket.

Edit:

Yep, I was corrrect. Empty main() cpp file doesn’t compile and throws the same errors.

#include "SDL2/SDL.h"

int main() {
  return 0;
}

Compiled with:

g++ main.cpp `pkg-config --static --libs sdl2` -o main

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (28 by maintainers)

Commits related to this issue

Most upvoted comments

We’re all happy you are able to keep working with your (undoubtedly) favorite library 😄

I’ve opened https://github.com/libsdl-org/SDL/pull/6136. With those changes, I am able to build SDL2 on OpenIndiana, albeit with disabled dbus.

This wasn’t intentionally closed, it was just automatically done as part of a merge commit.

It’s a fresh install of OpenIndiana, didn’t configure anything on my end at least. Just gcc-11 from the package manager. I’ll file a bug with them and will switch to clang.