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

Build error in CentOS 7 #58

Open
cbwang2016 opened this issue Aug 25, 2016 · 3 comments
Open

Build error in CentOS 7 #58

cbwang2016 opened this issue Aug 25, 2016 · 3 comments

Comments

@cbwang2016
Copy link

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/fuse -D_GLIBCXX_DEBUG -c src/megacli.cpp -o src/megacli.o
src/megacli.cpp: In function ‘void createthumbnail(const char_, unsigned int, std::string_)’:
src/megacli.cpp:104:43: error: ‘JPEG_EXIFROTATE’ was not declared in this scope
if (!(dib = FreeImage_Load(fif,filename,JPEG_EXIFROTATE | JPEG_FAST | (size << 16)))) return;
^
src/megacli.cpp:115:53: error: ‘FIF_RAW’ was not declared in this scope
if (!(dib = FreeImage_Load(fif, filename, (fif == FIF_RAW) ? RAW_PREVIEW : 0))) return;
^
src/megacli.cpp:115:64: error: ‘RAW_PREVIEW’ was not declared in this scope
if (!(dib = FreeImage_Load(fif, filename, (fif == FIF_RAW) ? RAW_PREVIEW : 0))) return;
^
src/megacli.cpp:146:50: error: ‘JPEG_BASELINE’ was not declared in this scope
if (FreeImage_SaveToMemory(FIF_JPEG,dib,hmem,JPEG_BASELINE | JPEG_OPTIMIZE | 85))
^
src/megacli.cpp:146:66: error: ‘JPEG_OPTIMIZE’ was not declared in this scope
if (FreeImage_SaveToMemory(FIF_JPEG,dib,hmem,JPEG_BASELINE | JPEG_OPTIMIZE | 85))
^
src/megacli.cpp: In function ‘void setprompt(prompttype)’:
src/megacli.cpp:852:56: warning: statement has no effect [-Wunused-value]
rl_callback_handler_install(get_prompt(),process_line);
^
src/megacli.cpp: In function ‘void process_line(char_)’:
src/megacli.cpp:1055:39: warning: statement has no effect [-Wunused-value]
if (words.size()) add_history(line);
^
In file included from /usr/include/cryptopp/secblock.h:7:0,
from /usr/include/cryptopp/modes.h:8,
from sdk/megacrypto.h:25,
from src/megacli.cpp:57:
/usr/include/cryptopp/algparam.h: In instantiation of ‘CryptoPP::ConstByteArrayParameter::ConstByteArrayParameter(const T&, bool) [with T = std::basic_string]’:
/usr/include/cryptopp/filters.h:793:132: required from here
/usr/include/cryptopp/misc.h:58:118: warning: unused variable ‘cryptopp_assert_26’ [-Wunused-variable]
#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance) static CompileAssert<(assertion)> CRYPTOPP_ASSERT_JOIN(cryptopp_assert_, instance)
^
/usr/include/cryptopp/misc.h:61:39: note: in definition of macro ‘CRYPTOPP_DO_ASSERT_JOIN’
#define CRYPTOPP_DO_ASSERT_JOIN(X, Y) X##Y
^
/usr/include/cryptopp/misc.h:58:97: note: in expansion of macro ‘CRYPTOPP_ASSERT_JOIN’
#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance) static CompileAssert<(assertion)> CRYPTOPP_ASSERT_JOIN(cryptopp_assert_, instance)
^
/usr/include/cryptopp/misc.h:54:44: note: in expansion of macro ‘CRYPTOPP_COMPILE_ASSERT_INSTANCE’
#define CRYPTOPP_COMPILE_ASSERT(assertion) CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, LINE)
^
/usr/include/cryptopp/algparam.h:26:9: note: in expansion of macro ‘CRYPTOPP_COMPILE_ASSERT’ CRYPTOPP_COMPILE_ASSERT(sizeof(CPP_TYPENAME T::value_type) == 1);
^
In file included from /usr/include/cryptopp/modes.h:12:0,
from sdk/megacrypto.h:25,
from src/megacli.cpp:57:
/usr/include/cryptopp/algparam.h: In instantiation of ‘void CryptoPP::AlgorithmParametersTemplate::MoveInto(void_) const [with T = CryptoPP::RandomNumberGenerator_]’:
src/megacli.cpp:2366:1: required from here
/usr/include/cryptopp/algparam.h:322:35: warning: unused variable ‘p’ [-Wunused-variable]
AlgorithmParametersTemplate_ p = new(buffer) AlgorithmParametersTemplate(this);
^
src/megacli.cpp: At global scope:
src/megacli.cpp:928:6: warning: ‘void process_line(char
)’ defined but not used [-Wunused-function]
void process_line(char* line)
^
src/megacli.cpp:839:20: warning: ‘const char* get_prompt()’ defined but not used [-Wunused-function]
static const char* get_prompt(void)
^
In file included from /usr/include/cryptopp/secblock.h:7:0,
from /usr/include/cryptopp/modes.h:8,
from sdk/megacrypto.h:25,
from src/megacli.cpp:57:
/usr/include/cryptopp/misc.h:548:20: warning: ‘std::string CryptoPP::StringNarrow(const wchar_t_, bool)’ defined but not used [-Wunused-function]
static std::string StringNarrow(const wchar_t *str, bool throwOnError = true)
^
make: *_* [src/megacli.o] Error 1

@raciasolvo
Copy link

I have the same error.

@pshlos46
Copy link

Same error here.

Can't understand why this does not seem to be an issue of missing libraries or something.

@pshlos46
Copy link

Guys, the solution is here #25

by default the most updated version in yum for CentOS 7 is 3.10. Try installing and compiling 3.17 and up from the link http://freeimage.sourceforge.net/

For me it worked.

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

3 participants