Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344835 - dev-util/cmake-2.8.1: FindQt4.cmake fails to set Qt4 include directory properly when Qt 4.7.0 is installed
Summary: dev-util/cmake-2.8.1: FindQt4.cmake fails to set Qt4 include directory proper...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 19:09 UTC by Shawn Rutledge
Modified: 2011-06-13 10:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Rutledge 2010-11-09 19:09:23 UTC
If my CMakeLists.txt has this

find_package(KDE4 REQUIRED)

it will first try to find Qt4.

Reproducible: Always

Steps to Reproduce:
1.try to write a new program for KDE, using cmake to build it
2.run cmake
3.fails with error: QtCore/QtGlobal: No such file or directory
4.add a "message" directive to the bottom of /usr/share/apps/cmake/modules/FindQt4.cmake:
message(STATUS "QT4 include dir ${QT_INCLUDE_DIR}")
5.try cmake again

Actual Results:  

-- Found Qt-Version 4.7.0 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- QT4 include dir /usr/include
-- Phonon Version: 4.4.2

CMake Error at /usr/share/apps/cmake/modules/FindKDE4Internal.cmake:1167 (message):
  Could not compile simple test program:

   #include <QtCore/QtGlobal>
   int main()
   {
   #ifdef QT_VISIBILITY_AVAILABLE 
   return 0;
   #else 
   return 1; 
   #endif 
   }

  Change Dir:
  /home/user/myproject/qtcreator-build/CMakeFiles/CMakeTmp
 
  Run Build Command:/usr/bin/make "cmTryCompileExec/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  make[1]: Entering directory
  `/home/user/myproject/qtcreator-build/CMakeFiles/CMakeTmp'


  /usr/bin/cmake -E cmake_progress_report
  /home/user/myproject/qtcreator-build/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building CXX object
  CMakeFiles/cmTryCompileExec.dir/check_qt_visibility.cpp.o

  /usr/lib/ccache/bin/c++ -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef
  -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security
  -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common
  -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden
  -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit
  -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg
  -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript
  -I/usr/include/QtOpenGL -I/usr/include/QtNetwork
  -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner
  -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui
  -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt/mkspecs/default -o
  CMakeFiles/cmTryCompileExec.dir/check_qt_visibility.cpp.o -c
  /home/user/myproject/qtcreator-build/CMakeTmp/check_qt_visibility.cpp

  /home/user/myproject/qtcreator-build/CMakeTmp/check_qt_visibility.cpp:1:27:
  error: QtCore/QtGlobal: No such file or directory

  make[1]: Leaving directory
  `/home/user/myproject/qtcreator-build/CMakeFiles/CMakeTmp'

  make[1]: *** [CMakeFiles/cmTryCompileExec.dir/check_qt_visibility.cpp.o]
  Error 1

  make: *** [cmTryCompileExec/fast] Error 2

Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
  CMakeLists.txt:2 (find_package)

-- Configuring incomplete, errors occurred!


Expected Results:  
QT4 include dir should be /usr/include/qt4 on Gentoo
Comment 1 Shawn Rutledge 2010-11-09 19:13:42 UTC
workaround - let cmake see what it's expecting to:

cd /usr/include/
ln -s qt4/* .
Comment 2 Shawn Rutledge 2010-11-09 19:14:47 UTC
[i7][12:12:42 PM] emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.11.2-r0, 2.6.33-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 09 Nov 2010 05:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.4_p6-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fno-ident -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -fno-ident -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j10"
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="/var/lib/layman/science /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="16bit 3dnow 3dnowext X a52 aac acct acl acpi alac alisp alsa amd64 amr amrnb amrwb ao apache2 assistant astribank audiofile autoipd automount autostart avahi bash-completion berkdb bidi bineditor bonjour bookmarks bzip2 cairo calendar cdb cdda cddb cdio cdparanoia cdr cleartype cli consolekit contactnotes cracklib crypt cups curl cxx daap dbus devhelp device-mapper dga dia dirac djvu docbook dot dri dssi dts dv dvb dvbplayer dvd dvdnav dvdr dvdread eckb1 ecmark ecmark2 ecmark3 ecmg2 ecoslec ecsteve ecsteve2 encode espeak excel exif expat fame fbcon fbdev festival ffmpeg fftw flac flite fortran fts3 fuse garmin gcj gd gdbm ggi gif gimp git glade glib glitz gnome gpgme gpm graphviz gs gstreamer gtk h323 hal handbook hddtemp heterogeneous howl howl-compat html httpd hybrid-auth hyperestraier iconv id3 id3tag idn image imagemagick imap imlib inkjar inotify ipod ipv6 irda jabber jack java6 jbig jfs jit jpeg jpeg2k kate kde konqueror kqemu ladspa lame laptop lash latex lcd lcms ldap libass libsamplerate libv4l2 lirc lircsettings live lm_sensors log4j lv2 lzo mad madwifi maps matroska mbox mbrola mdnsresponder-compat melt midi mikmod mjpeg mmx mmxext mng modplug modules mono mozdevelop mp2 mp3 mp3rtp mp4 mpeg mplayer mudflap multilib mysql nas ncurses nemesi net netjack network nis nls nntp nptl nptlonly nsplugin ntfs ntp nuv nxclient objc objc++ objc-gc ogg openal opengl openmp openstreetmap optimized-qmake oscar pam pcre pda pdf perl phonon php plotutils png pop portaudio posix postgres postproc postscript ppds pppd pri private-headers pulseaudio python qml qt3support qt4 qtscript quicktime quotes rar rdesktop rdesktop-vrdp readline realmedia replaygain resolvconf romio rrdcgi rrdtool rss rtc rtf rtsp samba scanner schroedinger scripting sdl sdl-image sdl-sound sdlaudio semantic-desktop sensord server session shorten shout sidebar skype slang slp smime smp smtp sndfile sockets soundtouch sourceview speex sql sqlite sqlite3 srt sse sse2 ssl startup-notification stream subtitles subversion svg swig sysfs tcpd teletext test-programs theora threads threadsafe thumbnail tiff timidity transcode transparent-proxy truetype twolame udev unicode upnp urandom usb v4l v4l2 vaapi vamp vboxwebsrv vcd vcdinfo vcdx vdpau vim-syntax vim-with-x visualization vlm vnc vorbis vpx watchdog webdav webkit wifi wmf wxwidgets x264 xanim xcb xext xface xfs xine xinerama xml xmlpatterns xorg xosd xscreensaver xv xvid xvmc yahoo yv12 zaptel zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="noritakevfd" LINGUAS="en ru" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa v4l fbdev nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Shawn Rutledge 2010-11-09 19:17:16 UTC
(In reply to comment #1)
> workaround - let cmake see what it's expecting to:
> 
> cd /usr/include/
> ln -s qt4/* .
> 
Nevermind... then it expects to find /usr/lib/libQt* too.
Comment 4 Shawn Rutledge 2010-11-09 22:50:40 UTC
This helped:

cd /usr/include
ln -s qt4 Qt

since it was using -I/usr/include/Qt for that test.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2011-02-14 23:12:48 UTC
Could you please attach a simple CMakeLists.txt file from a project that has this problem?!
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2011-04-12 21:51:01 UTC
Maybe the qt guys could have a quick look at this.
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2011-06-13 10:57:45 UTC
No reply for quite some time.