Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476910 - sys-block/thin-provisioning-tools-0.2.1 - cc1plus: error: unrecognized command line option '-std=c++11'
Summary: sys-block/thin-provisioning-tools-0.2.1 - cc1plus: error: unrecognized comman...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 477440 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-15 11:26 UTC by Martin Dummer
Modified: 2013-10-07 13:16 UTC (History)
6 users (show)

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


Attachments
sys-block:thin-provisioning-tools-0.2.1:20130715-065407.log.gz (sys-block:thin-provisioning-tools-0.2.1:20130715-065407.log.gz,3.42 KB, application/x-gzip)
2013-07-15 11:28 UTC, Martin Dummer
Details
emerge --info (file_476910.txt,9.11 KB, text/plain)
2013-07-15 11:29 UTC, Martin Dummer
Details
add gcc-4.7 dependency and user warning to the ebuil (thin-provisioning-tools-gcc47.diff,648 bytes, patch)
2013-07-18 06:28 UTC, Martin Dummer
Details | Diff
minimally intrusive patch to pass -std=c++0x instead of -std=c++11 in CXXFLAGS (gcc-older-than-4.7.patch,449 bytes, patch)
2013-07-21 02:12 UTC, Ben Longbons
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Dummer 2013-07-15 11:26:08 UTC
When updating thin-provisioning-tools to 0.2.1 the emerge fails with the message "cc1plus: error: unrecognized command line option '-std=c++11'"

