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

OSX compilation #40

Closed
blahah opened this issue Dec 8, 2014 · 5 comments
Closed

OSX compilation #40

blahah opened this issue Dec 8, 2014 · 5 comments

Comments

@blahah
Copy link
Contributor

blahah commented Dec 8, 2014

Just a heads up that the dev branch can't be compiled on OSX:

g++-4.8 -O3 -Wno-format -MMD -ISNAPLib -msse   -c -o SNAPLib/Bam.o SNAPLib/Bam.cpp
g++-4.8 -O3 -Wno-format -MMD -ISNAPLib -msse   -c -o SNAPLib/CommandProcessor.o SNAPLib/CommandProcessor.cpp
g++-4.8 -O3 -Wno-format -MMD -ISNAPLib -msse   -c -o SNAPLib/Compat.o SNAPLib/Compat.cpp
SNAPLib/Compat.cpp: In function 'bool connectNamedPipes(NamedPipe*)':
SNAPLib/Compat.cpp:2045:12: error: expected ';' before 'lock'
      flock lock;
            ^
SNAPLib/Compat.cpp:2046:6: error: 'lock' was not declared in this scope
      lock.l_type = F_UNLCK;
      ^
SNAPLib/Compat.cpp: In function 'NamedPipe* OpenNamedPipe(const char*, bool)':
SNAPLib/Compat.cpp:2104:12: error: expected ';' before 'lock'
      flock lock;
            ^
SNAPLib/Compat.cpp:2105:6: error: 'lock' was not declared in this scope
      lock.l_type = F_WRLCK;
      ^
make: *** [SNAPLib/Compat.o] Error 1
@sjackman
Copy link

Also this.

g++ -O3 -Wno-format -MMD -ISNAPLib -msse   -c -o SNAPLib/Error.o SNAPLib/Error.cpp
SNAPLib/DataWriter.cpp:318:29: error: no matching function for call to 'min'
    batches[current].used = min(bufferSize, batchOffset + bytes);
                            ^~~

@blahah
Copy link
Contributor Author

blahah commented Jan 1, 2015

@sjackman see #32

@pcantalupo
Copy link

I am trying to compile on a Snow leopard Mac OSX. Running make works until reaching this command:

$ g++ -O3 -Wno-format -MMD -ISNAPLib -msse   -c -o SNAPLib/DataWriter.o SNAPLib/DataWriter.cpp
SNAPLib/DataWriter.cpp: In member function 'virtual void AsyncDataWriter::advance(GenomeDistance, GenomeLocation)':
SNAPLib/DataWriter.cpp:318:64: error: no matching function for call to 'min(const size_t&, long long unsigned int)'
     batches[current].used = min(bufferSize, batchOffset + bytes);
                                                                ^
SNAPLib/DataWriter.cpp:318:64: note: candidates are:
In file included from /usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/algorithm:61:0,
                 from SNAPLib/stdafx.h:13,
                 from SNAPLib/DataWriter.cpp:19:
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
SNAPLib/DataWriter.cpp:318:64: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int')
     batches[current].used = min(bufferSize, batchOffset + bytes);
                                                                ^
In file included from /usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/algorithm:61:0,
                 from SNAPLib/stdafx.h:13,
                 from SNAPLib/DataWriter.cpp:19:
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
SNAPLib/DataWriter.cpp:318:64: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int')
     batches[current].used = min(bufferSize, batchOffset + bytes);
                                                                ^

Any ideas what to try?

Thank you,

Paul

@blahah
Copy link
Contributor Author

blahah commented May 5, 2015

@pcantalupo yes, I fixed this bug in #32. See https://github.com/amplab/snap/pull/32/files.

@bolosky
Copy link
Contributor

bolosky commented May 6, 2015

Merged pull request into dev. We'll handle master by integrating dev changes back into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants