Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on FreeBSD #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dnebdal
Copy link

@dnebdal dnebdal commented Apr 3, 2019

In case you want them, these are the changes I had to do to make this compile and run on FreeBSD.

This fixes three separate issues:

  1. It uses clang as CC, since that's the default compiler on FreeBSD i386 and amd64.
    I used the same prefix/suffix logic as for GCC, except that it has to handle how "clang" is typically in /usr/bin, but the suffixed versions (installed from packages) are typically in /usr/local/bin.
  2. Handle uname -m returning "amd64" instead of "x86_64"
  3. Detect freebsd as a nix-style OS in hisat2.

2 and 3 alone should be enough assuming you install gcc first - but the code compiles fine with clang, so that seems unnecessary. In the long run, I guess a cleaner solution would be to respect CC/CPP/CXX if those are set in the environment, and otherwise default to gcc/clang depending on either the OS or just which one is available.

@dnebdal dnebdal changed the title Compile on FreeBSD Fix compilation on FreeBSD Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant