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

Does not build on 32 bit architectures #111

Closed
tillea opened this issue Dec 20, 2017 · 2 comments
Closed

Does not build on 32 bit architectures #111

tillea opened this issue Dec 20, 2017 · 2 comments

Comments

@tillea
Copy link

tillea commented Dec 20, 2017

Hi,
since snap is distributed in Debian there is an attempt made to provide the program on different hardware architectures. There are also 32 bit architectures which all fail to build with the error

g++ -std=gnu++98 -MMD -ISNAPLib -Wdate-time -D_FORTIFY_SOURCE=2  -c -o SNAPLib/GenericFile_HDFS.o SNAPLib/GenericFile_HDFS.cpp
SNAPLib/SortedDataWriter.cpp: In member function 'bool SortedDataFilterSupplier::mergeSort()':
SNAPLib/SortedDataWriter.cpp:338:70: error: no matching function for call to 'max(long unsigned int, _int64)'
             min(1UL << 23, max(1UL << 17, bufferSpace / blocks.size()))); // 128kB to 8MB buffer space per block
                                                                      ^
In file included from /usr/include/c++/6/algorithm:61:0,
                 from SNAPLib/stdafx.h:13,
                 from SNAPLib/SortedDataWriter.cpp:19:
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
SNAPLib/SortedDataWriter.cpp:338:70: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and '_int64 {aka long long int}')
             min(1UL << 23, max(1UL << 17, bufferSpace / blocks.size()))); // 128kB to 8MB buffer space per block
                                                                      ^
In file included from /usr/include/c++/6/algorithm:61:0,
                 from SNAPLib/stdafx.h:13,
                 from SNAPLib/SortedDataWriter.cpp:19:
/usr/include/c++/6/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
SNAPLib/SortedDataWriter.cpp:338:70: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and '_int64 {aka long long int}')
             min(1UL << 23, max(1UL << 17, bufferSpace / blocks.size()))); // 128kB to 8MB buffer space per block
                                                                      ^

I wonder whether the code can be made more portable. Or do you explicit target at 64Bit architectures exclusively?
Kind regards, Andreas.

@bolosky
Copy link
Contributor

bolosky commented Dec 20, 2017 via email

@tillea
Copy link
Author

tillea commented Dec 21, 2017 via email

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

2 participants