Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212086 - x11-libs/qt-4.5.2 include problems
Summary: x11-libs/qt-4.5.2 include problems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 276864 (view as bug list)
Depends on:
Blocks: 212069 276864
  Show dependency tree
 
Reported: 2008-03-02 16:38 UTC by pavel sanda
Modified: 2009-07-07 20:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
example file (main.cpp,347 bytes, text/plain)
2008-03-02 16:39 UTC, pavel sanda
Details
qconfig.pri (qconfig.pri,653 bytes, text/plain)
2009-07-03 18:18 UTC, pavel sanda
Details
first.out (1,980.22 KB, text/plain)
2009-07-03 20:40 UTC, pavel sanda
Details
second.out (2,8.04 KB, text/plain)
2009-07-03 20:41 UTC, pavel sanda
Details
Session Manager test (test.cpp,163 bytes, text/plain)
2009-07-03 21:40 UTC, Davide Pesavento (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pavel sanda 2008-03-02 16:38:47 UTC
fyi there are problems with compilation of lyx package with qt 4.4 rc1.
it seems that its not qt bug, but some problem in gentoo emerging.

attaching minimal example which can be compiled with qt 4.4 rc1 sources locally
compiled and installed, but not when emerged via portage.

this is the error:
$ g++  -I/usr/include/qt4 -I/usr/include/qt4/QtGui main.cpp                                                                                                          
main.cpp: In member function 'void MyApp::commitData(QSessionManager&)':                                                                                             
main.cpp:10: error: invalid use of undefined type 'struct QSessionManager'                                                                                           
/usr/include/qt4/QtGui/qapplication.h:63: error: forward declaration of 'struct QSessionManager' 

having main.cpp containing only #include <QSessionManager>:                                                                                                          
$ g++ -E -I/usr/include/qt4 -I/usr/include/qt4/QtGui main.cpp |grep -i qsessio                                                                                       
# 1 "/usr/include/qt4/QtGui/QSessionManager" 1                                                                                                                       
# 1 "/usr/include/qt4/QtGui/qsessionmanager.h" 1                                                                                                                     
# 40 "/usr/include/qt4/QtGui/qsessionmanager.h"                                                                                                                      
# 41 "/usr/include/qt4/QtGui/qsessionmanager.h" 2                                                                                                                    
# 42 "/usr/include/qt4/QtGui/qsessionmanager.h" 2                                                                                                                    
# 44 "/usr/include/qt4/QtGui/qsessionmanager.h" 2                                                                                                                    
# 1 "/usr/include/qt4/QtGui/QSessionManager" 2   


$  g++ -E  -I/usr/include/qt4/QtGui main.cpp |grep -i qsessio                                                                                                        
In file included from /usr/include/qt4/QtGui/QSessionManager:1,                                                                                                      
                 from main.cpp:1:                                                                                                                                    
/usr/include/qt4/QtGui/qsessionmanager.h:40:28: error: QtCore/qobject.h: No such file or directory                                                                   
/usr/include/qt4/QtGui/qsessionmanager.h:41:31: error: QtGui/qwindowdefs.h: No such file or directory                                                                
/usr/include/qt4/QtGui/qsessionmanager.h:42:28: error: QtCore/qstring.h: No such file or directory                                                                   
/usr/include/qt4/QtGui/qsessionmanager.h:43:32: error: QtCore/qstringlist.h: No such file or directory                                                               
# 1 "/usr/include/qt4/QtGui/QSessionManager" 1                                                                                                                       
# 1 "/usr/include/qt4/QtGui/qsessionmanager.h" 1                                                                                                                     
# 47 "/usr/include/qt4/QtGui/qsessionmanager.h"                                                                                                                      
class QSessionManagerPrivate;                                                                                                                                        
class Q_GUI_EXPORT QSessionManager : public QObject                                                                                                                  
    Q_DECLARE_PRIVATE(QSessionManager)                                                                                                                               
    QSessionManager(QApplication *app, QString &id, QString &key);                                                                                                   
    ~QSessionManager();                                                                                                                                              
# 1 "/usr/include/qt4/QtGui/QSessionManager" 2  


you see - when i wipe -I/usr/include/qt4 out, the *.h are not found _AND_ definition of QSessionManager miraculously appears.                                                                                                                                                
more experimenting shows that deleting include lines in qsessionmanager.h helps and inclusion any of them brings the problem back.
Comment 1 pavel sanda 2008-03-02 16:39:32 UTC
Created attachment 145095 [details]
example file
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-03-02 16:45:20 UTC
This is already known and being worked on; please note that the ebuilds are package.masked for a good reason, not intended for users at all ATM.
Comment 3 Ingmar Vanhassel (RETIRED) gentoo-dev 2008-03-02 18:50:53 UTC
(In reply to comment #2)
> This is already known and being worked on; please note that the ebuilds are
> package.masked for a good reason, not intended for users at all ATM.

Yes, with the help of the KDE team, I've been working on ebuilds for the recent beta release, this is currently the one problem that's stopping me from committing them, because it renders the ebuilds effectively unusable.

I would highly appreciate *clean* suggestions on how to fix this.
Comment 4 Ingmar Vanhassel (RETIRED) gentoo-dev 2008-03-05 23:10:38 UTC
Fixed in beta1
Comment 5 pavel sanda 2008-03-05 23:22:50 UTC
btw was this problem qt 4.4 related only or was it part of dividing qt into 
modules? there is a report on bug with the same err logs but with some older qt
version (on some freebsd system though) on lyx list and nobody knew whats goin on there or how the fix should be.
Comment 6 Ingmar Vanhassel (RETIRED) gentoo-dev 2008-03-05 23:38:41 UTC
(In reply to comment #5)
> btw was this problem qt 4.4 related only or was it part of dividing qt into 
> modules? there is a report on bug with the same err logs but with some older qt
> version (on some freebsd system though) on lyx list and nobody knew whats goin
> on there or how the fix should be.

It was a bug in the way we split Qt into seperate modules.
qconfig.h (which we is installed by x11-libs/qt-core) contains the features that your Qt build has enabled.
The problem, simply put, was that when installing other Qt split ebuilds, this specific file wasn't updated to reflect that.
Also see bug 206975, if you're interested, which is fixed in a similar way.
Comment 7 pavel sanda 2009-07-03 16:04:54 UTC
hello, reopening becaause the same error is here again with ~4.5.2
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2009-07-03 16:24:59 UTC
I can't reproduce with the attached testcase...
Comment 9 pavel sanda 2009-07-03 16:29:16 UTC
what qt libs do you have installed? here i see:
qt-core
qt-dbus
qt-gui
qt-script
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2009-07-03 16:42:25 UTC
I dont even understand the bug. Can somebody elaborate please?

This works for me

hwoarang@Raptor ~ $ g++  -I/usr/include/qt4 -I/usr/include/qt4/QtGui -L/usr/lib64/qt4 -lQtGui main.cpp
hwoarang@Raptor ~ $

If I remove /usr/include/qt4 then QtCore/qobject.h and friends cant be found but thats normal since we dont include QtCore headers :/
Comment 11 pavel sanda 2009-07-03 16:47:21 UTC
maybe this is dependent on how qt is emerged. after masking qt meta package
i unmerged all qt libs and merged only those listed above.
after this lyx stopped to compile and trying this minimal example shows:

g++  -I/usr/include/qt4 -I/usr/include/qt4/QtGui -L/usr/lib64/qt4 -lQtGui main.cpp   
main.cpp: In member function 'void MyApp::commitData(QSessionManager&)':
main.cpp:10: error: invalid use of undefined type 'struct QSessionManager'
/usr/include/qt4/QtGui/qapplication.h:68: error: forward declaration of 'struct QSessionManager'
Comment 12 pavel sanda 2009-07-03 16:49:48 UTC
(i forgot to add - i unmerged 4.5.1 and emerged 4.5.2 libs)
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2009-07-03 18:04:07 UTC
emerge --info, and attach your /usr/share/qt4/mkspecs/qconfig.pri too.
Comment 14 pavel sanda 2009-07-03 18:17:28 UTC
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.19-suspend2-r3 i686)
=================================================================
System uname: Linux-2.6.19-suspend2-r3-i686-Intel-R-_Pentium-R-_M_processor_1.86GHz-with-glibc2.0
Timestamp of tree: Wed, 01 Jul 2009 20:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/"
LANG="cs_CZ"                    
LDFLAGS="-Wl,-O1"               
MAKEOPTS="-j2"                  
PKGDIR="/usr/portage/packages"  
PORTAGE_CONFIGROOT="/"          
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"               
PORTAGE_TMPDIR="/var/tmp"       
PORTDIR="/usr/portage"          
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde latex ldap libnotify mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon fglrx vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 15 pavel sanda 2009-07-03 18:18:14 UTC
Created attachment 196528 [details]
qconfig.pri
Comment 16 Davide Pesavento (RETIRED) gentoo-dev 2009-07-03 20:26:26 UTC
Please attach also the preprocessed sources of the test case:
  g++ -E -I/usr/include/qt4 -I/usr/include/qt4/QtGui main.cpp

and:
  g++ -E -I/usr/include/qt4/QtGui main.cpp
Comment 17 pavel sanda 2009-07-03 20:40:27 UTC
Created attachment 196538 [details]
first.out
Comment 18 pavel sanda 2009-07-03 20:41:41 UTC
Created attachment 196539 [details]
second.out
Comment 19 Davide Pesavento (RETIRED) gentoo-dev 2009-07-03 21:30:47 UTC
Try compiling with qmake (qmake -project && qmake && make)
Comment 20 Davide Pesavento (RETIRED) gentoo-dev 2009-07-03 21:40:34 UTC
Created attachment 196545 [details]
Session Manager test

Please try this small test: post the output of
g++ -I/usr/include/qt4 test.cpp && ./a.out
Comment 21 pavel sanda 2009-07-06 20:55:57 UTC
$ g++ -I/usr/include/qt4 test.cpp && ./a.out
PASS
Comment 22 pavel sanda 2009-07-06 20:58:49 UTC
if it is helpful for you the order of emerging packages was:
qt-core-4.5.2
qt-dbus-4.5.2
qt-script-4.5.2
qt-gui-4.5.2
Comment 23 Dror Levin (RETIRED) gentoo-dev 2009-07-07 20:54:39 UTC
*** Bug 276864 has been marked as a duplicate of this bug. ***
Comment 24 Dror Levin (RETIRED) gentoo-dev 2009-07-07 20:56:33 UTC
This is fixed in qt-gui-4.5.2-r1, please sync soon and re-emerge. Thank you for the report, and to Ingmar for the solution :)