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 MacOS support #17

Closed
fabio-t opened this issue Mar 30, 2017 · 8 comments
Closed

Fix MacOS support #17

fabio-t opened this issue Mar 30, 2017 · 8 comments
Assignees

Comments

@fabio-t
Copy link
Member

fabio-t commented Mar 30, 2017

It's almost done, but there's still some weirdness. Must try it in a few more macs.

@fabio-t fabio-t self-assigned this Mar 30, 2017
@fabio-t
Copy link
Member Author

fabio-t commented Mar 30, 2017

Current issues: the following dependency formatting doesn't work for some (it worked for joseph, and in a clean virtual environment):

ngslib;platform_system=='Linux'

It either tries to compile it, and fails of course, or it crashes on pip setup.py egg_info. @jovesus can you paste the error message here?

@fabio-t
Copy link
Member Author

fabio-t commented Mar 30, 2017

Right now, if the user first installs python via Homebrew, there shouldn't be problems. Hopefully.

brew install python
pip install rgt --user

More testing needs to be done.

@fabio-t
Copy link
Member Author

fabio-t commented Jul 11, 2017

Pysam caused MacOS regressions in the last few versions. While waiting for the fix, we've had to block the pysam dependency to version 1.11.1.

For reference: pysam-developers/pysam#475

@fabio-t
Copy link
Member Author

fabio-t commented Jul 11, 2017

Triplexes is not compiled for Mac. @jovesus could you have a look at that (when you are back)?

@zjin1126
Copy link

SeqAn C++ template is not compatible with LLVM libc++, which used by clang in default settings.
Compile Triplexes with GNU libstdc++ can bypass this problem.

Build Triplexes without OpenMP:

SRC_ROOT=/path/to/triplexes

cmake $SRC_ROOT \
-DCMAKE_CXX_FLAGS="-stdlib=libstdc++" \
-DCMAKE_BUILD_TYPE=Release \
-DSHAREDLIBRARY=TRUE

make

Pre-installed clang on macOS doesn't support OpenMP, so install clang via Homebrew.
Build Triplexes with OpenMP:

brew install llvm # clang with openmp support

export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++

cmake $SRC_ROOT \
-DCMAKE_CXX_FLAGS="-I/usr/local/opt/llvm/include -stdlib=libstdc++" \
-DCMAKE_C_FLAGS="-I/usr/local/opt/llvm/include" \
-DCMAKE_SHARED_LINKER_FLAGS="-L/usr/local/opt/llvm/lib" \
-DOpenMP_C_FLAGS="-fopenmp" \
-DOpenMP_CXX_FLAGS="-fopenmp" \
-DCMAKE_BUILD_TYPE=Release \
-DSHAREDLIBRARY=TRUE

make

These cmake options can let rgt-TDF run on macOS.

After compile, copy libtriplexator.dylib to rgtdata/lib and modify path_triplexator in data.config to path_triplexator=$HOME/rgtdata/lib/libtriplexator.dylib.

@fabio-t
Copy link
Member Author

fabio-t commented Jul 12, 2017

@zjin1126 this is VERY helpful! Thanks. We will give this a try soon.

@chaochungkuo
Copy link
Member

@zjin1126 Thank you for your contribution. Last week I tried to install openMP on mac and use llvm to compile, but because of not having sufficient understanding of cmake, I couldn't work it out. Your comment solves our problem exactly. Thank you.

Now if RGT is successfully installed on Mac, it works as nrmal as on Linux.

@fabio-t
Copy link
Member Author

fabio-t commented Nov 17, 2017

I'm fairly sure now RGT works fine on Mac. We'll open specific issues in the future, in case of need.

@fabio-t fabio-t closed this as completed Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants