You are not logged in.
I'm the maintainer of the Mozart PKGBUILD, and I've run into a bit of a problem.
As of GCC 4.3, the package no longer builds because gmp.h is missing a #include, mainly <iostream>.
/usr/include/gmp.h: At global scope:
/usr/include/gmp.h:520: erreur: 'std::FILE' has not been declaredIt's a mindlessly simple fix, and it's talked about here.
--- old 2007-12-09 18:15:42.000000000 +0000
+++ /usr/include/gmp.h 2007-12-09 18:16:06.000000000 +0000
@@ -22,6 +22,7 @@
#if defined (__cplusplus)
#include <iosfwd> /* for std::istream, std::ostream, std::string */
+#include <iostream> /* for std::FILE */
#endifNow my question is what do I do about it? The obvious solution above is fine, but I am no C++ guru and do not know about namespaces & preprocessor stuff. There are a few mentions of it over here but no one is really doing anything about it....
So... It's not technically a bug in GMP as far as I can tell. And GCC isn't really to blame either. I have not heard back from the Mozart-Oz devs, and I don't think permanently adding <iostream> to gmp.h is necessarily the best idea either, (at least from what I can glean from googling).
What do I do? ![]()
Professor: This isn't right...It isn't even wrong...
Offline
Include the patch to fix the pkgbuild, and inform upstream. That's all.
Last edited by brebs (2008-04-12 07:09:40)
Improve your desktop responsiveness and font rendering and ALSA sound and BusyBox init
Offline
Not quite that straightforward. PKGBUILDS can only reference files within $startdir/src or $startdir/pkg - patching files already installed on the system is not permitted. There is no 100%-correct way to do this in an Arch package, so it's a question of coming up with the "least worst" kludge. As it's an AUR package, I would use comments to inform users of the situation, and let them take responsibility for editing the header file.
Offline
Oops, I missed the "/usr/include/"
What's wrong with getting the gmp package bumped to include the patch so it's gcc 4.3 compatible, then adding a dependency in your pkg on the fixed gmp version?
Improve your desktop responsiveness and font rendering and ALSA sound and BusyBox init
Offline
If "getting the gmp package bumped" means notifying upstream and waiting for a new release, that is correct. What I meant above is that there is nothing that beissemj can do in the mozart PKGBUILD that can solve his current build problem.
Offline
"Waiting for a new release" means pestering whoever authored the gmp PKGBUILD to add the one-liner patch to the gmp PKGBUILD, and bumping its $pkgrel.
Last edited by brebs (2008-04-12 09:05:53)
Improve your desktop responsiveness and font rendering and ALSA sound and BusyBox init
Offline
OK, post the bug report and see what the maintainer thinks. I wouldn't recommend pestering, it tends to be ignored.
My personal €0.02 - there is no need for us to patch gmp here. Yes, we have a user who has a problem with an AUR package, and like a good Archer, he has gone out and found an interim solution, until the upstream guys work it out properly. We have no bug reports so far about any core/extra packages failing in the same way - for example, I have just rebuilt openswan against the current gcc and gmp versions with no problem.
Offline
If "getting the gmp package bumped" means notifying upstream and waiting for a new release, that is correct. What I meant above is that there is nothing that beissemj can do in the mozart PKGBUILD that can solve his current build problem.
Alright I was kind of afraid of that. I'll pester the mozart devs some more, because I believe in theory gmp.h is correct; otherwise there would be a lot more problems like this.
Professor: This isn't right...It isn't even wrong...
Offline
You could solve it by patching mozart source to add "#include <iostream>" above the "#include <gmp.h>" in the mozart PKGBUILD.
Offline
Below is a PKGBUILD for gmp that solves the problem, at least for now:
# $Id$
# Maintainer: Thomas Baechler <thomas@archlinux.org>
# Contributor: Gustavo A. Gomez Farhat <gustavo(dot)gomez(dot)farhat(at)gmail(dot)com>
pkgname=gmp
pkgver=4.2.2
pkgrel=2
pkgdesc="A free library for arbitrary precision arithmetic"
arch=(i686 x86_64)
depends=('gcc-libs')
license=('LGPL3')
options=(!libtool)
source=(ftp://ftp.gnu.org/gnu/gmp/gmp-${pkgver}.tar.gz
gcc-4.3-patch.diff)
md5sums=('1def49df60248a08374ecd6cdcaa5d3d' '79b022d34bfa1f67dc0b3f90598a1c5e')
url="http://www.swox.com/gmp/"
build() {
cd ${startdir}/src/${pkgname}-${pkgver}
./configure --prefix=/usr --enable-cxx --build=${CHOST}
cd ${srcdir}
patch -p1 < ${startdir}/gcc-4.3-patch.diff
cd ${startdir}/src/${pkgname}-${pkgver}
make || return 1
make DESTDIR=${startdir}/pkg install
}The gcc-4.3-patch.diff file:
--- src/gmp-4.2.2/gmp.h 2008-07-02 10:56:32.000000000 -0500
+++ gmp.h 2008-07-02 10:37:28.000000000 -0500
@@ -22,6 +22,7 @@
#if defined (__cplusplus)
#include <iosfwd> /* for std::istream, std::ostream, std::string */
+#include <iostream>
#endifI share it because I am a mozart-gecode developer and I am tired of hacking the gmp.h header ![]()
Heeeeeey cat!!!
Offline