Issue: FASTA file processing fails on Apple Silicon (arm64) Macs due to incompatible native library
Description
When uploading FASTA files to Haplogrep 3 on an Apple Silicon (arm64) Mac, the processing hangs indefinitely with "Analyzing data..." and never completes. This is due to an UnsatisfiedLinkError when loading the native BWA JNI library libbwajni.jnilib, which is compiled for x86_64 architecture.
VCF files work fine, but FASTA requires alignment via BWA, triggering the error.
Environment
- OS: macOS (Apple Silicon, arm64)
- Java: OpenJDK 21 (or version used)
- Haplogrep Version: 3.2.2
- Architecture: arm64
Steps to Reproduce
- Build and run Haplogrep 3 server on an arm64 Mac.
- Upload a FASTA file (e.g., small test file like H100.fasta).
- Observe that the job status remains "RUNNING" and never completes.
Expected Behavior
FASTA files should process successfully, just like VCF files.
Actual Behavior
Job hangs; error in logs:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /path/to/jbwa-data/libbwajni.jnilib: dlopen(/path/to/jbwa-data/libbwajni.jnilib, 0x0001): tried: '/path/to/jbwa-data/libbwajni.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Root Cause
The libbwajni.jnilib in jbwa-data/ is x86_64-only. Apple Silicon Macs need an arm64 version.
Suggested Fix
- Provide an arm64-compatible
libbwajni.jnilib (or universal binary).
- Alternatively, allow skipping BWA alignment for FASTA if not required, or use a cross-platform alternative.
Additional Context
- VCF uploads work without issues.
- Tested with small FASTA files; issue occurs immediately on upload.
- Related to BWA JNI dependency for FASTA input.
Issue: FASTA file processing fails on Apple Silicon (arm64) Macs due to incompatible native library
Description
When uploading FASTA files to Haplogrep 3 on an Apple Silicon (arm64) Mac, the processing hangs indefinitely with "Analyzing data..." and never completes. This is due to an
UnsatisfiedLinkErrorwhen loading the native BWA JNI librarylibbwajni.jnilib, which is compiled for x86_64 architecture.VCF files work fine, but FASTA requires alignment via BWA, triggering the error.
Environment
Steps to Reproduce
Expected Behavior
FASTA files should process successfully, just like VCF files.
Actual Behavior
Job hangs; error in logs:
Root Cause
The
libbwajni.jnilibinjbwa-data/is x86_64-only. Apple Silicon Macs need an arm64 version.Suggested Fix
libbwajni.jnilib(or universal binary).Additional Context