Bug 14583 - multilib issue: not searching for libqt in /usr/lib{,64}/qt/lib64
Summary: multilib issue: not searching for libqt in /usr/lib{,64}/qt/lib64
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: qt frontend (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 04:29 UTC by Moritz Barsnick
Modified: 2008-03-08 15:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proper lib64 Qt detection (3.53 KB, patch)
2008-03-05 02:12 UTC, Moritz Barsnick
Details | Splinter Review

Description Moritz Barsnick 2008-02-20 04:29:57 UTC
Hi,
I'm trying to build poppler on an x86_64 machine running the Linux distribution SLES9.

The Qt libraries are to be found in /usr/lib/qt/lib64 (and /usr/lib64/qt is a symbolic link to /usr/lib/qt).

The include files are found properly, under /usr/lib/qt/include. Yet the library is incorrectly detected in /usr/lib/qt/lib. configure thinks everything is okay. Yet in the build process, when linking libpoppler-qt.so, the linker detects that /usr/lib/qt/lib/libqt*.so does not contain the correct symbols. This is the case because this is not a valid x86_64 library, and it should be linking against /usr/lib/qt/lib64/libqt*.so.

So there are two buglets hidden in here:

a) Qt path detection needs to be expanded properly for multi-lib. I see that m4/qt.m4 is adapted from OpenOffice.org, perhaps they have a newer solution which covers these LSB updates.

b) configure should be checking the linking of a program against libqt.so, not only the presence of that library. (Though I don't understand why the AC_TRY_LINK for -pthreads works. Or perhaps it just doesn't, and gives a false negative.)
Comment 1 Moritz Barsnick 2008-02-20 04:38:16 UTC
Update (to self ;->):

SuSE poppler packages seem to include a patch which expands the searched directories: "poppler-qt-m4.patch"

See http://lists.opensuse.org/opensuse-commit/2007-01/msg00284.html

A nicer suggestion even is to use pkg-config for Qt, though I don't know since when such support has been available, and what to do on other platforms. (Fall back?)
Comment 2 Albert Astals Cid 2008-02-21 12:10:22 UTC
Can you verify that with this opensuse patch it builds for you? I don't have such a system so i can't test.
Comment 3 Moritz Barsnick 2008-03-05 01:44:40 UTC
No, I cannot confim.

Well, for one, I can't for the life of me get a valid combination of aclocal, automake, autoheader, autoconf to pick up all your macros. Oh well. But since I see the intent of the patch, I applied it to the relevant places in ./configure, only to see that it compiles as badly as before. SuSE attached those relevant paths to the end, so it is still the 32bit paths which are found first. :-( It doesn't work for me, though I happen to work on a SuSE system (not that I like it much).

My recommendation remains to _pre_pend the lib64 paths, which should not hurt on 32bit systems, or find some other proper multilib solution.

BTW, interestingly,. the most recent OOo implementation can be seen in http://tools.openoffice.org/source/browse/*checkout*/tools/config_office/configure.in?rev=1.249.12.1 and has a modified detection: search for the section with the string "Check whether the Qt". Looks really okay at first glance. :)
Comment 4 Moritz Barsnick 2008-03-05 02:12:04 UTC
Created attachment 14854 [details] [review]
proper lib64 Qt detection

Sorry, I forgot that you can't test yourself. I took OOo's Qt detection code from http://tools.openoffice.org/source/browse/*checkout*/tools/config_office/configure.in?rev=1.249.12.1 and placed that directly into ./configure. I can confirm that poppler-0.7.1 now builds fine with 64bit qt3.

Please don't forget to port this back to m4/qt.m4.
Comment 5 Albert Astals Cid 2008-03-08 15:57:51 UTC
Fixed in git master branch. Thanks for the patch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.