biocore-ntnu / epic2

Ultraperformant reimplementation of SICER
https://doi.org/10.1093/bioinformatics/btz232
MIT License
56 stars 9 forks source link

epic2 does not install #26

Closed MatthewMassett closed 5 years ago

MatthewMassett commented 5 years ago

Morning

I am trying to install on MacOSX (mojave OS)

I used pip install to install all dependencies as detailed in the documentation

when i run pip install epic2

It does not compile. Instead it says "CompileError: command 'gcc' failed with exit status 1"

I have xcode installed and xcode command tools installed

Please could you help me install this package!

endrebak commented 5 years ago

Can you please post the full output after pip install epic2? Thanks for reporting :)

MatthewMassett commented 5 years ago
Collecting epic2
  Using cached https://files.pythonhosted.org/packages/ec/a5/030289c7f2735ecf129809c20ac4fedf2854f197f890cc292887e25eccbe/epic2-0.0.36.tar.gz
...
  running build_ext
  building 'epic2.src.reads_to_bins' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/epic2
  creating build/temp.macosx-10.14-x86_64-3.7/epic2/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/matt/miniconda/include -I/private/var/folders/01/3h1d45px2nd_gj4lxs84ffy00000gp/T/pip-install-nbrvywwi/epic2/epic2/src -I/private/var/folders/01/3h1d45px2nd_gj4lxs84ffy00000gp/T/pip-install-nbrvywwi/epic2 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/reads_to_bins.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/reads_to_bins.o -Ofast -Wall -std=c++11
  epic2/src/reads_to_bins.cpp:2940:30: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare]
      __pyx_t_12 = ((__pyx_v_i != (__pyx_t_14 - 1)) != 0);
                     ~~~~~~~~~ ^   ~~~~~~~~~~~~~~
  1 warning generated.
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/matt/miniconda/include -I/private/var/folders/01/3h1d45px2nd_gj4lxs84ffy00000gp/T/pip-install-nbrvywwi/epic2/epic2/src -I/private/var/folders/01/3h1d45px2nd_gj4lxs84ffy00000gp/T/pip-install-nbrvywwi/epic2 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/gzstream.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/gzstream.o -Ofast -Wall -std=c++11
  clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/epic2/src/reads_to_bins.o build/temp.macosx-10.14-x86_64-3.7/epic2/src/gzstream.o -L/Users/matt/miniconda/lib -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -lz -o build/lib.macosx-10.14-x86_64-3.7/epic2/src/reads_to_bins.cpython-37m-darwin.so
  building 'epic2.src.SICER_stats' extension
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/SICER_stats.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats.o -Ofast -Wall -std=c++11
  clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats.cpython-37m-darwin.so
  building 'epic2.src.SICER_stats2' extension
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/SICER_stats2.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats2.o -Ofast -Wall -std=c++11
  clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats2.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.14-x86_64-3.7/epic2/src/SICER_stats2.cpython-37m-darwin.so
  building 'epic2.src.statistics' extension
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/statistics.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/statistics.o -Ofast -Wall -std=c++11
  clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/epic2/src/statistics.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.14-x86_64-3.7/epic2/src/statistics.cpython-37m-darwin.so
  building 'epic2.src.find_islands' extension
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/find_islands.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/find_islands.o -Ofast -Wall -std=c++11
  clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/epic2/src/find_islands.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.14-x86_64-3.7/epic2/src/find_islands.cpython-37m-darwin.so
  building 'epic2.src.read_bam' extension
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/pysam -I/usr/local/lib/python3.7/site-packages/pysam/include/htslib -I/usr/local/lib/python3.7/site-packages/pysam/include/samtools -I/Users/matt/miniconda/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c epic2/src/read_bam.cpp -o build/temp.macosx-10.14-x86_64-3.7/epic2/src/read_bam.o -Ofast -Wall -std=c++11
  In file included from epic2/src/read_bam.cpp:672:
  /usr/local/lib/python3.7/site-packages/pysam/include/htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
          if (fp->limit - fp->begin < nbytes){
              ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
  In file included from epic2/src/read_bam.cpp:655:
  /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:4117:5: error: no matching function for call to '__sort'
      __sort<_Comp_ref>(__first, __last, __comp);
      ^~~~~~~~~~~~~~~~~
  epic2/src/read_bam.cpp:3310:12: note: in instantiation of function template specialization 'std::__1::sort<std::__1::__wrap_iter<__pyx_t_5epic2_3src_8read_bam_interval *>, unsigned int (__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)>' requested here
        std::sort<std::vector<__pyx_t_5epic2_3src_8read_bam_interval> ::iterator,uint32_t (__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)>(__pyx_v_intervals.begin(), __pyx_v_intervals.end(), __pyx_f_5epic2_3src_8read_bam_compare_start_end);
             ^
  /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:3914:1: note: candidate function template not viable: no known conversion from 'unsigned int (*)(__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)' to 'unsigned int (&)(__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)' for 3rd argument; dereference the argument with *
  __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
  ^
  /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:2193:15: error: no matching function for call to 'adjacent_find'
      __first = _VSTD::adjacent_find<_ForwardIterator, typename add_lvalue_reference<_BinaryPredicate>::type>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /Library/Developer/CommandLineTools/usr/include/c++/v1/__config:508:15: note: expanded from macro '_VSTD'
  #define _VSTD std::_LIBCPP_NAMESPACE
                ^
  epic2/src/read_bam.cpp:3319:43: note: in instantiation of function template specialization 'std::__1::unique<std::__1::__wrap_iter<__pyx_t_5epic2_3src_8read_bam_interval *>, unsigned int (__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)>' requested here
        (void)(__pyx_v_intervals.erase(std::unique<std::vector<__pyx_t_5epic2_3src_8read_bam_interval> ::iterator,uint32_t (__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)>(__pyx_v_intervals.begin(), __pyx_v_intervals.end(), __pyx_f_5epic2_3src_8read_bam_start_end_equal), __pyx_v_intervals.end()));
                                            ^
  /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:1217:1: note: candidate function template not viable: no known conversion from 'unsigned int (*)(__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)' to 'unsigned int (&)(__pyx_t_5epic2_3src_8read_bam_interval, __pyx_t_5epic2_3src_8read_bam_interval)' for 3rd argument; dereference the argument with *
  adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred)
  ^
  /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:1235:1: note: candidate function template not viable: requires 2 arguments, but 3 were provided
  adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
  ^
  1 warning and 2 errors generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for epic2
  Running setup.py clean for epic2
