njbradley / bcr-dist

A scientific library that computes the relative distances between bcr sequences
MIT License
1 stars 1 forks source link

Compilation issues #2

Closed wyattmcdonnell closed 3 years ago

wyattmcdonnell commented 3 years ago

Hey @njbradley, details on errors we're hitting below. Thanks for taking a look!

Building on the following OS:

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

Python version: 3.7.4 Clang: clang version 9.0.1, target x86_64-unknown-linux-gnu, thread model posix

running install
running bdist_egg
running egg_info
writing bcrdist.egg-info/PKG-INFO
writing dependency_links to bcrdist.egg-info/dependency_links.txt
writing top-level names to bcrdist.egg-info/top_level.txt
reading manifest file 'bcrdist.egg-info/SOURCES.txt'
writing manifest file 'bcrdist.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'bcrdist.cbcrdist' extension
/mnt/build/toolchains/versions/2.3.9/bin/clang -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ibcrdist/cmodule/scripts/packages -I/mnt/home/wyatt.mcdonnell/anaconda3/include/python3.7m -c bcrdist/cmodule/bcrdistmodule.cc -o build/temp.linux-x86_64-3.7/bcrdist/cmodule/bcrdistmodule.o
In file included from bcrdist/cmodule/bcrdistmodule.cc:3:
In file included from /mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
 ^
