Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447928 - dev-libs/ppl-0.12.1 - In file included from checked.defs.hh:30:0, from checked.cc:25: mp_std_bits.defs.hh:47:7: error: redefinition of ‘class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >’
Summary: dev-libs/ppl-0.12.1 - In file included from checked.defs.hh:30:0, ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 447972 448358 448782 459874 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-20 09:53 UTC by Kim Seongcheol
Modified: 2016-05-21 12:34 UTC (History)
20 users (show)

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


Attachments
build.log.gz (build.log.gz,6.38 KB, application/x-gzip)
2012-12-20 09:53 UTC, Kim Seongcheol
Details
environment.gz (environment.gz,18.78 KB, application/x-gzip)
2012-12-20 09:55 UTC, Kim Seongcheol
Details
diff file (fix.diff,5.58 KB, text/plain)
2012-12-22 13:07 UTC, Kim Seongcheol
Details
patch for being able to compile with =gmp-5.1.0 and <=gmp-5.0.5 (gmp.patch,1.73 KB, patch)
2012-12-26 12:15 UTC, Andreas Fink
Details | Diff
patched ebuild (ppl_ebuild.patch,335 bytes, patch)
2012-12-26 12:15 UTC, Andreas Fink
Details | Diff
Fixed patch. (ppl.patch,1.56 KB, patch)
2012-12-29 04:54 UTC, Dmitry Suloev
Details | Diff
Upstream based patch (ppl-gmp-5.1.0.patch,1.37 KB, patch)
2012-12-30 14:34 UTC, Johannes Janssen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Seongcheol 2012-12-20 09:53:47 UTC
Created attachment 332774 [details]
build.log.gz

