Date: Sun, 17 Oct 2004 21:22:10 +0200 From: Danny Pansters <danny@ricin.com> To: Mark Linimon <linimon@freebsd.org> Cc: freebsd-ports-bugs@freebsd.org Subject: Re: ports/72154: [patch] Update x11-toolkits/py-qt to 3.13 and fix unfetchable Message-ID: <200410172122.10881.danny@ricin.com> In-Reply-To: <200410170645.i9H6jSVb028385@freefall.freebsd.org> References: <200410170645.i9H6jSVb028385@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 17 October 2004 08:45, you wrote: > This doesn't build for me on 4.x. Any ideas? > > sipqttableQTable.cpp: In method `enum sipQTable::sipEditMode > sipQTable::sipProtect_editMode()': sipqttableQTable.cpp:4413: static_cast > from `QTable::EditMode' to `sipQTable::sipEditMode' > sipqttableQTable.cpp:4414: warning: control reaches end of non-void > function `sipQTable::sipProtect_editMode()' *** Error code 1 Apparently gcc295 isn't always happy with static_cast. Google pointed me to someone having the same problem, only with the commercial pyqt; see http://mats.imk.fraunhofer.de/pipermail/pykde/2004-October/008785.html Here's the relevant part: > > > PyQt 3.13 > > > SIP 4.1.1 > > > Qt 3.3.3 > > > Python 2.3.3 > > > GCC 2.95.4 (Debian) 3.3.4 (Gentoo) > > > > > > Could this be a problem with the GCC version? > > > > I think it probably is - there is an old Irix compiler that has a similar > > problem. To verify, just convert the static_cast on the offending line to > a > > C-style cast. If so, I'll change the code generator to produce a C-style > > cast. > Yes, it compiles now. I got a similar error in sipqtsqlpart0.cpp, but I'm Because this is generated code, a change could be made either in sip or in a post-configure statement. The latter would be my suggestion, as static_cast appears to be used only in this place where your build fails. IIUC I'd have to use something like "(object_type_to_cast_to) the_object" instead. I can't reproduce this on my 5.x box using gcc295 unfortunately (build fails almost instantly) but I'd like to suggest trying the patch below or something equivalent: --- Makefile.orig Sun Oct 17 17:10:17 2004 +++ Makefile Sun Oct 17 20:42:51 2004 @@ -20,6 +20,7 @@ USE_QT_VER= 3 USE_PYTHON= yes +USE_REINPLACE= yes .include <bsd.port.pre.mk> @@ -34,6 +35,13 @@ -b ${PREFIX}/bin -d ${PYTHONPREFIX_SITELIBDIR} \ -n ${X11BASE}/include -o ${X11BASE}/lib \ -v ${PREFIX}/share/sip) + +post-configure: +.if ${OSVERSION} < 500000 + @${REINPLACE_CMD} -e \ + 's|static_cast<sipQTable::sipEditMode>(QTable::editMode())| (sipQTable::sipEditMode) QTable::editMode()|' \ + ${WRKSRC}/qttable/sipqttableQTable.cpp +.endif post-install: @${PYTHON_CMD} -c "import pyqtconfig" I could pester the author, see if he's willing to make the appropriate changes to sip (no biggie I think), but I'm a bit hesitant because using *_cast seems to be good coding practice from what I've gathered and the problem occurs only with our "EOL" gcc in 4.x. What do you think?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410172122.10881.danny>