amplab / snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
https://www.microsoft.com/en-us/research/project/snap/
Apache License 2.0
287 stars 66 forks source link

SNAP master build error on Mac OSX #56

Closed yakneens closed 3 years ago

yakneens commented 9 years ago

g++ -O3 -Wno-format -MMD -ISNAPLib -msse -c -o SNAPLib/AlignerContext.o SNAPLib/AlignerContext.cpp In file included from SNAPLib/AlignerContext.cpp:29: In file included from SNAPLib/AlignerOptions.h:30: In file included from SNAPLib/Read.h:30: In file included from SNAPLib/DataReader.h:26: In file included from SNAPLib/VariableSizeMap.h:5: In file included from SNAPLib/VariableSizeVector.h:3: SNAPLib/Util.h:245:12: warning: absolute value function 'abs' given an argument of type '_int64' (aka 'long long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] while (abs(n) >= 10) { ^ SNAPLib/Util.h:245:12: note: use function 'std::abs' instead while (abs(n) >= 10) { ^~~ std::abs SNAPLib/Util.h:506:16: warning: '&&' within '||' [-Wlogical-op-parentheses] return a <= b && a+distance >= b || a >= b && a <= b + distance;


SNAPLib/Util.h:506:16: note: place parentheses around the '&&' expression to silence this warning
        return a <= b && a+distance >= b || a >= b && a <= b + distance;
                      ^
               (                        )
SNAPLib/Util.h:506:45: warning: '&&' within '||' [-Wlogical-op-parentheses]
        return a <= b && a+distance >= b || a >= b && a <= b + distance;
                                         ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~
SNAPLib/Util.h:506:45: note: place parentheses around the '&&' expression to silence this warning
        return a <= b && a+distance >= b || a >= b && a <= b + distance;
                                                   ^
                                            (                          )
In file included from SNAPLib/AlignerContext.cpp:29:
In file included from SNAPLib/AlignerOptions.h:30:
SNAPLib/Read.h:315:31: warning: comparison of array 'other.localBuffer' equal to a null pointer is always false [-Wtautological-pointer-compare]
            if (NULL == other.localBuffer || other.data < other.localBuffer || other.data >= other.localBuffer + other.localBufferAllocationOffset - dataLength) {
                ~~~~    ~~~~~~^~~~~~~~~~~
SNAPLib/Read.h:750:35: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
                for (i = i - 2; i >=0 && cigarBuffer[i] >= '0' && cigarBuffer[i] <= '9'; i--) {
                                ~ ^ ~
In file included from SNAPLib/AlignerContext.cpp:30:
In file included from SNAPLib/AlignerContext.h:32:
SNAPLib/GenomeIndex.h:193:12: warning: class member cannot be redeclared [-Wredeclared-class-member]
    struct OverflowBackpointer;
           ^
SNAPLib/GenomeIndex.h:119:12: note: previous declaration is here
    struct OverflowBackpointer {
           ^
SNAPLib/AlignerContext.cpp:275:9: warning: delete called on 'ReadWriterSupplier' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
        delete writerSupplier;
        ^
SNAPLib/AlignerContext.cpp:341:34: error: expected ')'
                FormatUIntWithCommas((unsigned _int64)(1000 \* stats->totalReads / max(alignTime, (_int64)1)), readsPerSecond, strBufLen),       // Aligntime is in ms
                                               ^
SNAPLib/AlignerContext.cpp:341:24: note: to match this '('
                FormatUIntWithCommas((unsigned _int64)(1000 \* stats->totalReads / max(alignTime, (_int64)1)), readsPerSecond, strBufLen),       // Aligntime is in ms
                                     ^
7 warnings and 1 error generated.
make: **\* [SNAPLib/AlignerContext.o] Error 1
bolosky commented 3 years ago

v1.0 builds and runs on OSX.