CLOSED FIXED 36826
[Qt] QtWebkit.pc is broken
https://bugs.webkit.org/show_bug.cgi?id=36826
Summary [Qt] QtWebkit.pc is broken
Fathi Boudra
Reported 2010-03-30 08:00:32 PDT
QtWebKit.pc is broken. See libdir and Libs.private values: libdir=${prefi/usr/lib Libs.private: -L../JavaScriptCore -L/usr/X11/usr/lib -L/u/usr/lib -ljscore -lXrender -lsqlite3 -lphonon -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread -lXext -lX11 -lm Same code is used to generate the pkgconfig file on Qt 4.6.2 but is not reproducible with QtWebKit from Qt 4.6.2 source code.
Attachments
broken pkgconfig file (704 bytes, text/plain)
2010-03-30 08:01 PDT, Fathi Boudra
no flags
Patch that might help (1.60 KB, patch)
2010-03-30 11:02 PDT, Jocelyn Turcotte
no flags
correct QtWebKit.pc generated from Qt source (1.04 KB, text/plain)
2010-04-05 00:30 PDT, Fathi Boudra
no flags
Patch (1.08 KB, patch)
2010-06-01 05:43 PDT, Jocelyn Turcotte
hausmann: review+
Fathi Boudra
Comment 1 2010-03-30 08:01:49 PDT
Created attachment 52039 [details] broken pkgconfig file
Jocelyn Turcotte
Comment 2 2010-03-30 11:02:25 PDT
Created attachment 52055 [details] Patch that might help Can you try with this patch in trunk?
Jocelyn Turcotte
Comment 3 2010-03-31 08:22:35 PDT
(In reply to comment #2) > Created an attachment (id=52055) [details] > Patch that might help > > Can you try with this patch in trunk? Sorry it won't work, against what I thought, LIBS_PRIVATE is only available for static library targets. By looking at pkg-config's documentation, Libs.private is used when the application would link QtWebKit statically, which we want to drop support to be able to build JavaScriptCore as a static library to use aggressive optimization exclusively for it. What exactly is the problem at the end? Do you need static linking against QtWebKit? Can you omit the Libs.private line when generating the .pc file?
Fathi Boudra
Comment 4 2010-04-05 00:26:49 PDT
some values are truncated. see libdir value: "${prefi/usr/lib" it should be "${prefix}/lib" instead of "${prefi/usr/lib". same for Libs.private, see "-L/usr/X11/usr/lib" and "-L/u/usr/lib" strings. it should be "-L/usr/lib/X11" and "-L/usr/lib". That's the problem.
Fathi Boudra
Comment 5 2010-04-05 00:30:04 PDT
Created attachment 52519 [details] correct QtWebKit.pc generated from Qt source correct QtWebKit.pc generated from Qt 4.6.2 source
Felix Geyer
Comment 6 2010-05-30 04:30:01 PDT
*** Bug 39573 has been marked as a duplicate of this bug. ***
Felix Geyer
Comment 7 2010-05-30 04:33:26 PDT
From my duplicate bug report: The following commands in WebCore/WebCore.pro can corrupt QtWebKit.pc: lib_replace.match = $$DESTDIR lib_replace.replace = $$[QT_INSTALL_LIBS] QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace The problem is that .match/.replace doesn't replace plain strings but regular expressions. If $$DESTDIR == "../lib", the resulting command is: sed -e "s,../lib,/usr/lib,g" "../lib/pkgconfig/QtWebKit.pc" >"/build/buildd/qtwebkit-4.7~beta1/debian/tmp/usr/lib/pkgconfig/QtWebKit.pc" "." matches any character so "libdir=${prefix}/lib" is being replaced by "libdir=${prefi/usr/lib". I'm not sure why this path replacement is needed at all.
Jocelyn Turcotte
Comment 8 2010-06-01 05:43:32 PDT
Created attachment 57532 [details] Patch Thanks for the investigation, this patch should fix the problem.
Simon Hausmann
Comment 9 2010-06-01 06:26:15 PDT
Comment on attachment 57532 [details] Patch Landing by hand
Simon Hausmann
Comment 10 2010-06-01 06:26:59 PDT
Simon Hausmann
Comment 11 2010-06-01 06:28:26 PDT
Revision r60475 cherry-picked into qtwebkit-2.0 with commit 9a83f22bc41a2016b6bbf495bfd32b3a659038c8
Simon Hausmann
Comment 12 2010-06-01 07:35:34 PDT
(In reply to comment #11) > Revision r60475 cherry-picked into qtwebkit-2.0 with commit 9a83f22bc41a2016b6bbf495bfd32b3a659038c8 Sorry, the correct sha1 in 19f3a076250e739dde943683f5b3abd44ff916be
Note You need to log in before you can comment on or make changes to this bug.