Failed to build epic2
MatthewMassett commented 5 years ago

Thanks very much for your help:) I think the main issue is error: command 'clang' failed with exit status 1

endrebak commented 5 years ago

I am guessing your C++ algorithm.h is different from what is required. Do you have a linux machine to use epic2 on? Could not reproduce your error, unfortunately.

endrebak commented 5 years ago

Will continue to think about what might be causing it though :)

MatthewMassett commented 5 years ago

Unfortunately i do not! Such a shame because i really need it. The old sicer 1.1 version has limited genomes and other issues (not least of all that it is not user friendly!)

Please do try and fix this as i really want to use epic2!! :)

endrebak commented 5 years ago

Before I start asking other people for help, could you please run

conda install gcc and trying pip install epic2 again?

And if that does not work, could you try conda install -c conda-forge cxx-compiler before running pip install epic2?

Please post the output from the line that says running build_ext (like I edited your comment to do above).

endrebak commented 5 years ago

Could you please try

pip install epic2==0.0.39? I was able to reproduce and fix the error on my macOS machine :)

MatthewMassett commented 5 years ago

Will do! Thanks very much. Fingers crossed.

Kind regards,

Matthew

Get Outlook for Androidhttps://aka.ms/ghei36


From: Endre Bakken Stovner notifications@github.com Sent: Wednesday, August 21, 2019 9:51:05 AM To: biocore-ntnu/epic2 epic2@noreply.github.com Cc: MatthewMassett mattmassett@hotmail.co.uk; Author author@noreply.github.com Subject: Re: [biocore-ntnu/epic2] epic2 does not install (#26)

Could you please try

pip install epic2==0.0.39? I was able to reproduce and fix the error on my macOS machine :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/biocore-ntnu/epic2/issues/26?email_source=notifications&email_token=AMUKZFVAINLAHW5ASRDYIXTQFT6XTA5CNFSM4IEN56GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4Y6DFI#issuecomment-523362709, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMUKZFS7AMXCMC6HHPNCUTTQFT6XTANCNFSM4IEN56GA.

endrebak commented 5 years ago

Closing. Feel free to reopen if you encounter more problems :)