Boomaga / boomaga

Boomaga provides a virtual printer for CUPS. This can be used for print preview or for print booklets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error opening pdf file: cannot find boomagamerger

martinkg opened this issue · comments

Hi,
i want to create a rpm package for Fedora and use this rpm spec file to build the package.
https://martinkg.fedorapeople.org/Review/SPECS/boomaga.spec

When i run boomage i get the error message "Error opening pdf file: cannot find boomagamerger"
So i linked boomagamerger with the following command.
ln -s %{_libdir}/%{name}/boomagamerger %{_bindir}/boomagamerger

symlinking to %{_bindir} works, but the proper fix should be patching gui/kernel/tmppdffile.cpp to use compile-time defined path to search boomagamerger instead hardcoded:

dirs << QApplication::applicationDirPath() + "/../lib/boomaga/";

The correct path can be passed by cmake as macro definition. It is upstream bug, because gui/pdfmerger/CMakeLists.txt respects LIB_SUFFIX, but the code does not. Please open an issue or pull request.

the mentioned solution doesn't work, i get the same error message:

"Something is wrong. I can't find boomagamerger program.\nPlease reinstall me."

You need to add

add_definitions(-DNONGUI_DIR=${NONGUI_DIR})

or, alternatively, use configure_file to add proper path.

@martinkg Try to rebuild program from scratch. For testing I added debug message to tmppdffile.cpp

151    QStringList dirs;
152    dirs << QApplication::applicationDirPath() + "/";
153    dirs << NONGUI_DIR;
154   qDebug() << "Boomagamerger dirs:" << dirs;

After that I build and run program

cmake -DLIB_SUFFIX=64 ..
make 
./gui/boomaga ../../tests/01-pages.pdf ../../tests/01-pages.pdf 

And I see following message

Boomagamerger dirs: ("/home/sokoloff/myPrograms/boomaga/master/build/gui/", "/usr/local/lib64/boomaga") 

@mikhirev
We have such definition https://github.com/Boomaga/boomaga/blob/master/CMakeLists.txt#L83

@SokoloffA
I'm sorry, I didn't see this because I just looked at 2928eef commit.

i built boomaga from scratch, boomagamerger was found and the pdf file was loaded correct.

$ ./gui/boomaga /Einstellungen/RHT_News_2015_11_3_General.pdf /Einstellungen/RHT_News_2015_11_3_General.pdf
Boomagamerger dirs: ("/home/martin/rpmbuild/BUILD/boomaga-2928eef35e97bb5188765cd1192456c05f697467/gui/", "/usr/local/lib64/boomaga")
poppler/error (4936): No current point in closepathpoppler/error (4944): No current point in closepathpoppler/error (4953): No current point in closepathpoppler/error (4964): No current point in closepathpoppler/error (4936): No current point in closepathpoppler/error (4944): No current point in closepathpoppler/error (4953): No current point in closepathpoppler/error (4964): No current point in closepathpoppler/error (8479): No current point in closepathpoppler/error (8487): No current point in closepathpoppler/error (8496): No current point in closepathpoppler/error (8506): No current point in closepathpoppler/error (4936): No current point in closepathpoppler/error (4944): No current point in closepathpoppler/error (4953): No current point in closepathpoppler/error (4964): No current point in closepathpoppler/error (8479): No current point in closepathpoppler/error (8487): No current point in closepathpoppler/error (8496): No current point in closepathpoppler/error (8506): No current point in closepath

@martinkg
So, I can close issue?

please leave the ticket open until we found a solution for the fedora package.

boomagamerger is an executable file and belongs not into /usr/lib64 but into /usr/bin

boomagamerger not intended for normal use, this program is a helper program and is used only from the main executable.
Some programs keeps our helper executable files in the /usr/lib64, for example chromium, firefox, gcc, git and postfix.

@martinkg
It's correct to use such path (although /usr/libexec is more preferable according to Fedora guidelines).

@SokoloffA
The mistake is that final slash in path is missing. The correct code should be

dirs << NONGUI_DIR "/";

@mikhirev
your patch works, many thank for your investigation.

@SokoloffA
could you please change this in github.

thanks Martin