Bug 230224
| Summary: | qt4: needless(?) use of -I/usr/include, -L/usr/lib | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Rex Dieter <rdieter> |
| Component: | qt4 | Assignee: | Rex Dieter <rdieter> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | kevin, laurent.rineau__fedora |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-03-05 16:58:48 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Rex Dieter
2007-02-27 16:23:24 UTC
On trying to address this, I hit a few snags, so I'll leave out fixing this, for
now. Here is the specfile comment I'll be including in the next build :)
## FIXME(?)
# On the surface, looks like a good idea to strip -I/usr/include, -L/usr/lib,
# but it turns out qmake-consuming apps expect/use INCDIR/LIBDIR directly
# (e.g. PyQt4, texmaker), and don't cope with null values
#if "%{qt_headerdir}" == "%{_includedir}"
#sed -i -e "s|^QMAKE_INCDIR_QT.*=.*|QMAKE_INCDIR_QT =|"
mkspecs/common/linux.conf
#endif
#if "%{qt_libdir}" == "%{_libdir}"
#sed -i -e "s|^QMAKE_LIBDIR_QT.*=.*|QMAKE_LIBDIR_QT =|"
mkspecs/common/linux.conf
#endif
(In reply to comment #1) > On the surface, looks like a good idea to strip -I/usr/include, -L/usr/lib, > but it turns out qmake-consuming apps expect/use INCDIR/LIBDIR directly > (e.g. PyQt4, texmaker), and don't cope with null values Why do not they cope with null values for INCDIR and LIBDIR? They end up with -I/QtCore/ gcc flags mostly. Haven't run into any LIBDIR probs yet. IMO, PyQt4's installer is broken. As far as I can see, the automatic detection of PyQt4's configure.py is strange (it uses a tool named SIP). Maybe you should use the flags of ./configure.py to set config options my hand. * Wed Feb 28 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 4.2.2-5 ... - null'ify QMAKE_LIBDIR_QT, leave QMAKE_INCDIR_QT alone for now. (#230224) We'll 1/2 fix the problem, for now, pending further investigation on INCDIR breakage. The -L/usr/lib issue can also be worked around in the .pro file for the software you're building. E.g. if you want to search $$KDEPREFIX/lib before /usr/lib, write this: QMAKE_LIBDIR = $$KDEPREFIX/lib $$QMAKE_LIBDIR (I do this in my project so the KDE 3.80.3 libs in /opt/kde4/lib are found, not the KDE 3.5.6 ones in /usr/lib.) I don't have this problem with /usr/include because the KDE 3 headers are in /usr/include/kde, but I guess doing the same with QMAKE_INCDIR will work too. Note: make that $$KDEPREFIX/lib$$system(kde4-config --libsuffix) for multilib compliance. ;-) (I accidentally copied the line from the "win32" section. Using cross-MinGW with qmake is fun too, by the way, even more so if you add KDE 3.80.3 packages to the mix. ;-) ) But that doesn't matter for your use case anyway. :-) Looks like we're ok INCDIR-wise. Quoting cpp man page: ---------------- Directories named by -I are searched before the standard system include directories. If the directory dir is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the special treatment of system headers are not defeated . ----------------- Since /usr/include is one of the "standard system includes", -I/usr/include is (should be!) ignored. Closing. |