Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Make/Compile Failure in formats/doc #326

Open
Dyspeptic-Curmudgeon opened this issue Nov 28, 2020 · 3 comments
Open

Make/Compile Failure in formats/doc #326

Dyspeptic-Curmudgeon opened this issue Nov 28, 2020 · 3 comments

Comments

@Dyspeptic-Curmudgeon
Copy link

I have a compile failure in linux 0.99.4 souce which seems to be internal. It does not appear to be platform related.

Running Fedora 5.8.11-200.fc32.x86_64 ( on Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz w 16G Ram, which should be irrelevant to the problem...)

Deep into the make, in src/formatd/doc OleStorage.cpp fails to compile here:

static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0};
if (std::strncmp(oleBuf, OLE_SIGN, 8) != 0) {
clear();
return false;
}

It does NOT like anything after the first character "0xD0". I can parse it that far... And now you are on your own! I do not know C++ but that construction looks like it should work but does not.

Compiling OleUtil.o ... OK
Compiling OleStreamReader.o ... OK
Compiling DocBookReader.o ... OK
Compiling DocPlugin.o ... OK
Compiling OleStorage.o ...OleStorage.cpp: In member function ‘bool OleStorage::init(shared_ptr, std::size_t)’:
OleStorage.cpp:62:83: error: narrowing conversion of ‘208’ from ‘int’ to ‘char’ [-Wnarrowing]
62 | static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0};
| ^
OleStorage.cpp:62:83: error: narrowing conversion of ‘207’ from ‘int’ to ‘char’ [-Wnarrowing]
OleStorage.cpp:62:83: error: narrowing conversion of ‘224’ from ‘int’ to ‘char’ [-Wnarrowing]
OleStorage.cpp:62:83: error: narrowing conversion of ‘161’ from ‘int’ to ‘char’ [-Wnarrowing]
OleStorage.cpp:62:83: error: narrowing conversion of ‘177’ from ‘int’ to ‘char’ [-Wnarrowing]
OleStorage.cpp:62:83: error: narrowing conversion of ‘225’ from ‘int’ to ‘char’ [-Wnarrowing]
make[2]: *** [/video/temp/fbreader-0.99.4/fbreader/../makefiles/subdir.mk:15: OleStorage.o] Error 1
make[2]: Leaving directory '/video/temp/fbreader-0.99.4/fbreader/src/formats/doc'
make[1]: *** [Makefile:19: all] Error 1
make[1]: Leaving directory '/video/temp/fbreader-0.99.4/fbreader'
make: *** [Makefile:9: all] Error 1

Any help would be appreciated. Calibre's ebook-viewer is slow on the desktop. I would love to have fbReader so as to parallel my android phone, and iPad.

@kamikadze77
Copy link

I think it's the same issue. There's patch attached.

@Dyspeptic-Curmudgeon
Copy link
Author

That fixed it. Odd that that error showed up in my very recent download of fbreader-0.99.4 which, it turns out is dated: 0.99.4 (November 30, 2012) according to the Changelog. Surely there have been updates since then!!
But the patch worked. Something wrong in the web-site gave me an old obsolete tarball.

@Dyspeptic-Curmudgeon
Copy link
Author

Well I thought that that fixed it. First use was fine. Second use threw a fatal error, which I doubt is related to the first one.
FBReader xxx.epub
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 14) > this->size() (which is 13)
Aborted (core dumped)

So something still wrong in the source version from fbreader-sources-0.99.4.tgz
I will try to install the deb package using alien to create an rpm.
Note: running on Fedora 32 with KDE.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants