dectris / neggia

MIT License
7 stars 13 forks source link

Does not compile correctly on OS X #1

Closed graeme-winter closed 7 years ago

graeme-winter commented 7 years ago

Followed your instructions and got:

[ 73%] Building CXX object src/dectris/neggia/data/CMakeFiles/NEGGIA_DATA.dir/H5LocalHeap.cpp.o
[ 76%] Building CXX object src/dectris/neggia/data/CMakeFiles/NEGGIA_DATA.dir/H5SymbolTableEntry.cpp.o
/Users/graeme/Projects/neggia/src/dectris/neggia/data/H5SymbolTableEntry.cpp:162:19: error: no matching function for call to 'chunkCompareGreaterEqual'
               if(chunkCompareGreaterEqual(offset.data(),(const uint64_t* )key.address(8),offset.size())) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/graeme/Projects/neggia/src/dectris/neggia/data/H5SymbolTableEntry.cpp:136:6: note: candidate function not viable: no known conversion from 'const value_type *' (aka 'const unsigned long *') to 'const uint64_t *' (aka 'const unsigned long long *') for 1st argument
bool chunkCompareGreaterEqual(const uint64_t * key0, const uint64_t * key1, size_t len) {
     ^
1 error generated.
make[2]: *** [src/dectris/neggia/data/CMakeFiles/NEGGIA_DATA.dir/H5SymbolTableEntry.cpp.o] Error 1
make[1]: *** [src/dectris/neggia/data/CMakeFiles/NEGGIA_DATA.dir/all] Error 2
make: *** [all] Error 2
graeme-winter commented 7 years ago
Graemes-MBP-5:neggia graeme$ git diff
diff --git a/src/dectris/neggia/data/H5SymbolTableEntry.cpp b/src/dectris/neggia/data/H5SymbolTableEntry.cpp
index b72dfb3..fb7b197 100644
--- a/src/dectris/neggia/data/H5SymbolTableEntry.cpp
+++ b/src/dectris/neggia/data/H5SymbolTableEntry.cpp
@@ -159,7 +159,7 @@ H5Object H5SymbolTableEntry::dataChunk(const std::vector<size_t> & offset) const
             bool found = false;
             for(int i=bTree.entriesUsed()-1; i>=0; --i) {
                H5Object key(bTree + 24 + i*(keySize + childSize));
-               if(chunkCompareGreaterEqual(offset.data(),(const uint64_t* )key.address(8),offset.size())) {
+               if(chunkCompareGreaterEqual((const uint64_t * ) offset.data(),(const uint64_t* )key.address(8),offset.size())) {
                   bTree = H5BLinkNode(key.fileAddress(),key.uint64(keySize));
                   found = true;
                   break;
Graemes-MBP-5:neggia graeme$ 

allowed it to compile

graeme-winter commented 7 years ago

This now appears to work fine though does write junk out of the stdout

INFO(1:5)=vendor/major version/minor version/patch/timestamp=   1   0   5   3          -1
 nx,ny,nbyte,qx,qy,number_of_frames,info_array(1:5)=        4150        4371
           4  7.5000004E-05  7.5000004E-05         900           1           0
           5           3          -1
INFO(1:5)=vendor/major version/minor version/patch/timestamp=   1   0   5   3          -1
 nx,ny,nbyte,qx,qy,number_of_frames,info_array(1:5)=        4150        4371
           4  7.5000004E-05  7.5000004E-05         900           1           0
           5           3          -1
INFO(1:5)=vendor/major version/minor version/patch/timestamp=   1   0   5   3          -1
 nx,ny,nbyte,qx,qy,number_of_frames,info_array(1:5)=        4150        4371
           4  7.5000004E-05  7.5000004E-05         900           1           0
           5           3          -1
INFO(1:5)=vendor/major version/minor version/patch/timestamp=   1   0   5   3          -1
 nx,ny,nbyte,qx,qy,number_of_frames,info_array(1:5)=        4150        4371
           4  7.5000004E-05  7.5000004E-05         900           1           0
           5           3          -1
INFO(1:5)=vendor/major version/minor version/patch/timestamp=   1   0   5   3          -1
pilipp commented 7 years ago

That's xds output, not neggia output

graeme-winter commented 7 years ago

Ah, fair enough - was enough to show that the build was working fine though

I have never seen this output before...

You’ll see that a one liner allowed this to be used on OS X, exercising now

Best wishes Graeme

On 17 Mar 2017, at 14:30, pilipp notifications@github.com wrote:

That's xds output, not neggia output

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dectris/neggia/issues/1#issuecomment-287353824, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLydHjlbNRav_3iQJ70Nu-k48EhKdFZks5rmorngaJpZM4Mgj47.

graeme-winter commented 7 years ago

Latest commit fixed, closing now