Using private Qt API breaks compilation

Bug #1094719 reported by Wulf C. Krueger
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
calibre
Won't Fix
Undecided
Unassigned

Bug Description

The commit "Fix text rendering by using private Qt APIs" introduces a build dependency on private Qt headers (especially: private/qtextengine_p.h). These shouldn't be used by anyone but Qt itself; they're private, can change any time and, worst of all, private headers usually do not get installed.

The issue results in this:

####### Building extension qt_hack #######
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/
mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../../../../src/calib
re/ebooks/pdf/render -I../../../../src/qt-harfbuzz/src -I. -o qt_hack.o ../../../../src/calibre/ebooks/pdf/render/q
t_hack.cpp
../../../../src/calibre/ebooks/pdf/render/qt_hack.cpp:12:35: fatal error: private/qtextengine_p.h: No such file or
directory
compilation terminated.
make: *** [qt_hack.o] Error 1
Error while executing: make -f Makefile

Please find a better solution that does not involve using private APIs.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1094719

There is no better solution. Complain to Qt, or install the private Qt
headers, on my linux distro (Gentoo) they are installed by default.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Revision history for this message
Rhialto (rhialto-xs4all) wrote :

Well, this basically makes the distributed source useless.

Revision history for this message
Kovid Goyal (kovid) wrote :

What nonsense. You can compile the source by installing the private Qt headers and you can run calibre from source, without even needing to compile it.

Revision history for this message
Rhialto (rhialto-xs4all) wrote :

Edit: I'm trying to package the latest version of Calibre for pkgsrc (http://www.pkgsrc.org :pkgsrc is a framework for building third-party software on NetBSD and other UNIX-like systems, currently containing over 12000 packages. ).

The current version is 0.9.39 at this time. It looks like pkgsrc won't distribute versions higher than 0.9.11 until this bug is fixed.

Revision history for this message
Kovid Goyal (kovid) wrote :

Then you have two choices:

1) Ask Digia to make the API needed by calibre public
2) Ask the maintainers of pkgsrc to allow building packages that use private Qt headers

Revision history for this message
Kovid Goyal (kovid) wrote :

And since calibre uses Qt 4.8 which is now in maintenance mode, (1) is unlikely.

Revision history for this message
Rhialto (rhialto-xs4all) wrote :

I have initiated a discussion on (2); see http://mail-index.netbsd.org/tech-pkg/2013/07/13/msg011707.html .

Revision history for this message
Domen Kožar (ielectric+) wrote :

This is very annoying, since we don't ship private headers in Nix. It means we are stuck in 0.8.x series. Could calibre ship the private headers as intermediate solution?

Revision history for this message
Lameventanas (lameventanas) wrote :

This kind of things is the reason why most Linux distributions don't have a port of calibre.

Revision history for this message
Kovid Goyal (kovid) wrote :

Unfortunately, every major linux distribution has a port of calibre. And
I have to waste endless amounts of time telling people not to use the
distribution provided ports of calibre.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.