Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622338 - media-gfx/slic3r-1.2.9-r2: fails to build with gcc-6.3.0
Summary: media-gfx/slic3r-1.2.9-r2: fails to build with gcc-6.3.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: 3D Printing Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2017-06-20 17:48 UTC by Mateusz Lenik
Modified: 2019-10-11 05:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Lenik 2017-06-20 17:48:45 UTC
Build fails with the following errors:

In file included from src/libslic3r/PrintConfig.hpp:4:0,
                 from src/libslic3r/Extruder.hpp:6,
                 from src/libslic3r/ExtrusionEntity.cpp:5:
src/libslic3r/Config.hpp: In member function ‘virtual bool Slic3r::ConfigOptionFloat::deserialize(std::__cxx11::string)’:
src/libslic3r/Config.hpp:68:29: error: cannot convert ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ to ‘bool’ in return
         return iss >> this->value;
                             ^~~~~
src/libslic3r/Config.hpp: In member function ‘virtual bool Slic3r::ConfigOptionInt::deserialize(std::__cxx11::string)’:
src/libslic3r/Config.hpp:127:29: error: cannot convert ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ to ‘bool’ in return
         return iss >> this->value;
                             ^~~~~
src/libslic3r/Config.hpp: In member function ‘virtual bool Slic3r::ConfigOptionPercent::deserialize(std::__cxx11::string)’:
src/libslic3r/Config.hpp:252:29: error: cannot convert ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ to ‘bool’ in return
         return iss >> this->value;
                             ^~~~~
src/libslic3r/Config.hpp: In member function ‘virtual bool Slic3r::ConfigOptionFloatOrPercent::deserialize(std::__cxx11::string)’:
src/libslic3r/Config.hpp:282:29: error: cannot convert ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ to ‘bool’ in return
         return iss >> this->value;
                             ^~~~~
error building src/libslic3r/ExtrusionEntity.o from 'src/libslic3r/ExtrusionEntity.cpp' at /usr/lib64/perl5/5.24.1/ExtUtils/CBuilder/Base.pm line 174.
 * ERROR: media-gfx/slic3r-1.2.9-r2::gentoo failed (compile phase):
 *   Compilation failed
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 2714:  Called perl-module_src_compile
 *   environment, line 2090:  Called die
 * The specific snippet of code:
 *           ./Build build || die "Compilation failed";
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/slic3r-1.2.9-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/slic3r-1.2.9-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/slic3r-1.2.9-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/slic3r-1.2.9-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/slic3r-1.2.9-r2/work/Slic3r-1.2.9/xs'
 * S: '/var/tmp/portage/media-gfx/slic3r-1.2.9-r2/work/Slic3r-1.2.9/xs'

>>> Failed to emerge media-gfx/slic3r-1.2.9-r2

emerge --info:
Portage 2.3.6 (python 3.4.6-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r2, 4.9.33-gentoo x86_64)
=================================================================
System uname: Linux-4.9.33-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2630_v4_@_2.20GHz-with-gentoo-2.4.1
KiB Mem:    65835892 total,  40976596 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Sun, 18 Jun 2017 20:00:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.1) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.27.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27-r1::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

mlen
    location: /var/lib/mlen-overlay
    sync-type: git
    sync-uri: https://github.com/mlen/gentoo-overlay.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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=broadwell -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j42 -l42"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X aac aacplus acl alsa amd64 audit berkdb bluray bzip2 caps cli consolekit cracklib crypt cryptsetup cups cxx dbus dri dri3 dvd faac flac fortran gconf gdbm geoclue geoloc geolocation gif glamor gnome-keyring gtk gtk3 gtkstyle hidpi hotwording iconv icu idn infinality introspection iproute2 ipv6 jpeg kerberos libedit libnotify llvm lvm mmx modules mp3 mpeg multilib ncurses nls nptl numa offensive ogg opengl openmp opus oss pam pch pcre pm-utils png policykit pulseaudio python qt5 readline samba sdl sdl2 seccomp session sound sse sse2 ssl startup-notification tcpd theora tiff truetype udev udisks unicode unwind vdpau vim vim-syntax virt-network vorbis vpx webp widgets x264 xattr xft xinerama zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm xtensa xtensaeb" QEMU_USER_TARGETS="x86_64 i386 arm" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mateusz Lenik 2017-06-20 17:59:14 UTC
Looks like this is because the default mode for C++ in GCC 6 is -std=gnu++14 instead of -std=gnu++98.
Comment 2 Wes 2017-08-14 04:50:22 UTC
Managed to get it to build locally by putting

append-cxxflags -std=gnu++98
append-cppflags -std=gnu++98
append-cflags -std=gnu++98

in to src_configure and src_compile.  I know this might be superfluous but it was a brute force test with a hammer.  cxxflags alone didn't work.
Comment 3 Henrik Johansson 2017-09-27 07:42:11 UTC
(In reply to Wes from comment #2)
> Managed to get it to build locally by putting
> 
> append-cxxflags -std=gnu++98
> append-cppflags -std=gnu++98
> append-cflags -std=gnu++98
> 
> in to src_configure and src_compile.  I know this might be superfluous but
> it was a brute force test with a hammer.  cxxflags alone didn't work.

Wes, exactly what does src_compile and src_configure look like after adding this? I seem to have the same problem using gcc-6.4.0 and would like to just get slic3r up and running even if it involves a solution like yours.
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2017-09-27 15:47:44 UTC
I ported the code to be c++11 and newer compatible.  Please test.  Note also that 1.1.7 seems fine as-is.

commit 774e1f608b1a4497ff097fac97d38b3722ee4e29 (HEAD -> master)
Author: Ian Stakenvicius <axs@gentoo.org>
Date:   Wed Sep 27 11:46:18 2017 -0400

    media-gfx/slic3r: make v1.2.9 code c++11 compatible for gcc6+
    
    Bug: http://bugs.gentoo.org/622338
Comment 5 Larry the Git Cow gentoo-dev 2017-09-27 15:48:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=583527c74d677920d06fdcbbd91931e090eed384

commit 583527c74d677920d06fdcbbd91931e090eed384
Author:     Ian Stakenvicius <axs@gentoo.org>
AuthorDate: 2017-09-27 15:46:18 +0000
Commit:     Ian Stakenvicius <axs@gentoo.org>
CommitDate: 2017-09-27 15:48:08 +0000

    media-gfx/slic3r: make v1.2.9 code c++11 compatible for gcc6+
    
    Bug: http://bugs.gentoo.org/622338
    
    Package-Manager: Portage-2.3.8, Repoman-2.3.1

 media-gfx/slic3r/files/slic3r-1.2.9-c++11.patch | 38 +++++++++++++++++++++++++
 media-gfx/slic3r/slic3r-1.2.9-r2.ebuild         |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)}
Comment 6 Jonas Stein gentoo-dev 2018-04-03 16:00:11 UTC
What is the status now? Can we close it?
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2019-10-11 05:34:29 UTC
(In reply to Jonas Stein from comment #6)
> What is the status now? Can we close it?

Assuming yes.