mp_std_bits.defs.hh:47:7: error: redefinition of ‘class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >’
/usr/include/gmpxx.h:3269:21: error: previous definition of ‘class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >’
mp_std_bits.defs.hh:108:7: error: redefinition of ‘class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’
/usr/include/gmpxx.h:3306:21: error: previous definition of ‘class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’
make[3]: *** [checked.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from checked.defs.hh:30:0,
                 from Checked_Number.defs.hh:28,
                 from Coefficient.types.hh:16,
                 from Coefficient.defs.hh:27,
                 from Box.defs.hh:29,
                 from Box.cc:25:
mp_std_bits.defs.hh:47:7: error: redefinition of ‘class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >’
/usr/include/gmpxx.h:3269:21: error: previous definition of ‘class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >’
mp_std_bits.defs.hh:108:7: error: redefinition of ‘class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’
/usr/include/gmpxx.h:3306:21: error: previous definition of ‘class std::numeric_limits<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’
make[3]: *** [Box.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-libs/ppl-0.12.1/work/ppl-0.12.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-libs/ppl-0.12.1/work/ppl-0.12.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/ppl-0.12.1/work/ppl-0.12.1'
make: *** [all] Error 2
emake failed




# emerge --info
Portage 2.1.11.38 (default/linux/x86/10.0/desktop/gnome, gcc-4.6.3, glibc-2.16.0, 3.7.1 i686)
=================================================================
System uname: Linux-3.7.1-i686-Intel-R-_Pentium-R-_M_processor_1.73GHz-with-gentoo-2.2
Timestamp of tree: Thu, 20 Dec 2012 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p39-r1
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.10.2
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="     http://ftp.daum.net/gentoo "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg flac fortran gdbm gif glitz gnome gnome-keyring gnome-online-accounts gnutls gpm graphicsmagick gstreamer gtk gtk3 iconv imagemagick ipv6 ithreads java java5 java6 jpeg jpeg2k laptop lcms ldap libnotify mad mmx mmxext mng modules mono mozdevelop mp3 mp4 mpeg mudflap nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd pulseaudio python python3 qt4 readline ruby samba sdl session socialweb spell sse sse2 ssl startup-notification svg system-sqlite tcpd theora threads thunar tiff truetype udev udisks unicode upower usb vorbis vpx wxwidgets x264 x86 xcb xcomposite xml xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="fuji" 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" GRUB_PLATFORMS="pc multiboot" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ko" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon fbdev vesa modesetting" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Kim Seongcheol 2012-12-20 09:55:36 UTC
Created attachment 332776 [details]
environment.gz
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-20 17:51:23 UTC
*** Bug 447972 has been marked as a duplicate of this bug. ***
Comment 3 Kim Seongcheol 2012-12-22 13:07:23 UTC
Created attachment 333034 [details]
diff file

I'm not a programmer. So I'm not sure if this is a right way to fix the problem. But it works.
Comment 4 Vadim Dyadkin 2012-12-22 14:07:23 UTC
(In reply to comment #3)
> I'm not a programmer. So I'm not sure if this is a right way to fix the
> problem. But it works.

The patch really helps. Thank you.
Comment 5 molubivi 2012-12-23 08:39:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I'm not a programmer. So I'm not sure if this is a right way to fix the
> > problem. But it works.
> 
> The patch really helps. Thank you.

Hi everybody!

I'm trying to apply the diff file but I can't...I think I'm using the wrong way to do it.

Can someone give me the syntax please?

Thank's ;)
Comment 6 molubivi 2012-12-23 17:43:16 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > I'm not a programmer. So I'm not sure if this is a right way to fix the
> > > problem. But it works.
> > 
> > The patch really helps. Thank you.
> 
> Hi everybody!
> 
> I'm trying to apply the diff file but I can't...I think I'm using the wrong
> way to do it.
> 
> Can someone give me the syntax please?
> 
> Thank's ;)

Done thank's ;)
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-24 03:32:22 UTC
*** Bug 448358 has been marked as a duplicate of this bug. ***
Comment 8 Lukas Elsner 2012-12-25 00:32:39 UTC
my laptop compiled this package without any error, but one of my virtualizes servers confirms exactly the described problem.

i really dont know what could be the difference.
Comment 9 Pelle 2012-12-25 16:54:20 UTC
I can confirm that I also suffer from this bug.
Comment 10 ghartshaw 2012-12-26 00:34:37 UTC
I confirm that the patch works.
Comment 11 Andreas Fink 2012-12-26 12:15:12 UTC
Created attachment 333382 [details, diff]
patch for being able to compile with =gmp-5.1.0 and <=gmp-5.0.5
Comment 12 Andreas Fink 2012-12-26 12:15:43 UTC
Created attachment 333384 [details, diff]
patched ebuild
Comment 13 Andreas Fink 2012-12-26 12:17:31 UTC
The problem apparently is with gmp-5.0.5 which does not define numeric_limits<mpz_class> and numeric_limits<mpq_class> where gmp-5.1.0 does define these symbols.
My two patches (source code patch, and ebuild patch) solve the problem for me...
Comment 14 pavel 2012-12-26 18:25:06 UTC
I confirm that the patch works.
Comment 15 Martijn Schmidt 2012-12-27 06:26:59 UTC
Andreas' patch works flawlessly, and seems like it's the least intrusive solution. Cheers!
Comment 16 C. Wijtmans 2012-12-27 08:07:39 UTC
Masked gmp-5.1.0 should work.
Comment 17 Patrick 2012-12-27 13:50:05 UTC
(In reply to comment #16)
> Masked gmp-5.1.0 should work.

I have dev-libs/gmp-5.1.0 installed, but run into this error as well.
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-27 13:59:50 UTC
*** Bug 448782 has been marked as a duplicate of this bug. ***
Comment 19 Karel De Vriendt 2012-12-28 07:54:25 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Masked gmp-5.1.0 should work.
> 
> I have dev-libs/gmp-5.1.0 installed, but run into this error as well.

Same here
Comment 20 Dmitry Suloev 2012-12-29 04:54:15 UTC
Created attachment 333652 [details, diff]
Fixed patch.
Comment 21 Radoslaw Stachowiak (RETIRED) gentoo-dev 2012-12-29 23:16:29 UTC
Confirm, fixed patch helps.
Comment 22 Johannes Janssen 2012-12-30 14:34:15 UTC
Created attachment 333770 [details, diff]
Upstream based patch

The same bug was fixed upstream for ppl 1.1/git (see http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=9f843aecc23981aec6ed1eaa8be06e6786a47f0d). The patch provided there is slightly different, as it removes all occurrences of std::numeric_limits.
The patch appended is based on the upstream patch (filename changes) and works with ppl-0.12.1, ppl-0.12, ppl-0.11.2-r1 (on funtoo though).

Kind regards
Johannes
Comment 23 Martin von Gagern 2013-01-02 16:15:52 UTC
This issue affects not only the build-time behaviour of ppl, but also builds of other applications which use ppl. Sage in my case. So in the long run, there should be a revbump including a proper fix (comment #22 looks good to me), and a block between old (i.e. pre-revbump) ppl and recent (i.e. >=5.1) gmp, so that when gmp 5.1 gets stabilized, users of the stable branch won't encounter any weird issues.
Comment 24 C. Wijtmans 2013-01-02 18:36:25 UTC
(In reply to comment #19)
> (In reply to comment #17)
> > (In reply to comment #16)
> > > Masked gmp-5.1.0 should work.
> > 
> > I have dev-libs/gmp-5.1.0 installed, but run into this error as well.
> 
> Same here

I meant masking dev-libs/gmp-5.1.0 should prevent this error from happening, it is a temporary fix untill the bug is truly fixed.
Comment 25 Jean-Francis Roy 2013-01-08 00:11:15 UTC
Ran into the same issue. I confirm that attachment from comment #22 solved it.
Comment 26 Patrick Lauer gentoo-dev 2013-01-08 05:48:11 UTC
+  08 Jan 2013; Patrick Lauer <patrick@gentoo.org>
+  +files/ppl-fix-gmp-5.1.0.patch, +ppl-0.12.1-r1.ebuild:
+  Adding patch to make things work with gmp-5.1, #447928
+
Comment 27 iGentoo 2013-01-08 09:26:37 UTC
(In reply to comment #26)
> +  08 Jan 2013; Patrick Lauer <patrick@gentoo.org>
> +  +files/ppl-fix-gmp-5.1.0.patch, +ppl-0.12.1-r1.ebuild:
> +  Adding patch to make things work with gmp-5.1, #447928
> +

Typo:
--- ppl-1.0.ebuild
+++ ppl-1.0.ebuild
@@ -30,7 +30,7 @@ pkg_setup() {
 }
 
 src_prepare() {
-	epatch "${FILESDIR}/ppl-fix-gmp-5.1.0.patch" || dir "Failed to patch"
+	epatch "${FILESDIR}/ppl-fix-gmp-5.1.0.patch" || die "Failed to patch"
 }
 
 src_configure() {
Comment 28 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-08 14:00:10 UTC
(In reply to comment #27)
> Typo:
> --- ppl-1.0.ebuild
> +++ ppl-1.0.ebuild
> @@ -30,7 +30,7 @@ pkg_setup() {
>  }
>  
>  src_prepare() {
> -	epatch "${FILESDIR}/ppl-fix-gmp-5.1.0.patch" || dir "Failed to patch"
> +	epatch "${FILESDIR}/ppl-fix-gmp-5.1.0.patch" || die "Failed to patch"
>  }
>  
>  src_configure() {

Fixed. Thanks!
Comment 29 Ryan Hill (RETIRED) gentoo-dev 2013-03-03 22:20:16 UTC
*** Bug 459874 has been marked as a duplicate of this bug. ***