Reproducible: Always
Comment 1 Martin Dummer 2013-07-15 11:28:34 UTC
Created attachment 353328 [details]
sys-block:thin-provisioning-tools-0.2.1:20130715-065407.log.gz
Comment 2 Martin Dummer 2013-07-15 11:29:36 UTC
Created attachment 353330 [details]
emerge --info
Comment 3 James 2013-07-16 16:51:57 UTC
Same Problem here.
emerge --info sys-block/thin-provisioning-tools
Portage 2.1.12.13 (default/linux/amd64/13.0/desktop/kde, gcc-4.6.3, glibc-2.17, 3.10.0-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.10.0-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1045T_Processor-with-gentoo-2.2
KiB Mem:     8168648 total,     68416 free
KiB Swap:    8388604 total,   8388476 free
Timestamp of tree: Tue, 16 Jul 2013 12:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r1, 3.2.5-r1, 3.3.2-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo MythTV-0-26-fixes Home
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/mnt/nfs_portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.netnitco.net http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.mirrors.tds.net/gentoo http://www.cyberuse.com/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/mnt/nfs_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="/mnt/nfs_portage"
PORTDIR_OVERLAY="/var/lib/layman/mt-mythtv /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aacs acl acpi alsa amd64 audiofile avahi avi bluetooth bluray branding bzip2 cairo ccache cdda cddb cdio cdr cdrkit cli consolekit cracklib crypt css cups cxx dbus declarative divx4linux dlloader dri dts dv dvb dvd dvdnav dvdr dvdread emboss enca encode exif extras fam ffmpeg firefox flac fontconfig fortran g3dvl gdbm gif gimp glut gpm gtk gzip iconv icu ieee1394 imagemagick java jpeg json kde kerberos kipi kontact ladspa lame lcms ldap libnotify live lm_sensors lv2 mad melt midi mjpeg mmx mmx2 mmxext mng modules mp2 mp3 mp4 mpeg mplayer mpm-worker mtp mudflap multilib musepack mythtv ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp pam pango pcre pda pdf pdflib phonon plasma png policykit posix ppds pulseaudio qt3support qt4 readline scanner sdl semantic-desktop session smp snmp sockets spell srt sse sse2 ssl startup-notification subtitles svg swat szip tcpd theora threads tiff truetype udev udisks unicode upower usb vcd vdpau vim-syntax vorbis webkit wxwidgets x264 xanim xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda_intel usb_audio" 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 author" CAMERAS="ptp2" 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="hp umax" USERLAND="GNU" VIDEO_CARDS="nvidia ati vesa" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-block/thin-provisioning-tools-0.1.5-r1 was built with the following:
USE="(consolekit) (multilib) (policykit)" ABI_X86="64"
Comment 4 Andreas Proteus 2013-07-16 20:47:46 UTC
I switched the compiler to gcc-4.7.3  and the package compiled.
Comment 5 Stephan Kupfer 2013-07-17 08:17:49 UTC
Same problem here:

gcc-4.6.3 compilation failed

gcc-4.7.3 compilation works
Comment 6 Martin Dummer 2013-07-18 06:16:29 UTC
So it seems that sys-block/thin-provisioning-tools-0.2.1 depends on gcc-4.7.x.
But what can be done to give the user of the ebuild a helping hand - 

- add a dependency to the ebuild?
- add a message if the current compiler is not >=gcc-4.7 and die
- do both of the above?
OR
- let the ebuild check for available compilers and select gcc-4.7 if available otherwise die with a message?

GREPing around in the tree lets me find samples for the first two proposed additions, e.g. innoextract-1.4 or nvidia-cuda-sdk-2.02.0807.1535
Comment 7 Martin Dummer 2013-07-18 06:28:10 UTC
Created attachment 353558 [details, diff]
add gcc-4.7 dependency and user warning to the ebuil
Comment 8 Martin Dummer 2013-07-18 06:31:38 UTC
Comment on attachment 353558 [details, diff]
add gcc-4.7 dependency and user warning to the ebuil

>--- thin-provisioning-tools-0.2.1.ebuild.orig	2013-07-18 08:20:43.933688335 +0200
>+++ thin-provisioning-tools-0.2.1.ebuild	2013-07-18 08:24:31.491715688 +0200
>@@ -19,8 +19,17 @@
> RDEPEND="dev-libs/expat
> 		 dev-lang/ruby"
> DEPEND="${RDEPEND}
>+		>=dev-lang/gcc-4.7
> 		dev-libs/boost"
> 
>+pkg_setup() {
>+    if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -lt 7 ]; then
>+		eerror "This package requires <=sys-devel/gcc-4.7 to build sucessfully."
>+		eerror "Please use gcc-config to switch to a compatible GCC version."
>+		die "<=sys-devel/gcc-4.7 required"
>+	fi
>+}
>+
> src_prepare() {
> 	epatch "${FILESDIR}"/${P}-LDFLAGS.patch
> 	eautoreconf
Comment 9 Martin Dummer 2013-07-18 06:38:06 UTC
(In reply to Martin Dummer from comment #7)
> Created attachment 353558 [details, diff] [details, diff]
> add gcc-4.7 dependency and user warning to the ebuil

The attachment has an error, please ignore it. Use only contents of comment #8 please. Sorry for the confusion.
Comment 10 Marijn Schouten (RETIRED) gentoo-dev 2013-07-18 13:26:18 UTC
I can confirm that gcc 4.7.3 needs to be active, otherwise you get "cc1plus: error: unrecognized command line option '-std=c++11'"
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-20 13:24:09 UTC
*** Bug 477440 has been marked as a duplicate of this bug. ***
Comment 12 Ben Longbons 2013-07-21 02:12:00 UTC
Created attachment 353748 [details, diff]
minimally intrusive patch to pass -std=c++0x instead of -std=c++11 in CXXFLAGS

patching it to pass -std=c++0x instead (attached) works; tested with gcc 4.6 only. I have no clue if gcc 4.3, 4.4, or 4.5 supports enough; earlier ones will obviously not (that is upstream's choice by using the newer version of C++).

Also, the ebuild is currently hostile to patches: it does not call epatch_user nor let the implicit call happen.
Comment 13 Patrick Lauer gentoo-dev 2013-08-16 05:48:59 UTC
+  16 Aug 2013; Patrick Lauer <patrick@gentoo.org>
+  thin-provisioning-tools-0.2.1.ebuild:
+  Add gcc version check #476910

This should avoid compile-time failures for now. Better fixes welcome ...
Comment 14 Jean-Francis Roy 2013-08-16 15:01:53 UTC
Proposal of changing compilation from -std=c++11 to -std=c++0x of Comment #12 seems to me a less intrusive way of working this around : this will allow thin-provisioning-tools to be used with stable gcc.
Comment 15 Ben Longbons 2013-08-19 16:22:17 UTC
(In reply to Jean-Francis Roy from comment #14)
> Proposal of changing compilation from -std=c++11 to -std=c++0x of Comment
> #12 seems to me a less intrusive way of working this around : this will
> allow thin-provisioning-tools to be used with stable gcc.

Yes, but you should probably keep a version check; just from knowing what features the different gcc releases support, I doubt that gcc 4.3 will successfully compile this package, even though that's the first gcc version that does accept the -std=c++0x flag.

I'm away from my gentoo system for quite a while, so I can't test whether gcc 4.5 and/or 4.4 work.
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2013-10-07 13:16:26 UTC
Everything looks to be fine in version 0.2.7 which in now in Portage.