flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
168 stars 50 forks source link

fix macos portability issues #6454

Closed garlick closed 3 days ago

garlick commented 3 days ago

Here's a bit of work towards portability of flux-core to macos. This has been going on at a low level for some time, documented in #2892.

Instructions for preschool level macos user like me:

0) install xcode (eh, I typed git and a dialog box did the rest) 1) install homebrew (download pkg from homebrew site) 2) run scripts/install-deps-macos.sh 3) run scripts/configure-macos.sh 4) make

I am moving on to other things today. The current status is compilation fails in libev:

Making all in libev
  CC       ev.lo
ev.c:3036:21: error: variable has incomplete type 'struct itimerspec'
 3036 |   struct itimerspec its = { 0 };
      |                     ^
/opt/homebrew/opt/epoll-shim/include/libepoll-shim/sys/timerfd.h:17:8: note: forward declaration of 'struct itimerspec'
   17 | struct itimerspec;
      |        ^
1 error generated.
garlick commented 3 days ago

Ok, I backed out the attempt at supporting epoll via the shim as this was getting further before I started including the shim headers.

Now I think libev is being built without epoll and we fail when building libflux:

Making all in libflux
  CC       flog.lo
  CC       attr.lo
  CC       handle.lo
handle.c:21:10: fatal error: 'sys/epoll.h' file not found
   21 | #include <sys/epoll.h>
      |          ^~~~~~~~~~~~~
1 error generated.
make[3]: *** [handle.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I'll drop the WIP and I'm fine with merging if you are :-)

garlick commented 3 days ago

OK then, thanks.

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.63%. Comparing base (d00a449) to head (6e3bc87). Report is 11 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6454 +/- ## ========================================== + Coverage 83.62% 83.63% +0.01% ========================================== Files 523 523 Lines 87535 87533 -2 ========================================== + Hits 73198 73210 +12 + Misses 14337 14323 -14 ``` | [Files with missing lines](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | Coverage Δ | | |---|---|---| | [src/broker/boot\_pmi.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fbroker%2Fboot_pmi.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2Jyb2tlci9ib290X3BtaS5j) | `66.11% <100.00%> (ø)` | | | [src/cmd/builtin/relay.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcmd%2Fbuiltin%2Frelay.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NtZC9idWlsdGluL3JlbGF5LmM=) | `80.59% <100.00%> (ø)` | | | [src/common/libflux/future.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibflux%2Ffuture.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJmbHV4L2Z1dHVyZS5j) | `88.77% <ø> (ø)` | | | [src/common/libhostlist/hostlist.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibhostlist%2Fhostlist.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJob3N0bGlzdC9ob3N0bGlzdC5j) | `94.37% <ø> (ø)` | | | [src/common/libhostlist/hostrange.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibhostlist%2Fhostrange.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJob3N0bGlzdC9ob3N0cmFuZ2UuYw==) | `96.44% <100.00%> (ø)` | | | [src/common/libpmi/upmi\_libpmi.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibpmi%2Fupmi_libpmi.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJwbWkvdXBtaV9saWJwbWkuYw==) | `79.59% <100.00%> (+0.53%)` | :arrow_up: | | [src/common/libpmi/upmi\_libpmi2.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibpmi%2Fupmi_libpmi2.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJwbWkvdXBtaV9saWJwbWkyLmM=) | `79.08% <100.00%> (+0.40%)` | :arrow_up: | | [src/common/libutil/fdwalk.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibutil%2Ffdwalk.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJ1dGlsL2Zkd2Fsay5j) | `100.00% <100.00%> (ø)` | | | [src/common/libutil/ipaddr.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibutil%2Fipaddr.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJ1dGlsL2lwYWRkci5j) | `81.08% <100.00%> (ø)` | | | [src/common/libutil/popen2.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree&filepath=src%2Fcommon%2Flibutil%2Fpopen2.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NvbW1vbi9saWJ1dGlsL3BvcGVuMi5j) | `72.95% <ø> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-core/pull/6454/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)

🚨 Try these New Features: