Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code to build on OpenBSD #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add code to build on OpenBSD #469

wants to merge 1 commit into from

Conversation

rfht
Copy link

@rfht rfht commented May 25, 2019

First addition to account for OpenBSD as build platform.

  • Adds openbsd to platform detection.
  • Create config/openbsd with build files based on Linux, but using cc/c++/cpp instead of gcc/g++/gpp and inclusion of /usr/{local,X11R6}/{include,lib} for headers/linking.
  • stub DISABLE_WARNINGS() and ENABLE_WARNINGS() because Linux code is incompatible with clang compiler
  • workaround for CLOCKS_PER_SEC like with FreeBSD
  • add default: to switch statements in Remotery.c because otherwise build fails with error that some cases in the enum are not accounted for

Result is a successful build on my OpenBSD amd64 machine, but about half of the tests fail and runtime hasn't been tested yet. This is planned to be addressed in next steps.

Tail of the build log:

tests:                                                                                              
    [Tests] [LWJGL] Version: 3.2.3 SNAPSHOT                                                         
    [Tests] [LWJGL]      OS: OpenBSD v6.5                                                           
    [Tests] [LWJGL]     JRE: 1.8.0_202 amd64                                                        
    [Tests] [LWJGL]     JVM: OpenJDK 64-Bit Server VM v25.202-b08 by Oracle Corporation             
    [Tests] [LWJGL] Loading library (system): lwjgl                                                 
    [Tests]                                                                                         
    [Tests] ===============================================                                         
    [Tests] LWJGL cross-platform tests                                                              
    [Tests] Total tests run: 417, Failures: 406, Skips: 8                                           
    [Tests] Configuration Failures: 1, Skips: 1                                                     
    [Tests] ===============================================                                         
    [Tests]                                                                                         
    [Tests] The tests failed.                                                                       
                                                                                                    
all:                                                                                                
                                                                                                    
BUILD SUCCESSFUL                                                                                    
Total time: 6 minutes 41 seconds

Full build log (with slightly different configuration; from previous draft of the patches) at https://gist.github.com/rfht/27d246a25f7806b365a6278061eecf19

@qbit
Copy link

qbit commented Jun 28, 2019

I can offer a CI environment for testing (it’s OpenBSD-current running jenkins and hosted by https://openbsd.amsterdam/).

@Spasi
Copy link
Member

Spasi commented Jul 13, 2019

Hey @rfht and @qbit,

Due to limited time and already having a ton of bindings and platforms/architectures to deal with, I will not be able to properly support OpenBSD (or other BSDs or any other OS that is not Linux/macOS/Windows).

However, I'm now completing a refactoring that should make adding new platforms & architectures simpler. I'm willing to accept patches similar to this PR, assuming:

  • There are no requirements for significantly altering the build script structure.
  • There are no expectations that I will do maintenance/building/testing of the new platform.

Ideally, there will be a fork that people interested in OpenBSD will contribute to and keep in sync with upstream. The fork will probably have additional patches dealing with CI, dealing with major native library incompatibilities, etc. If it goes well and there are active contributors and real interest, we could talk about closer collaboration in the future (e.g. publishing official Maven artifacts for OpenBSB and adding OpenBSD support to the website's build customizer).

@aosync
Copy link

aosync commented Dec 29, 2020

Hello ! What's the state of OpenBSD support now ?
Is it still not considered ?

@Spasi Spasi force-pushed the master branch 2 times, most recently from c71e4cb to 6da65e3 Compare November 15, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Build Targets
Development

Successfully merging this pull request may close these issues.

4 participants