Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel make xconfig spawns deprecated warnings
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3345
Location: Gainesville, Florida

PostPosted: Thu Dec 19, 2019 7:21 pm    Post subject: kernel make xconfig spawns deprecated warnings Reply with quote

Along about kernel >=5.2.0 make xconfig (the qt version of gconfig) started spawning multiple "deprecated" warnings, but xconfig still functions normally, and the kernel configuration window opens with all the options. I've noticed that right after the latest qt updates more and more warnings are appearing.

I tried manually editing the kernel and qt files mentioned, but couldn't get the syntax correct. (I'm no expert). Not being sure if it's only a qt or kernel source problem, I assume it should be reported to both kernel and qt devs, but not sure how to do so. I 'm thinking it could be addressed with a big correctly constructed patch in both linux kernel AND qt source files, but a patch added to gentoo-sources kernel patches would really be a nice addition for gentoo-sources make xconfig users.

Who knows how long it will take kernel or qt devs to fixing this minor kind of stuff? Anyone have thoughts/advice on this?

So far it's not been a critical problem, but since more warnings are appearing I'm wondering how much longer this will remain true. :?

Code:
gentoo-main /usr/src/linux-5.4.5-gentoo # make xconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/images.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  UPD     scripts/kconfig/qconf-cfg
  MOC     scripts/kconfig/qconf.moc
  HOSTCXX scripts/kconfig/qconf.o
scripts/kconfig/qconf.cc: In member function ‘void ConfigItem::updateMenu()’:
scripts/kconfig/qconf.cc:157:31: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  157 |    setText(noColIdx, QString::null);
      |                               ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:157:31: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  157 |    setText(noColIdx, QString::null);
      |                               ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:158:32: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  158 |    setText(modColIdx, QString::null);
      |                                ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:158:32: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  158 |    setText(modColIdx, QString::null);
      |                                ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:159:32: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  159 |    setText(yesColIdx, QString::null);
      |                                ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:159:32: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  159 |    setText(yesColIdx, QString::null);
      |                                ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc: In member function ‘void ConfigLineEdit::show(ConfigItem*)’:
scripts/kconfig/qconf.cc:279:20: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  279 |   setText(QString::null);
      |                    ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc:279:20: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
  279 |   setText(QString::null);
      |                    ^~~~
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:913:23: note: declared here
  913 |     static const Null null;
      |                       ^~~~
scripts/kconfig/qconf.cc: In member function ‘void ConfigInfoView::menuInfo()’:
scripts/kconfig/qconf.cc:1085:55: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
 1085 |      head += QString().sprintf("<a href=\"s%p\">", sym);
      |                                                       ^
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:382:14: note: declared here
  382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |              ^~~~~~~
scripts/kconfig/qconf.cc:1094:54: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
 1094 |     head += QString().sprintf("<a href=\"s%p\">", sym);
      |                                                      ^
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:382:14: note: declared here
  382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |              ^~~~~~~
scripts/kconfig/qconf.cc:1122:90: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
 1122 |   debug += QString().sprintf("defined at %s:%d<br><br>", _menu->file->name, _menu->lineno);
      |                                                                                          ^
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:382:14: note: declared here
  382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |              ^~~~~~~
scripts/kconfig/qconf.cc: In member function ‘QString ConfigInfoView::debug_info(symbol*)’:
scripts/kconfig/qconf.cc:1145:69: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
 1145 |    debug += QString().sprintf("prompt: <a href=\"m%p\">", prop->menu);
      |                                                                     ^
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:382:14: note: declared here
  382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |              ^~~~~~~
scripts/kconfig/qconf.cc: In static member function ‘static void ConfigInfoView::expr_print_help(void*, symbol*, const char*)’:
scripts/kconfig/qconf.cc:1217:53: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
 1217 |   *text += QString().sprintf("<a href=\"s%p\">", sym);
      |                                                     ^
In file included from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from scripts/kconfig/qconf.cc:9:
/usr/include/qt5/QtCore/qstring.h:382:14: note: declared here
  382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |              ^~~~~~~
  HOSTLD  scripts/kconfig/qconf
scripts/kconfig/qconf  Kconfig
#

_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.30-r6, gcc-9.3.0 kernel-5.5.11-gentoo USE=experimental
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14944

PostPosted: Fri Dec 20, 2019 2:59 am    Post subject: Reply with quote

The kernel ships sources for the user programs xconfig, gconfig, menuconfig, etc. The sources for the Qt-based configurator now trigger warnings from Qt headers because the Qt developers have deprecated a construct that xconfig uses. I see two options: try to convince the Qt developers to reverse the deprecation (unlikely to succeed) or report the problem to whoever maintains the xconfig sources in the kernel, so that they can update to a non-deprecated form. This may be easy, or not, depending on what they consider the minimum supported Qt version, and whether that version allows the now-preferred construct. For example, if the kernel developers said that any qt >= 5.1 is supported, and the now-preferred construct is only legal in qt >= 5.4, then the kernel cannot resolve the deprecation warning without dropping support for qt < 5.4.

With that background out of the way, the null vs QString() change is probably very backward compatible. The sprintf change is probably also compatible.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7368

PostPosted: Fri Dec 20, 2019 2:11 pm    Post subject: Reply with quote

i would just add deprecations warnings are not for user, it's not really your concern
once deprecrations will tranform into errors, it would still be the devs (kernel in this case) to fix this.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3345
Location: Gainesville, Florida

PostPosted: Sat Dec 21, 2019 8:33 pm    Post subject: Reply with quote

Thanks much for the informative comments and advice.

I sent an email titled "QT deprecations in xconfig spawn many warnings" describing what I posted here to:

KCONFIG
M: Masahiro Yamada <masahiroy@kernel.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig
L: linux-kbuild@vger.kernel.org
S: Maintained
F: Documentation/kbuild/kconfig*
F: scripts/kconfig/
F: scripts/Kconfig.include

Who I found at: https://www.kernel.org/doc/linux/MAINTAINERS Hope this is the appropriate person. However, I forgot to mention my QT and kernel versions. :oops: I did send a link to my post here so they could see all the warnings, and my post does have linux-5.4.5 at the top
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.30-r6, gcc-9.3.0 kernel-5.5.11-gentoo USE=experimental
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum