#304 src/epubfmt.cpp eror on build with =dev-libs/chmlib-0.40-r1

Qt
open
nobody
None
5
2014-08-13
2014-01-12
Starikov Sergey
No

Trying to build live vesion (today's timestamp from branch git://crengine.git.sourceforge.net/gitroot/crengine/crengine) fails:

[ 54%] Building CXX object crengine/CMakeFiles/crengine.dir/src/epubfmt.cpp.o
cd /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999_build/crengine && /usr/bin/x86_64-pc-linux-gnu-g++ -DBIG_PAGE_MARGINS=0 -DCHM_SUPPORT_ENABLED=1 -DCOLOR_BACKBUFFER=1 -DCR3_ANTIWORD_PATCH=1 -DDOC_BUFFER_SIZE=0x400000 -DDOC_DATA_COMPRESSION_LEVEL=1 -DENABLE_ANTIWORD=1 -DLDOM_USE_OWN_MEM_MAN=1 -DLINUX=1 -DMAX_IMAGE_SCALE_MUL=0 -DNDEBUG=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DUSE_EXTERNAL_EDICT_DICTIONARY=0 -DUSE_FREETYPE=1 -DUSE_UNRAR=0 -D_LINUX=1 -march=native -O2 -pipe -Wall -Wno-long-long -pedantic -O3 -DNDEBUG -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtCore -I/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/thirdparty/antiword -I/usr/include/freetype2 -I/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/include -I/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/tinydict -o CMakeFiles/crengine.dir/src/epubfmt.cpp.o -c /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/epubfmt.cpp
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:10:63: error: expected class-name before ‘{’ token
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:18:32: error: ‘chmExternalFileStream’ has not been declared
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:23:31: error: ‘chmExternalFileStream’ has not been declared
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:33:26: error: ‘chmExternalFileStream’ has not been declared
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp: In constructor ‘crChmExternalFileStream::crChmExternalFileStream(LVStreamRef)’:
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:41:9: error: ‘open’ was not declared in this scope
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:42:9: error: ‘read’ was not declared in this scope
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:43:9: error: ‘close’ was not declared in this scope
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp: In member function ‘bool LVCHMContainer::open()’:
/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999/crengine/src/chmfmt.cpp:249:36: error: cannot convert ‘crChmExternalFileStream’ to ‘const char’ for argument ‘1’ to ‘chmFile chm_open(const char)’
make[2]: [crengine/CMakeFiles/crengine.dir/src/chmfmt.cpp.o] Error 1
make[2]:
Waiting for unfinished jobs....
make[2]: Leaving directory /var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999_build' make[1]: *** [crengine/CMakeFiles/crengine.dir/all] Error 2 make[1]: Leaving directory/var/tmp/portage/app-text/coolreader3-9999-r2/work/coolreader3-9999_build'
make: *** [all] Error 2

Building with libray: =dev-libs/chmlib-0.40-r1
Compiler: =sys-devel/gcc-4.7.3-r1

Discussion

  • BensonBear
    BensonBear
    2014-02-11

    The problem is that chm_lib.h is not being found during the build.
    The solution is to include a reference to its directory in the CMakeLists.txt
    for crengine:

    INCLUDE_DIRECTORIES(../thirdparty/chmlib/src)

     
    Last edit: BensonBear 2014-02-11
  • Seems to be fixed in current git.