bioinf / Sibelia

Genome comparison via de Bruijn graph. To get the latest stable version, please visit our site.
http://bioinf.spbau.ru/sibelia
Other
65 stars 17 forks source link

Build failure on OS X 10.8 #160

Closed superbobry closed 10 years ago

superbobry commented 10 years ago
In file included from /tmp/Sibelia/src/dnasequence.cpp:7:
In file included from /tmp/Sibelia/src/dnasequence.h:10:
In file included from /tmp/Sibelia/src/fasta.h:10:
In file included from /tmp/Sibelia/src/common.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:1795:32: error: cannot convert 'const SyntenyFinder::DNASequence::DNACharacter' to
      'unsigned char' without a conversion operator
        _VSTD::memset(__first, (unsigned char)__value_, (size_t)(__n));
                               ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:1804:11: note: in instantiation of function template specialization
      'std::__1::__fill_n<SyntenyFinder::DNASequence::DNACharacter *, long, SyntenyFinder::DNASequence::DNACharacter>' requested here
   return _VSTD::__fill_n(__first, __n, __value_, integral_constant<bool,
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:300:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:1826:5: note: in instantiation of function template specialization
      'std::__1::fill_n<SyntenyFinder::DNASequence::DNACharacter *, long, SyntenyFinder::DNASequence::DNACharacter>' requested here
    _VSTD::fill_n(__first, __last - __first, __value_);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:300:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:1834:5: note: in instantiation of function template specialization
      'std::__1::__fill<SyntenyFinder::DNASequence::DNACharacter *, SyntenyFinder::DNASequence::DNACharacter>' requested here
    _VSTD::__fill(__first, __last, __value_, typename iterator_traits<_ForwardIterator>::iterator_category());
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:300:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/tmp/Sibelia/src/unrolledlist.h:162:3: note: in instantiation of function template specialization 'std::__1::fill<SyntenyFinder::DNASequence::DNACharacter *, SyntenyFinder::DNASequence::DNACharacter>'
      requested here
                std::fill(data, data + NODE_SIZE, erased_value);
                ^
/tmp/Sibelia/src/unrolledlist.h:595:36: note: in instantiation of member function 'SyntenyFinder::unrolled_list<SyntenyFinder::DNASequence::DNACharacter, unsigned int, 25>::chunk::chunk' requested here
                                itList = m_Data.insert(itList, chunk(m_ErasedValue));
                                                               ^
/tmp/Sibelia/src/unrolledlist.h:544:16: note: in instantiation of function template specialization 'SyntenyFinder::unrolled_list<SyntenyFinder::DNASequence::DNACharacter, unsigned int, 25>::insert<const
      SyntenyFinder::DNASequence::DNACharacter *>' requested here
                return this->insert(pos, ptr, ptr + 1);
                             ^
/tmp/Sibelia/src/unrolledlist.h:558:9: note: in instantiation of member function 'SyntenyFinder::unrolled_list<SyntenyFinder::DNASequence::DNACharacter, unsigned int, 25>::insert' requested here
                this->insert(this->end(), value);
                      ^
/tmp/Sibelia/src/dnasequence.cpp:78:13: note: in instantiation of member function 'SyntenyFinder::unrolled_list<SyntenyFinder::DNASequence::DNACharacter, unsigned int, 25>::push_back' requested here
                sequence_.push_back(DNACharacter(SEPARATION_CHAR));
                          ^
1 error generated.
make[2]: *** [CMakeFiles/Sibelia.dir/dnasequence.cpp.o] Error 1
make[1]: *** [CMakeFiles/Sibelia.dir/all] Error 2
make: *** [all] Error 2

I'm using

$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
$ cmake --version
cmake version 2.8.12.1
mikolmogorov commented 10 years ago

It seems to be a bug in llvm (fixed in more recent versions): http://llvm.org/bugs/show_bug.cgi?id=16764