bedtools2
bedtools2 copied to clipboard
Building on Windows using MSYS2
Added possibility to build Bedtools on Windows using MSYS2. Required changes:
- Modified Makefile to conditionally add
-D_GNU_SOURCE -D_DEFAULT_SOURCE
definitions on MSYS2. - Changed one of test filenames to exclude filename symbols that are unsupported on Windows (actually only
\
is unsupported, so braces could be returned back if needed). - Added GitHub Actions CI to build and test on MSYS2.
- Added FAQ record to document MSYS2 dependencies installation process.
I also checked that changes are not breaking build on macOS (and also prepared a branch to add macOS CI, can create a pull request if needed).
Thanks for this contribution. I am unfamiliar with MSYS2. Could you elaborate on what this PR accomplishes? I apologize for my ignorance.
@arq5x MSYS2 is a set of tools to build, run and distribute software from Unix-like world on Windows. It provides an implementation of POSIX functions and system calls on top of Windows kernel. Also it contains a terminal with Bash shell and a package manager (lists of packages: https://github.com/msys2/MSYS2-packages, https://github.com/msys2/MINGW-packages).
For one who wishes to build Bedtools2 on Windows it looks like:
- Download MSYS2 environment.
- Run Bash shell in MSYS2 terminal.
- Use package manager
pacman
to install build dependencies:pacman -S gcc make python libbz2-devel liblzma-devel zlib-devel git diffutils
- Clone Bedtools and run
make
in it's folder (this is where the pull request is needed, since not all definitions are set).
The result is a native windows executable bedtools.exe
depending only on one dynamic library msys-2.0.dll
which could be distributed with bedtools.exe.
It could be also possible to add Bedtools package to MSYS2 packages to make it installable like
pacman -S bedtools
.
So for people who need to use Bedtools on Windows it's the solution. I understand that you don't officially support Windows, but it just adds such possibility without breaking anything that already works.
Are there any updates on this PR?
Are there any updates on this PR?
Probably it's question to @arq5x, but for me the request looks good. I am ready to modify it if something is wrong.