rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
25 stars 12 forks source link

Can't compile in chroot in Ubuntu SDK #83

Open stuartlangridge opened 9 years ago

stuartlangridge commented 9 years ago

If I try using Ubuntu SDK to compile Beru (for a different platform; e.g., the emulator) the build fails with error "error: poppler/qt5/poppler-qt5.h: No such file or directory".

I assumed this meant that the appropriate library wasn't in the chroot that the build uses, but I've "Maintain"ed that chroot and apt-get install'ed the package and it still isn't working.

In particular, /usr/include/poppler/qt5/poppler-qt5.h exists in the chroot, and what I think are correct packages are installed:

(click-ubuntu-sdk-14.10-i386)root@dawn:/home/aquarius# dpkg -l | grep poppler ii libpoppler-dev 0.26.5-0ubuntu2 i386 PDF rendering library -- development files ii libpoppler-qt5-1:i386 0.26.5-0ubuntu2 i386 PDF rendering library (Qt 5 based shared library) ii libpoppler-qt5-dev 0.26.5-0ubuntu2 i386 PDF rendering library -- development files (Qt 5 interface) ii libpoppler46:i386 0.26.5-0ubuntu2 i386 PDF rendering library ii qtdeclarative5-poppler1.0:i386 0.1.1+13.10.20130819.3-0ubuntu3 i386 Poppler QML plugin

rschroll commented 9 years ago

Michael Zanetti ran into the same problem when he was trying to build Beru. He reports,

I chrooted into the build chroot and typed make manually. It got past that point and then qtcreator would build it... Still not sure what exactly is going on.

Either am I. I suspect my CMake files aren't quite right. But as far as I can tell, CMake is magical and resists all attempts at comprehension.

If you can troubleshoot the problem, I'd be most grateful. But if you want to just follow Michael's solution and get on with your life, that's good too.

stuartlangridge commented 9 years ago

Doing the make thing as per mzanetti does indeed fix it. I'd love to help troubleshoot, but everything I know about cmake could be chiselled on a sand grain, I'm afraid :(

stuartlangridge commented 9 years ago

In additional news, I tried tracking this down a bit; Ubuntu SDK runs the make command ~/.config/ubuntu-sdk/ubuntu-sdk-14.10-i386/make which is a symlink to /usr/share/qtcreator/ubuntu/scripts/qtc_chroot_wrapper.py (although note it is only a symlink while the build is happening, for reasons I do not understand!). This python file then gets a DBus session from a dbus helper and passes it the "make all" command, and it's running that which fails. My enthusiasm for tracking the problem down further by working out what the DBus service is and where it is sorta ran out at that point.

stuartlangridge commented 9 years ago

After the mzanetti fix, building does work, but deployment to the emulator does not: it errors thus:

Could not find the manifest.json file in /home/aquarius/Programs/Others/beru/build-beru-emulator_2014_12_02_GCC_i386_ubuntu_sdk_14_10_utopic-Default/.ubuntu-sdk-deploy. Please check if it is added to the install targets in your project file

rschroll commented 9 years ago

Have you enabled click mode (-DCLICK_MODE=ON)? I should probably make that the default, since I've given up on desktop support for now.