matteoserva / MegaFuse

MEGA client for linux, based on FUSE
Other
250 stars 80 forks source link

make error : ‘ceil’ was not declared in this scope #78

Open jmma59650 opened 7 years ago

jmma59650 commented 7 years ago

Error Message during compilation .

make g++ -I inc -I /usr/include/cryptopp -I sdk -std=c++0x -O0 -g -fstack-protector-all -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/x86_64-linux-gnu -I/usr/include/fuse -D_GLIBCXX_DEBUG -c src/file_cache_row.cpp -o src/file_cache_row.o
src/file_cache_row.cpp: In static member function ‘static int CacheManager::numChunks(size_t)’: src/file_cache_row.cpp:72:59: error: ‘ceil’ was not declared in this scope return 8 + ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE)); ^ Makefile:43 : la recette pour la cible « src/file_cache_row.o » a échouée
make: *** [src/file_cache_row.o] Erreur 1

danpedron commented 7 years ago

Edit file: src/file_cache_row.cpp

Insert after line 9: #include <cmath>

In like 73 change "ceil" to 'std::ceil'. Like this: return 8 + std::ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE));

Try compile again...

jckriplr commented 7 years ago

In fedora 25 minimal works fine! Thank you

chaoscommander commented 6 years ago

Same problem and fix works on Debian 9.

matteoventuri7 commented 6 years ago

Same problem and fix works in Raspbian based on Debian 9

trejo08 commented 5 years ago

Same problem and fix in Ubuntu 18.04.1