2015-11-02 03:20:47

by Thiago Macieira

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On Saturday 31 October 2015 12:39:21 Alexey Brodkin wrote:
> Hi Thiago,
>
> I noticed that with your patch "Update the buildsystem for KConfig finding
> Qt"
> I cannot use "make xconfig" in Fedora 22 any longer.

Hello Alexey

> The reason why xconfig target fails is in Fedora (at least its recent
> versions)
> there's no "qmake". Instead there're "qmake-qt4" and/or
> "qmake-qt5" depending on which Qt packages are installed.

Hmm... you're right. There's no check for a program with a different name in
the new Makefile. I apologise, I never tested that case.

Fedora is knowingly deviating from Qt Project recommendations. I will fix
this, but please file a bug report against their Qt packages so there's some
pressure to adopt a standard solution that everyone else already does.

> But IMHO it would be really nice if we don't break things that used to
> work.

Right. Can you try the attached patch to see if it solves the problem for you?

--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center


Attachments:
0001-Attempt-to-find-qmake-qt5-and-qmake-qt4-if-no-qmake-.patch (1.25 kB)

2015-11-02 10:36:48

by Michal Marek

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On 2015-11-02 04:20, Thiago Macieira wrote:
> - qtver=`qmake -query QT_VERSION` || { \
> + qtver=`qmake -query QT_VERSION` || \
> + qtver=`qmake-qt5 -query QT_VERSION` || \
> + qtver=`qmake-qt4 -query QT_VERSION` || { \

The qtlibdir= etc assignments below still use qmake directly, plus this
will print an error if the command is not called "qmake." As Alexey
says, we do not need qmake, we need moc and the cflags / ldflags. Since
pkg-config worked for us previously, I suggest to use pkg-config again
and just check which of QtGui or Qt5Widgets is available.

Michal

2015-11-02 13:47:04

by Thiago Macieira

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On Monday 02 November 2015 11:36:43 Michal Marek wrote:
> On 2015-11-02 04:20, Thiago Macieira wrote:
> > - qtver=`qmake -query QT_VERSION` || { \
> > + qtver=`qmake -query QT_VERSION` || \
> > + qtver=`qmake-qt5 -query QT_VERSION` || \
> > + qtver=`qmake-qt4 -query QT_VERSION` || { \
>
> The qtlibdir= etc assignments below still use qmake directly, plus this
> will print an error if the command is not called "qmake." As Alexey
> says, we do not need qmake, we need moc and the cflags / ldflags. Since
> pkg-config worked for us previously, I suggest to use pkg-config again
> and just check which of QtGui or Qt5Widgets is available.

Here's an attempt using pkg-config.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center


Attachments:
0001-Use-pkg-config-to-find-Qt-4-and-5-instead-of-direct-.patch (2.66 kB)

2015-11-02 15:50:38

by Michal Marek

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On Mon, Nov 02, 2015 at 08:46:55AM -0500, Thiago Macieira wrote:
> On Monday 02 November 2015 11:36:43 Michal Marek wrote:
> > On 2015-11-02 04:20, Thiago Macieira wrote:
> > > - qtver=`qmake -query QT_VERSION` || { \
> > > + qtver=`qmake -query QT_VERSION` || \
> > > + qtver=`qmake-qt5 -query QT_VERSION` || \
> > > + qtver=`qmake-qt4 -query QT_VERSION` || { \
> >
> > The qtlibdir= etc assignments below still use qmake directly, plus this
> > will print an error if the command is not called "qmake." As Alexey
> > says, we do not need qmake, we need moc and the cflags / ldflags. Since
> > pkg-config worked for us previously, I suggest to use pkg-config again
> > and just check which of QtGui or Qt5Widgets is available.
>
> Here's an attempt using pkg-config.

Works for me on openSUSE, it just started to prefer Qt5 now. But it
correctly builds against Qt4 if Qt5 is not available.

Michal

2015-11-02 16:01:59

by Thiago Macieira

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On Monday 02 November 2015 16:50:33 Michal Marek wrote:
> On Mon, Nov 02, 2015 at 08:46:55AM -0500, Thiago Macieira wrote:
> > On Monday 02 November 2015 11:36:43 Michal Marek wrote:
> > > On 2015-11-02 04:20, Thiago Macieira wrote:
> > > > - qtver=`qmake -query QT_VERSION` || { \
> > > > + qtver=`qmake -query QT_VERSION` || \
> > > > + qtver=`qmake-qt5 -query QT_VERSION` || \
> > > > + qtver=`qmake-qt4 -query QT_VERSION` || { \
> > >
> > > The qtlibdir= etc assignments below still use qmake directly, plus this
> > > will print an error if the command is not called "qmake." As Alexey
> > > says, we do not need qmake, we need moc and the cflags / ldflags. Since
> > > pkg-config worked for us previously, I suggest to use pkg-config again
> > > and just check which of QtGui or Qt5Widgets is available.
> >
> > Here's an attempt using pkg-config.
>
> Works for me on openSUSE, it just started to prefer Qt5 now. But it
> correctly builds against Qt4 if Qt5 is not available.

That's a consequence of using pkg-config. Now you can no longer choose your
preferred Qt version by setting QT_SELECT, like the qmake solution would have
allowed, as recommended by the Qt Project. At least, the qtchooser shell
function extension does set PKG_CONFIG_PATH, so if you install a different
version elsewhere, that version should be picked up.

It would have been the same with CMake too, btw.

Alexey, did this solve the problem for you?
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center

2015-11-02 16:07:12

by Michal Marek

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

On 2015-11-02 17:01, Thiago Macieira wrote:
> On Monday 02 November 2015 16:50:33 Michal Marek wrote:
>> On Mon, Nov 02, 2015 at 08:46:55AM -0500, Thiago Macieira wrote:
>>> On Monday 02 November 2015 11:36:43 Michal Marek wrote:
>>>> On 2015-11-02 04:20, Thiago Macieira wrote:
>>>>> - qtver=`qmake -query QT_VERSION` || { \
>>>>> + qtver=`qmake -query QT_VERSION` || \
>>>>> + qtver=`qmake-qt5 -query QT_VERSION` || \
>>>>> + qtver=`qmake-qt4 -query QT_VERSION` || { \
>>>>
>>>> The qtlibdir= etc assignments below still use qmake directly, plus this
>>>> will print an error if the command is not called "qmake." As Alexey
>>>> says, we do not need qmake, we need moc and the cflags / ldflags. Since
>>>> pkg-config worked for us previously, I suggest to use pkg-config again
>>>> and just check which of QtGui or Qt5Widgets is available.
>>>
>>> Here's an attempt using pkg-config.
>>
>> Works for me on openSUSE, it just started to prefer Qt5 now. But it
>> correctly builds against Qt4 if Qt5 is not available.
>
> That's a consequence of using pkg-config. Now you can no longer choose your
> preferred Qt version by setting QT_SELECT, like the qmake solution would have
> allowed, as recommended by the Qt Project.

Yeah, but I think this is acceptable for an application like qconf. Use
best effort to build against some Qt version to let the user configure
their kernel.

Michal

2015-11-02 16:28:36

by Alexey Brodkin

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

Hi Thiago,

On Mon, 2015-11-02 at 11:01 -0500, Thiago Macieira wrote:
> On Monday 02 November 2015 16:50:33 Michal Marek wrote:
> > On Mon, Nov 02, 2015 at 08:46:55AM -0500, Thiago Macieira wrote:
> > > On Monday 02 November 2015 11:36:43 Michal Marek wrote:
> > > > On 2015-11-02 04:20, Thiago Macieira wrote:
> > > > > - qtver=`qmake -query QT_VERSION` || { \
> > > > > + qtver=`qmake -query QT_VERSION` || \
> > > > > + qtver=`qmake-qt5 -query QT_VERSION` || \
> > > > > + qtver=`qmake-qt4 -query QT_VERSION` || { \
> > > >
> > > > The qtlibdir= etc assignments below still use qmake directly, plus this
> > > > will print an error if the command is not called "qmake." As Alexey
> > > > says, we do not need qmake, we need moc and the cflags / ldflags. Since
> > > > pkg-config worked for us previously, I suggest to use pkg-config again
> > > > and just check which of QtGui or Qt5Widgets is available.
> > >
> > > Here's an attempt using pkg-config.
> >
> > Works for me on openSUSE, it just started to prefer Qt5 now. But it
> > correctly builds against Qt4 if Qt5 is not available.
>
> That's a consequence of using pkg-config. Now you can no longer choose your
> preferred Qt version by setting QT_SELECT, like the qmake solution would have
> allowed, as recommended by the Qt Project. At least, the qtchooser shell
> function extension does set PKG_CONFIG_PATH, so if you install a different
> version elsewhere, that version should be picked up.
>
> It would have been the same with CMake too, btw.
>
> Alexey, did this solve the problem for you?

Yep, thanks a lot.
"make xconfig" now works for me!

-Alexey????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2015-11-02 20:38:32

by Michal Marek

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

Dne 2.11.2015 v 17:28 Alexey Brodkin napsal(a):
> On Mon, 2015-11-02 at 11:01 -0500, Thiago Macieira wrote:
>> Alexey, did this solve the problem for you?
>
> Yep, thanks a lot.
> "make xconfig" now works for me!

Thanks for testing, I will apply it to kbuild.git#kconfig.

Thanks,
Michal

2015-11-02 20:43:14

by Alexey Brodkin

[permalink] [raw]
Subject: Re: make xconfig no longer works in Fedora

Hi Michal,

On Mon, 2015-11-02 at 21:38 +0100, Michal Marek wrote:
> Dne 2.11.2015 v 17:28 Alexey Brodkin napsal(a):
> > On Mon, 2015-11-02 at 11:01 -0500, Thiago Macieira wrote:
> > > Alexey, did this solve the problem for you?
> >
> > Yep, thanks a lot.
> > "make xconfig" now works for me!
>
> Thanks for testing, I will apply it to kbuild.git#kconfig.

Thank you for doing this.

Feel free to add "Acked-by: Alexey Brodkin <[email protected]>"

-Alexey????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?