flavorjones / mini_portile

mini_portile and mini_portile2 - Simple autoconf and cmake builder for developers
MIT License
114 stars 51 forks source link

Add OpenBSD support #141

Closed postmodern closed 3 months ago

postmodern commented 4 months ago
postmodern commented 4 months ago

I'm not sure pkg_add ruby%3.1 is the correct syntax. Only example I could find is this one: https://github.com/search?q=pkg_add+ruby%253.1&type=code

All other examples show pkg_add ruby-3.1.2, etc.

postmodern commented 4 months ago

https://github.com/kolargol/openvpn/blob/58ff7985cbb4c75153650435393dc8886be07378/openvpn.yml#L14 Appears that pkg_add python%2.7 is pretty common, so it should work.

flavorjones commented 4 months ago

@postmodern Thank you for submitting this! I just kicked off CI.

flavorjones commented 4 months ago

The macos failures are related to the macos-14 defaults that github started using, I'll fix those in a separate PR.

Edit: that PR is #142.

flavorjones commented 4 months ago

I've rebased onto origin/main to pick up #142 fixes.

flavorjones commented 4 months ago

Adding more packages and using gmake in a commit I just appended.

flavorjones commented 4 months ago

Added a commit that I think will fix the cmake tests ... still failing on some pkg-config edge cases we need to look into.

Edit: removed that commit from the PR because it didn't work.

flavorjones commented 4 months ago

Really struggling here ... and the long feedback loops (because timeout tests are taking 2.5 minutes for each retry) are not making it easy. I'm going to try to reduce timeouts so that I can then have faster feedback loops to try to fix the remaining failing tests.

flavorjones commented 4 months ago

@postmodern OK, I'm timing out on this for now.

Things going on in this PR in CI:

postmodern commented 4 months ago

Adding more packages and using gmake in a commit I just appended.

It might be a good idea to test against bsdmake, which is a bit more limited than GNU make.

failures in the CMake suite related to finding the compilers

Are we sure cc is even available by default? Maybe we need to pkg_add clang or pkg_add gcc?

the network timeouts are really bad for some tests -- on the order of 2.5 minutes for each of 3 retries -- and I'm not sure why.

I also get random 1 retrie(s) left for tar.gz (Failed to open TCP connection to localhost:36985 (Connection refused - connect(2) for "localhost" port 36985)) errors when running rake test locally on Fedora Linux.

flavorjones commented 4 months ago

It might be a good idea to test against bsdmake

The issue I was addressing is that the libraries we're using as test subjects (e.g., libyaml) are not compatible with BSD's make, so we need to work around that.

Are we sure cc is even available by default

I chatted with Stan in https://github.com/flavorjones/mini_portile/pull/130 and I'm going to try to write a PR that uses RbConfig to determine the compilers, and this whole problem with the CMake detection may go away. I'll try to get to that this week.

I also get random 1 retrie(s) left for tar.gz ...

Yes, the test suite intentionally exercises the methods with simulated network failures. The problem is that on most platforms, the timeouts are fast and on openbsd for some reason they're very slow (2.5 minutes each x 3 retries).

flavorjones commented 3 months ago

I've rebased this branch onto the branch from #144 which I think will fix the CMake test failures.

flavorjones commented 3 months ago

Rebased once more, should be easier to see failures now.

flavorjones commented 3 months ago

Added a commit: mkmf_config no longer relies on features that openBSD's pkg-config doesn't support.