bcrdist/cmodule/bcrdistmodule.cc:140:27: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = 0; i < heavy_str.length() and i < light_str.length(); i ++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~
bcrdist/cmodule/bcrdistmodule.cc:140:54: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = 0; i < heavy_str.length() and i < light_str.length(); i ++) {
                                                   ~ ^ ~~~~~~~~~~~~~~~~~~
bcrdist/cmodule/bcrdistmodule.cc:246:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = 0; i < itable.headers.size()-1; i ++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
In file included from bcrdist/cmodule/bcrdistmodule.cc:5:
In file included from bcrdist/cmodule/scripts/cell.h:4:
In file included from bcrdist/cmodule/scripts/classes.h:4:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/iostream:37:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/ios:215:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__locale:14:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/string:504:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/string_view:175:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__string:56:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/algorithm:643:
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:58: warning: destructor called on non-final 'dsbcell' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1742:18: note: in instantiation of member function 'std::__1::allocator<dsbcell>::destroy' requested here
            {__a.destroy(__p);}
                 ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1595:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<dsbcell> >::__destroy<dsbcell>' requested here
            {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
             ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:426:25: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<dsbcell> >::destroy<dsbcell>' requested here
        __alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(--__soon_to_be_end));
                        ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:369:29: note: in instantiation of member function 'std::__1::__vector_base<dsbcell, std::__1::allocator<dsbcell> >::__destruct_at_end' requested here
    void clear() _NOEXCEPT {__destruct_at_end(__begin_);}
                            ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:463:9: note: in instantiation of member function 'std::__1::__vector_base<dsbcell, std::__1::allocator<dsbcell> >::clear' requested here
        clear();
        ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:495:5: note: in instantiation of member function 'std::__1::__vector_base<dsbcell, std::__1::allocator<dsbcell> >::~__vector_base' requested here
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    ^
bcrdist/cmodule/bcrdistmodule.cc:11:17: note: in instantiation of member function 'std::__1::vector<dsbcell, std::__1::allocator<dsbcell> >::vector' requested here
vector<dsbcell> cells;
                ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:64: note: qualify call to silence this warning
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                               ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:58: warning: destructor called on non-final 'ssbcell' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1742:18: note: in instantiation of member function 'std::__1::allocator<ssbcell>::destroy' requested here
            {__a.destroy(__p);}
                 ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1595:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<ssbcell> >::__destroy<ssbcell>' requested here
            {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
             ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:296:25: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<ssbcell> >::destroy<ssbcell>' requested here
        __alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
                        ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:141:10: note: in instantiation of member function 'std::__1::__split_buffer<ssbcell, std::__1::allocator<ssbcell> &>::__destruct_at_end' requested here
        {__destruct_at_end(__new_last, false_type());}
         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:88:10: note: in instantiation of member function 'std::__1::__split_buffer<ssbcell, std::__1::allocator<ssbcell> &>::__destruct_at_end' requested here
        {__destruct_at_end(__begin_);}
         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:341:5: note: in instantiation of member function 'std::__1::__split_buffer<ssbcell, std::__1::allocator<ssbcell> &>::clear' requested here
    clear();
    ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:1672:49: note: in instantiation of member function 'std::__1::__split_buffer<ssbcell, std::__1::allocator<ssbcell> &>::~__split_buffer' requested here
    __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
                                                ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:1699:9: note: in instantiation of function template specialization 'std::__1::vector<ssbcell, std::__1::allocator<ssbcell> >::__emplace_back_slow_path<std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > &>' requested here
        __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...);
        ^
bcrdist/cmodule/bcrdistmodule.cc:71:26: note: in instantiation of function template specialization 'std::__1::vector<ssbcell, std::__1::allocator<ssbcell> >::emplace_back<std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > &>' requested here
      self->single_cells.emplace_back(ss);
                         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:64: note: qualify call to silence this warning
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                               ^
6 warnings generated.
/mnt/build/toolchains/versions/2.3.9/bin/clang -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ibcrdist/cmodule/scripts/packages -I/mnt/home/wyatt.mcdonnell/anaconda3/include/python3.7m -c bcrdist/cmodule/scripts/table.cc -o build/temp.linux-x86_64-3.7/bcrdist/cmodule/scripts/table.o
bcrdist/cmodule/scripts/table.cc:80:21: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::size_type' (aka 'unsigned long') [-Wsign-compare]
                for (int i = 0; i < headers.size(); i ++) {
                                ~ ^ ~~~~~~~~~~~~~~
1 warning generated.
/mnt/build/toolchains/versions/2.3.9/bin/clang -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ibcrdist/cmodule/scripts/packages -I/mnt/home/wyatt.mcdonnell/anaconda3/include/python3.7m -c bcrdist/cmodule/scripts/cell.cc -o build/temp.linux-x86_64-3.7/bcrdist/cmodule/scripts/cell.o
bcrdist/cmodule/scripts/cell.cc:70:20: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = 0; i < seq1.length(); i ++) {
                        ~ ^ ~~~~~~~~~~~~~
bcrdist/cmodule/scripts/cell.cc:112:9: warning: unused variable 'size' [-Wunused-variable]
                                int size = matches.size();
                                    ^
bcrdist/cmodule/scripts/cell.cc:97:20: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = 0; i < shorter.length(); i ++) {
                        ~ ^ ~~~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/cell.cc:106:132: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                                while (shorter.substr(match.seq1start, match.len) == longer.substr(match.seq2start, match.len) and match.seq2start + match.len <= longer.length()) {
                                                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/cell.cc:142:24: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<aa_match, std::__1::allocator<aa_match> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                        if (final_new_end+1 < matches.size()) {
                            ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/cell.cc:161:35: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = shorter.length(); i < longer.length(); i ++) {
                                       ~ ^ ~~~~~~~~~~~~~~~
6 warnings generated.
/mnt/build/toolchains/versions/2.3.9/bin/clang -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ibcrdist/cmodule/scripts/packages -I/mnt/home/wyatt.mcdonnell/anaconda3/include/python3.7m -c bcrdist/cmodule/scripts/data.cc -o build/temp.linux-x86_64-3.7/bcrdist/cmodule/scripts/data.o
/mnt/build/toolchains/versions/2.3.9/bin/clang -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/home/wyatt.mcdonnell/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ibcrdist/cmodule/scripts/packages -I/mnt/home/wyatt.mcdonnell/anaconda3/include/python3.7m -c bcrdist/cmodule/scripts/fileio.cc -o build/temp.linux-x86_64-3.7/bcrdist/cmodule/scripts/fileio.o
bcrdist/cmodule/scripts/fileio.cc:68:21: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<dsbcell, std::__1::allocator<dsbcell> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                for (int i = 0; i < cells.size(); i ++) {
                                ~ ^ ~~~~~~~~~~~~
bcrdist/cmodule/scripts/fileio.cc:114:14: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                         ^~~~~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/fileio.cc:114:14: note: insert an explicit cast to silence this issue
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                         ^~~~~~~~~~~~~~~~~~
                                         static_cast<char>()
bcrdist/cmodule/scripts/fileio.cc:114:34: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                                             ^~~~~~~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/fileio.cc:114:34: note: insert an explicit cast to silence this issue
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                                             ^~~~~~~~~~~~~~~~~~~~
                                                             static_cast<char>(  )
bcrdist/cmodule/scripts/fileio.cc:114:56: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                                                                   ^~~~~~~~~~~~~~~~~~~~
bcrdist/cmodule/scripts/fileio.cc:114:56: note: insert an explicit cast to silence this issue
                                codon c {toupper(nucseq[j]), toupper(nucseq[j+1]), toupper(nucseq[j+2])};
                                                                                   ^~~~~~~~~~~~~~~~~~~~
                                                                                   static_cast<char>(  )
bcrdist/cmodule/scripts/fileio.cc:113:22: warning: comparison of integers of different signs: 'int' and 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                        for (int j = 0; j < nucseq.length(); j += 3) {
                                        ~ ^ ~~~~~~~~~~~~~~~
In file included from bcrdist/cmodule/scripts/fileio.cc:4:
In file included from bcrdist/cmodule/scripts/fileio.h:4:
In file included from bcrdist/cmodule/scripts/classes.h:4:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/iostream:37:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/ios:215:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__locale:14:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/string:504:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/string_view:175:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__string:56:
In file included from /mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/algorithm:643:
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:58: warning: destructor called on non-final 'dsbcell' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1742:18: note: in instantiation of member function 'std::__1::allocator<dsbcell>::destroy' requested here
            {__a.destroy(__p);}
                 ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1595:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<dsbcell> >::__destroy<dsbcell>' requested here
            {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
             ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:296:25: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<dsbcell> >::destroy<dsbcell>' requested here
        __alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
                        ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:141:10: note: in instantiation of member function 'std::__1::__split_buffer<dsbcell, std::__1::allocator<dsbcell> &>::__destruct_at_end' requested here
        {__destruct_at_end(__new_last, false_type());}
         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:88:10: note: in instantiation of member function 'std::__1::__split_buffer<dsbcell, std::__1::allocator<dsbcell> &>::__destruct_at_end' requested here
        {__destruct_at_end(__begin_);}
         ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/__split_buffer:341:5: note: in instantiation of member function 'std::__1::__split_buffer<dsbcell, std::__1::allocator<dsbcell> &>::clear' requested here
    clear();
    ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:1672:49: note: in instantiation of member function 'std::__1::__split_buffer<dsbcell, std::__1::allocator<dsbcell> &>::~__split_buffer' requested here
    __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
                                                ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/vector:1699:9: note: in instantiation of function template specialization 'std::__1::vector<dsbcell, std::__1::allocator<dsbcell> >::__emplace_back_slow_path<std::__1::basic_string<char> &, bcell_chain, bcell_chain>' requested here
        __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...);
        ^
bcrdist/cmodule/scripts/fileio.cc:31:10: note: in instantiation of function template specialization 'std::__1::vector<dsbcell, std::__1::allocator<dsbcell> >::emplace_back<std::__1::basic_string<char> &, bcell_chain, bcell_chain>' requested here
                        cells.emplace_back(id, bcell_chain(hrow.get("V"), hcdr3), bcell_chain(lrow.get("V"), lcdr3));
                              ^
/mnt/build/toolchains/tools/clang/9.0.1/bin/../include/c++/v1/memory:1880:64: note: qualify call to silence this warning
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                               ^
3 warnings and 3 errors generated.
njbradley commented 3 years ago

Hey Wyatt, try compiling with the changes I just pushed, I think that should fix the errors you're seeing. I also tried to reduce the number of warnings, just to clean it up a little! Also, just a word of warning, but this project is still very much a work in progress, you're the first person to try it on a different computer and I'm still working on fixing bugs and adding features. If you have more errors or you have a suggestion of a feature that you would like or you need, let me know and I can look into making it!

wyattmcdonnell commented 3 years ago

@njbradley woohoo, up and running! 🎉 Thank you!

Happy to be an alpha tester! If you send me a note at wyatt dot mcdonnell at 10xgenomics dot com, would love to steal 15 minutes of your time to get an overview/some background! I'm sure I'll have a few ideas for features once I have a chance to poke around a little. The first thing I've noticed so far is that it might be helpful to write out results (PCs, distances, etc.) as part of the 10x_test.py and other test scripts--this could be used as a regression test too during development!