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

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

Open
jmma59650 opened this issue May 20, 2017 · 5 comments
Open

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

jmma59650 opened this issue May 20, 2017 · 5 comments

Comments

@jmma59650
Copy link

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
Copy link

danpedron commented Jul 17, 2017

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
Copy link

In fedora 25 minimal works fine! Thank you

@chaoscommander
Copy link

Same problem and fix works on Debian 9.

@matteoventuri7
Copy link

Same problem and fix works in Raspbian based on Debian 9

@trejo08
Copy link

trejo08 commented Oct 5, 2018

Same problem and fix in Ubuntu 18.04.1

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

6 participants