Tuesday, September 20, 2011

Fix "make xconfig" in buildroot-2011.08

Buildroot-2011.08 could use both Qt3 and Qt4 for configuration menu representation depending on Qt version installed on host system.

But if there're both of them (for example Linux kernel prior 2.6.38 uses Qt3 and Qt4 I use for application development) you'll get weird error on attempt to execute graphical configuration utility of buildroot in question:

 $ make xconfig  
 mkdir -p /home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config/lxdialog  
 make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" obj=/home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config -C package/config -f Makefile.br qconf  
 make[1]: Entering directory `/home/_private/Downloads/buildroot-2011.08/package/config'  
 /usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -I/home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config -DQT_SHARED -DQT3_SUPPORT -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtSql  -D LKC_DIRECT_LINK -c qconf.cc -o /home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config/qconf.o  
 In file included from qconf.cc:48:  
 /home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config/qconf.moc:13: fatal error: private/qucomextra_p.h: No such file or directory  
 compilation terminated.  
 make[1]: *** [/home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config/qconf.o] Error 1  
 make[1]: Leaving directory `/home/_private/Downloads/buildroot-2011.08/package/config'  
 make: *** [/home/_private/Downloads/buildroot-2011.08/output/build/buildroot-config/qconf] Error 2  

To fix this issue in Ubuntu you only need to set "moc" alternative to "moc-qt4", so /usr/bin/moc will point to "moc" from Qt4 instead of the one from Qt3 (which is set by default):

 sudo update-alternatives --config moc  
 There are 2 choices for the alternative moc (providing /usr/bin/moc).  
   
  Selection  Path       Priority  Status  
 ------------------------------------------------------------  
 * 0      /usr/bin/moc-qt3  45    auto mode  
  1      /usr/bin/moc-qt3  45    manual mode  
  2      /usr/bin/moc-qt4  40    manual mode  
   
 Press enter to keep the current choice[*], or type selection number: 2  


Sunday, September 18, 2011

Fix black tooltip background in Eclipse

To solve black tooltip background in Eclipse in modern Ubuntu linux distributions ("Ambiance" theme):
Simply reset "System default" option and set preferred color of "Source hoover background" in "Preferences"->"C/C++"->"Editor"->"Appearance color options":

And here we go: