Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295053 - sci-libs/vtk-5.4.2 doesn't build with the examples use flag
Summary: sci-libs/vtk-5.4.2 doesn't build with the examples use flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Markus Dittrich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-29 15:10 UTC by Matthias Langer
Modified: 2009-12-19 18:19 UTC (History)
4 users (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 Matthias Langer 2009-11-29 15:10:27 UTC
When trying to emerge

sci-libs/vtk-5.4.2 USE="doc examples java mpi python qt3 threads -boost% -cg% -patented -qt4 -tcl -tk"

I get

"
[ 77%] Building CXX object Infovis/CMakeFiles/vtkInfovisPythonD.dir/vtkTreeOrbitLayoutStrategyPython.o
Internal cmake changing into directory: /var/tmp/portage/sci-libs/vtk-5.4.2/work/VTK/Examples/All
Error: cmake execution failed
The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Configuring
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Configuring
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Configuring
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Configuring
Detecting CXX compiler ABI info - done
Configuring
[...]
Configuring
Could NOT find Motif  (missing:  MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
Could not find Motif libraries.  Not building Motif examples.
Configuring
[...]
Configuring
CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1625 (MESSAGE):
  Qt qmake not found!
Call Stack (most recent call first):
  Infovis/Cxx/ChartView/CMakeLists.txt:14 (FIND_PACKAGE)


Configuring
[...]
Configuring
Configuring incomplete, errors occurred!
[...]
[ 77%] Built target vtkGeovis
make: *** [all] Error 2
 * 
 * ERROR: sci-libs/vtk-5.4.2 failed.
"

Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 29 Nov 2009 13:45:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  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.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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 /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.lagis.at/ ftp://gentoo.lagis.at/ http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ "
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/var/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="/var/portage/repos/gentoo"
PORTDIR_OVERLAY="/var/portage/repos/layman/java-overlay /var/portage/repos/layman/games /var/portage/repos/private"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt cups dbus djvu dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gd gdbm gif gimp gnome gnome-keyring gphoto2 gpm gstreamer gtk hal hddtemp iconv icu ipv6 java java6 jpeg jpeg2k kpathsea lcms libnotify lm_sensors log4j mad matroska mikmod mmap mmx mmxext modules mono mp3 mp4 mpeg mudflap multilib musicbrainz ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl plotutils png ppds pppd pulseaudio python qt3support quicktime readline reflection ruby sdl session spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd tetex theora threads thunar tiff truetype unicode usb vcd vim-syntax vorbis wavpack x264 xattr xine xinerama xml xorg xulrunner xv xvid zlib" 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" CAMERAS="canon konica ptp2 kodak" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Matthias Langer 2009-11-29 16:10:14 UTC
I was able to circumvent the error mentioned in comment 0 by disabling the "examples" USE flag.
Comment 2 Sebastiaan 2009-12-03 08:21:56 UTC
Strange, it tries to build Qt4 examples while you have that use-flag disabled.

Looking at the ebuild, the examples use-flag makes a dependency on QT4, so you should have QT4 libraries installed.

Can you try enabling the QT4 useflag?
USE="qt4 examples" emerge -1av vtk

If so, specifying the examples use-flag shoud imply specifying qt4.

I can say that it works with USE="examples java patented python qt4 threads -boost -cg -doc -mpi -qt3 -tcl -tk"
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2009-12-04 04:31:43 UTC
(In reply to comment #2)
> Looking at the ebuild, the examples use-flag makes a dependency on QT4, so you
> should have QT4 libraries installed.

Yeah, the examples use flag should pull in qt-core which "owns" qmake.
So cmake should pick it up. Could you perhaps see if qt-core is installed
and also maybe try re-emerging qt-core-4*.

Thanks,
Markus
Comment 4 Matthias Langer 2009-12-06 20:08:14 UTC
I've

x11-libs/qt-core-4.5.3-r2  USE="glib iconv qt3support ssl -debug -doc -pch"

installed. Unfortunately reemerging qt-core did not change anything. My suspicion is that this error might be cmake related, as qmake *is* installed on my system:

"
# which qmake
/usr/bin/qmake
"

I'm using dev-util/cmake-2.6.4-r3  USE="vim-syntax -emacs -qt4". Maybe I should try enabling the qt4 USE flag here...




Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2009-12-11 02:58:09 UTC
(In reply to comment #4)
> 
> I'm using dev-util/cmake-2.6.4-r3  USE="vim-syntax -emacs -qt4". Maybe I should
> try enabling the qt4 USE flag here...
> 

Yeah, please give this a try! If this is indeed the case I can force
the qt4 useflag for cxx in the vtk ebuild.

Best,
Markus
Comment 6 François Bissey 2009-12-18 03:19:06 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > 
> > I'm using dev-util/cmake-2.6.4-r3  USE="vim-syntax -emacs -qt4". Maybe I should
> > try enabling the qt4 USE flag here...
> > 
> 
> Yeah, please give this a try! If this is indeed the case I can force
> the qt4 useflag for cxx in the vtk ebuild.
> 
But the qt4 flag for cmake is only to give you a friendly gui, or 
am I wrong there?

I have just had a check at 
/usr/share/cmake/Modules/FindQt4.cmake on line 1625 and the calling line
in Examples/Infovis/Cxx/ChartView/CMakeLists.txt.
This isn't pretty...
From Examples/Infovis/Cxx/ChartView/CMakeLists.txt:
SET(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
SET(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
SET(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
SET(DESIRED_QT_VERSION ${VTK_DESIRED_QT_VERSION} CACHE FILEPATH "")
FIND_PACKAGE(Qt4 REQUIRED)
Because you didn't build vtk with qt4 VTK_DESIRED_QT_VERSION is probably
not set - DESIRED_QT_VERSION is then set to nothing which makes 
the FIND_PACKAGE  test fail as it cannot find this exact version.
I am not sure how to deal with this. Either we can skip building that
example with -qt4 or patch to set DESIRED_QT_VERSION to the system value.

Comment 7 Markus Dittrich (RETIRED) gentoo-dev 2009-12-18 04:43:55 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > 
> > > I'm using dev-util/cmake-2.6.4-r3  USE="vim-syntax -emacs -qt4". Maybe I should
> > > try enabling the qt4 USE flag here...
> > > 
> > 
> > Yeah, please give this a try! If this is indeed the case I can force
> > the qt4 useflag for cxx in the vtk ebuild.
> > 
> But the qt4 flag for cmake is only to give you a friendly gui, or 
> am I wrong there?

That's correct. We should rename the qt4 useflag to "gui".


> Because you didn't build vtk with qt4 VTK_DESIRED_QT_VERSION is probably
> not set - DESIRED_QT_VERSION is then set to nothing which makes 
> the FIND_PACKAGE  test fail as it cannot find this exact version.
> I am not sure how to deal with this. Either we can skip building that
> example with -qt4 or patch to set DESIRED_QT_VERSION to the system value.
> 

Sorry, I am not sure if I follow your argument here.

Markus

Comment 8 François Bissey 2009-12-18 06:23:33 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > (In reply to comment #4)
> > > > 
> > > > I'm using dev-util/cmake-2.6.4-r3  USE="vim-syntax -emacs -qt4". Maybe I should
> > > > try enabling the qt4 USE flag here...
> > > > 
> > > 
> > > Yeah, please give this a try! If this is indeed the case I can force
> > > the qt4 useflag for cxx in the vtk ebuild.
> > > 
> > But the qt4 flag for cmake is only to give you a friendly gui, or 
> > am I wrong there?
> 
> That's correct. We should rename the qt4 useflag to "gui".
> 
The original poster was refering to building cmake with qt4 which gives
you gui indeed, for cmake. For vtk it gives access to qt4 bindings and widgets.

> 
> > Because you didn't build vtk with qt4 VTK_DESIRED_QT_VERSION is probably
> > not set - DESIRED_QT_VERSION is then set to nothing which makes 
> > the FIND_PACKAGE  test fail as it cannot find this exact version.
> > I am not sure how to deal with this. Either we can skip building that
> > example with -qt4 or patch to set DESIRED_QT_VERSION to the system value.
> > 
> 
> Sorry, I am not sure if I follow your argument here.

I think the example is trying to compile a vtk program using the qt4 bindings
so it not only needs qt4 it needs vtk to have been built with the qt4 use flag.
When I wrote the previous bit I was only thinking on how to get further.

vtk has been compiled without qt4 therefore VTK_DESIRED_QT_VERSION has 
never been set since it refers to the version of qt vtk has been compiled
against. FIND_PACKAGE(Qt4 REQUIRED) search for a version of qt that matches
DESIRED_QT_VERSION which is set before the call to FIND_PACKAGE.
DESIRED_QT_VERSION is set with the content of VTK_DESIRED_QT_VERSION,
in this case undefined, therefore cmake breaks.

I think if vtk is compiled with -qt4 this example and any other relying
on qt4 probably should be skipped.

Francois
Comment 9 Markus Dittrich (RETIRED) gentoo-dev 2009-12-18 13:40:48 UTC
(In reply to comment #8)
> > That's correct. We should rename the qt4 useflag to "gui".
> > 
> The original poster was refering to building cmake with qt4 which gives
> you gui indeed, for cmake. For vtk it gives access to qt4 bindings and widgets.

Sorry I was kind of tired last night. When stating that we should replace
"qt4" with "gui" I was thinking of paraview. For vtk, qt4 is fine since it
simply enables the proper bindings.

 
> > 
> > > Because you didn't build vtk with qt4 VTK_DESIRED_QT_VERSION is probably
> > > not set - DESIRED_QT_VERSION is then set to nothing which makes 
> > > the FIND_PACKAGE  test fail as it cannot find this exact version.
> > > I am not sure how to deal with this. Either we can skip building that
> > > example with -qt4 or patch to set DESIRED_QT_VERSION to the system value.
> > > 
> > 
> > Sorry, I am not sure if I follow your argument here.
> 
> I think the example is trying to compile a vtk program using the qt4 bindings
> so it not only needs qt4 it needs vtk to have been built with the qt4 use flag.
> When I wrote the previous bit I was only thinking on how to get further.
> 
> vtk has been compiled without qt4 therefore VTK_DESIRED_QT_VERSION has 
> never been set since it refers to the version of qt vtk has been compiled
> against. FIND_PACKAGE(Qt4 REQUIRED) search for a version of qt that matches
> DESIRED_QT_VERSION which is set before the call to FIND_PACKAGE.
> DESIRED_QT_VERSION is set with the content of VTK_DESIRED_QT_VERSION,
> in this case undefined, therefore cmake breaks.
> 
> I think if vtk is compiled with -qt4 this example and any other relying
> on qt4 probably should be skipped.
> 

Thanks for the clarification - I'll have a look at this over the weekend.

Markus
Comment 10 François Bissey 2009-12-19 00:07:09 UTC
After a little bit of research that example and a few other 
should not be built at all!
The cmake file in the parent directory reads:
IF(VTK_USE_QVTK)
  SUBDIRS(ChartView)
  SUBDIRS(EasyView)
  SUBDIRS(StatsView)
ENDIF(VTK_USE_QVTK)
so we should not go there at all. In the current ebuild 
VTK_USE_QVTK is defined to ON only if qt3 or qt4 is selected,
so I guess that the test assume that undefined is the same as
true/on. 
I think setting it to OFF/False with -qt3 -qt4 should solve the problem.
I believe that port to the cmake-utils doesn't in its current state solve
this problem but it can easily made to. I will amend it later today.
Comment 11 Markus Dittrich (RETIRED) gentoo-dev 2009-12-19 18:19:53 UTC
This should be fixed in 5.4.2-r1.

The problem here was the combination "-qt4 qt3 examples"
since some of the examples can only be build with qt4,
qt3 won't do but will still trigger VTK's full qt build
process.

This could have been fixed by compiling these qt4-only
examples conditionally. In -r1 I've instead completely
disabled compilation of the examples and simply install
the source files which had been my intention from the
beginning anyways. 

cheers,
Markus