Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29716 - Nethack 3.4.2 and QT 3.2.1 (KDE 3.1.4) build fails
Summary: Nethack 3.4.2 and QT 3.2.1 (KDE 3.1.4) build fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-26 19:05 UTC by Paul Taylor
Modified: 2003-10-03 12:30 UTC (History)
1 user (show)

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


Attachments
proposed nethack-qt-3.1.4 patch (nethack-3.4.2-qt-3.1.4.patch,375 bytes, patch)
2003-09-29 07:30 UTC, Brandy Westcott (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Taylor 2003-09-26 19:05:27 UTC
"emerge nethack" fails while building qt_win.cpp:

g++ -mcpu=athlon-xp -O3 -pipe -I../include -I../include -I../include -I.
-I/usr/qt/3/include -c ../win/Qt/qt_win.cpp
In file included from ../include/qt_win.h:33,
                 from ../win/Qt/qt_win.cpp:78:
/usr/qt/3/include/qlistview.h:550: error: parse error before `(' token
/usr/qt/3/include/qlistview.h:563: error: missing ';' before right brace
/usr/qt/3/include/qlistview.h:565: error: parse error before `)' token
/usr/qt/3/include/qlistview.h:566: error: parse error before `*' token
/usr/qt/3/include/qlistview.h:567: error: parse error before `*' token
/usr/qt/3/include/qlistview.h:569: error: parse error before `const'
/usr/qt/3/include/qlistview.h:570: error: parse error before `*' token
/usr/qt/3/include/qlistview.h:571: error: parse error before `*' token
/usr/qt/3/include/qlistview.h:573: error: `QListViewItemIterator&
   operator=(const QListViewItemIterator&)' must be a nonstatic member function
/usr/qt/3/include/qlistview.h:573: error: `QListViewItemIterator&
   operator=(const QListViewItemIterator&)' must take exactly two arguments
/usr/qt/3/include/qlistview.h:575: error: destructors must be member functions
/usr/qt/3/include/qlistview.h:577: error: syntax error before `&' token
/usr/qt/3/include/qlistview.h:578: error: syntax error before `operator'
/usr/qt/3/include/qlistview.h:579: error: syntax error before `&' token
/usr/qt/3/include/qlistview.h:581: error: syntax error before `&' token
/usr/qt/3/include/qlistview.h:582: error: syntax error before `operator'
/usr/qt/3/include/qlistview.h:583: error: syntax error before `&' token
/usr/qt/3/include/qlistview.h:585: error: `QListViewItem* operator*()' must
   have an argument of class or enumerated type
/usr/qt/3/include/qlistview.h:585: error: `QListViewItem* operator*()' must
   take either one or two arguments
/usr/qt/3/include/qlistview.h:586: error: non-member function `QListViewItem*
   current()' cannot have `const' method qualifier
/usr/qt/3/include/qlistview.h:588: error: parse error before `protected'
/usr/qt/3/include/qlistview.h:592: error: parse error before `private'
/usr/qt/3/include/qlistview.h:597: error: non-member function `bool
   matchesFlags(const QListViewItem*)' cannot have `const' method qualifier
/usr/qt/3/include/qlistview.h:598: error: non-member function `bool
   testPair(QListViewItemIterator::IteratorFlag,
   QListViewItemIterator::IteratorFlag, bool)' cannot have `const' method
   qualifier
/usr/qt/3/include/qlistview.h:599: error: non-member function `bool
   isChecked(const QListViewItem*)' cannot have `const' method qualifier
/usr/qt/3/include/qlistview.h:600: error: parse error before `}' token
make: *** [qt_win.o] Error 1


Reproducible: Always
Steps to Reproduce:
1. emerge nethack

Actual Results:  
See details.

Expected Results:  
Working nethack binary, for hours of frustrating game play.  :-)

Portage 2.0.49-r7 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.6.0-test5-bk11)
=================================================================
System uname: 2.6.0-test5-bk11 i686 AMD Athlon(tm) XP 1800+
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mad
mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv
zlib gdbm berkdb slang readline arts svga java sdl gpm tcpd pam ssl perl python
esd imlib oggvorbis qt motif opengl mozilla cdr X gtk kde -gnome -alsa"
Comment 1 Brandy Westcott (RETIRED) gentoo-dev 2003-09-29 07:12:57 UTC
This error is caused by nethack defining a macro called Invisible.
From include/yourprop.h:

    #define Invisible		(Invis && !See_invisible)

But the qlistview.h header file has a variable called Invisible:

    enum IteratorFlag {
	Visible = 		0x00000001,
	Invisible = 		0x00000002,
	Selected =		0x00000004,
	.....

The pre-processor replaces all occurences of this variable with
(Invis && !See_invisible) which causes the compile to fail.

If the Invisible macro is undefined before qlistview.h is included
then nethack compiles ok.
Comment 2 Brandy Westcott (RETIRED) gentoo-dev 2003-09-29 07:30:24 UTC
Created attachment 18479 [details, diff]
proposed nethack-qt-3.1.4 patch

This patch will allow nethack-3.4.2 to compile using qt-3.1.4
It won't break compatibility with earlier versions of qt.

(It may be worthwhile incorporating this with the current
 qt-support patch)
Comment 3 Paul Taylor 2003-10-02 14:55:00 UTC
The proposed nethack-qt-3.1.4 patch works for me.
Comment 4 SpanKY gentoo-dev 2003-10-03 12:30:36 UTC
thats weird, i'm using x11-libs/qt-3.2.1-r2 and nethack has always emerged
just fine & dandy ...
but since the patch doesnt make a difference on my side and you guys say
it works for you ive added it cvs

thx brandy