Le 20/03/2015 22:40, Bruce Dubbs a écrit :
> Pierre Labastie wrote:
>> Le 20/03/2015 20:14, Bruce Dubbs a écrit :
>>> Pierre Labastie wrote:
>>>>
>>>> It seems to me that the setqt{4,5} scripts could set PKG_CONFIG_PATH as
>>>> well
>>>> as PATH. Since autotools now unconditionally use pkgconfig, if the
>>>> PKG_CONFIG_PATH is not set, configure scripts may find one version of Qt,
>>>> while make would use the other. This seems to be a problem, for example
>>>> with
>>>> wireshark.
>>>>
>>>>
>>>
>>> I'm not sure why this is needed. There is no conflict between the .pc files
>>> in qt4 and qt5. My path is:
>>>
>>> PKG_CONFIG_PATH=/opt/qt/lib/pkgconfig:/opt/kde/lib/pkgconfig:/opt/kde/share/pkgconfig:/opt/qt4/lib/pkgconfig:/opt/qt5/lib/pkgconfig:/opt/xorg/lib/pkgconfig:/opt/xorg/share/pkgconfig
>>>
>> in the case of wireshark, the configure script
>> first checks qt5 (actually, qt modules whose names begin with qt5), then qt4
>> (if qt5 is not found), using pkgconfig. So, with the PATH above, it will find
>> qt5 modules, and not check qt4. If the user intended to use qt4, the PATH is
>> set to /opt/qt4, which is very likely to create a failure when building (and
>> it does, in the case of wireshark). The only safe option is to set both
>> PKG_CONFIG_PATH and PATH in setqtx
>
> I see. But if it's checking for qt5 first then what's needed is:
>
> pathremove /opt/qt5/lib/pkgconfig PKG_CONFIG_PATH
>
> otherwise it will find qt5 no matter what the order of the paths in
> PKG_CONFIG_PATH.
Exact. Actually, the setqt<N> scripts do that with PATH. I suggest to extend
that to PKG_CONFIG_PATH. For example:
---
cat > /usr/bin/setqt4 << 'EOF'
if [ "x$QT5DIR" != "x/usr" ]; then
pathremove $QT5DIR/bin
pathremove $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
fi
if [ "x$QT4DIR" != "x/usr" ]; then
pathprepend $QT4DIR/bin
pathprepend $QT4DIR/lib/pkgconfig PKG_CONFIG_PATH
fi
echo PATH=$PATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH
EOF
---
Pierre
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page