mpifileutils does not build on FreeBSD / non-Linux platforms
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 unconditionallystat64/lstat64/truncate64used directly (not available on FreeBSD, where 64-bit stat is the default)SYS_getdentsviasyscall()instead of thegetdents(2)libc wrappersysinfo(2)/struct sysinfoin the bzip2/libcircle pathsetxattr()andFIEMAP-based extent copy used without platform guardsO_NOATIME,O_LARGEFILE,POSIX_FADV_SEQUENTIALmissing 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:
- Ports commit: 5f283cddd7b7
- Original ports PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291679
- FreeBSD Differential (patchset review): https://reviews.freebsd.org/D54230
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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