godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.82k stars 20.14k forks source link

FreeBSD build failure: HAVE_SECURE_GETENV erroneously set for openxr dependency #67838

Open phryk opened 1 year ago

phryk commented 1 year ago

Godot version

4.0.dev (040f49ed6e71a6e7f23d763c4b56095cbf319ef7)

System information

FreeBSD 13.1-RELEASE, GENERIC kernel, amd64

Issue description

When specifying the linuxbsd platform for scons during build, modules/openxr/SCsub defines HAVE_SECURE_GETENV for the openxr third-party dependency. This define implies the existence of the function secure_getenv – which FreeBSD doesn't have.

That in turn leads to the build currently failing on FreeBSD when it encounters this:

#ifdef HAVE_SECURE_GETENV
    return secure_getenv(name);

I can confirm that commenting out the define of HAVE_SECURE_GETENV in modules/openxr/SCsub fixes said build failure on FreeBSD, but am not too sure how to fix this without finally introducing BSD as its own platform.

I also can't speak on whether the other BSDs provide secure_getenv, but a cursory check for corresponding man pages on man.openbsd.org and man.netbsd.org yields no results.

Steps to reproduce

Minimal reproduction project

No response

kdiduk commented 3 months ago

The same issue is present when building on OpenBSD (apart from several others, mentioned in this ticket: #92130)