hpc / hpc/mpifileutils

mpifileutils does not build on FreeBSD / non-Linux platforms

Open
#676 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
200
Forks
85
Avg merge
3d 21h
Merged PRs (30d)
2

Description

mpifileutils does not build on FreeBSD / non-Linux platforms

Problem

mpifileutils currently fails to build on FreeBSD (and non-Linux platforms generally) due to unconditional use of Linux-only APIs, headers, and syscalls:

  • <sys/vfs.h>, <linux/fs.h>, <linux/fiemap.h>, <linux/limits.h>, <lustre/lustre_user.h> included unconditionally
  • stat64 / lstat64 / truncate64 used directly (not available on FreeBSD, where 64-bit stat is the default)
  • SYS_getdents via syscall() instead of the getdents(2) libc wrapper
  • sysinfo(2) / struct sysinfo in the bzip2/libcircle path
  • setxattr() and FIEMAP-based extent copy used without platform guards
  • O_NOATIME, O_LARGEFILE, POSIX_FADV_SEQUENTIAL missing fallbacks
Proposed fix

PR #664 addresses all of the above with minimal, surgical #ifdef __linux__ guards and small compatibility shims. Linux behavior is entirely unchanged — all fast paths remain enabled on Linux.

Prior art / validation

The patches from PR #664 have already been validated through the FreeBSD ports review process and are currently shipping in production as port patches for sysutils/mpifileutils in the official FreeBSD ports tree:

Those port patches reference PR #664 as the intended upstream home. Carrying them indefinitely as out-of-tree patches is ongoing maintenance overhead for the FreeBSD community — upstreaming them removes that burden cleanly.

Request

Please review and merge PR #664, or provide feedback on what would need to change. Happy to split the PR into smaller pieces if that helps the review process.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #664 and its referenced FreeBSD ports patches, then inspect the unconditional Linux headers, filesystem calls, syscalls, and missing flag fallbacks listed in this issue. Validate the changes by building mpifileutils on FreeBSD or another non-Linux platform while confirming Linux behavior remains unchanged; done means the portability fixes are upstreamed rather than carried as port patches.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.