Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661928 - =media-video/vdr-2.2.0-r1 emerge fails with gcc-7.3.0
Summary: =media-video/vdr-2.2.0-r1 emerge fails with gcc-7.3.0
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo VDR Project
URL: http://www.vdr-wiki.de/
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-07-23 23:03 UTC by Mark Dominik Bürkle
Modified: 2018-08-29 10:46 UTC (History)
1 user (show)

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


Attachments
standard build.log (no patches applied) (vdr-2.2.0-r1_build_0.log,12.51 KB, text/x-log)
2018-07-23 23:07 UTC, Mark Dominik Bürkle
Details
build.log (with patched dvbdevice.c) (vdr-2.2.0-r1_build_1.log,27.75 KB, text/x-log)
2018-07-23 23:08 UTC, Mark Dominik Bürkle
Details
/etc/portage/patches/media-video/vdr/vdr-2.2.0-r1_dvbdevice.c.patch (vdr-2.2.0-r1_dvbdevice.c.patch,554 bytes, patch)
2018-07-23 23:09 UTC, Mark Dominik Bürkle
Details | Diff
/etc/portage/patches/media-video/vdr/vdr-2.2.0-r1_remux.c.patch (vdr-2.2.0-r1_remux.c.patch,1.36 KB, patch)
2018-07-23 23:09 UTC, Mark Dominik Bürkle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dominik Bürkle 2018-07-23 23:03:08 UTC
Hi,

emerging vdr-2.2.0-r1 with gcc-7.3.0 gives the following errors:

...
x86_64-pc-linux-gnu-g++ -march=core-avx-i -O2 -pipe -fPIC -c -DCONFDIR=\"/etc/vdr\" -DUSE_PLUGINMISSING -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY -DLIRC_DEVICE=\"/var/run/lirc/
lircd\" -DVIDEODIR=\"/var/vdr/video\" -DCONFDIR=\"/etc/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" -DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" -DPLUGINDIR=\"/usr/lib64/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" -I/usr/include/fre
etype2 -I/usr/include -I/usr/include  -o dvbdevice.o dvbdevice.c
...
dvbdevice.c: In member function ‘bool cDvbTuner::SetFrontend()’:
dvbdevice.c:848:31: error: call of overloaded ‘abs(unsigned int&)’ is ambiguous
      frequency = abs(frequency); // Allow for C-band, where the frequency is less than the LOF
                               ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:75:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from device.h:13,
                 from dvbdevice.h:15,
                 from dvbdevice.c:10:
/usr/include/stdlib.h:722:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:77:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from device.h:13,
                 from dvbdevice.h:15,
                 from dvbdevice.c:10:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:84:3: note: candidate: constexpr __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:102:3: note: candidate: constexpr __float128 std::abs(__float128)
   abs(__float128 __x)
   ^~~
...

Giving gcc-7.3.0 a "hint" about which function to use, like:
  frequency = abs((int) frequency);

will lead to another error with the same scheme:

...
x86_64-pc-linux-gnu-g++ -march=core-avx-i -O2 -pipe -fPIC -c -DCONFDIR=\"/etc/vdr\" -DUSE_PLUGINMISSING -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY -DLIRC_DEVICE=\"/var/run/lirc/
lircd\" -DVIDEODIR=\"/var/vdr/video\" -DCONFDIR=\"/etc/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" -DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" -DPLUGINDIR=\"/usr/lib64/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" -I/usr/include/fre
etype2 -I/usr/include -I/usr/include  -o remux.o remux.c
...
remux.c: In member function ‘int cFrameDetector::Analyze(const uchar*, int)’:
remux.c:1660:47: error: call of overloaded ‘abs(uint32_t)’ is ambiguous
                           if (abs(Delta - 3600) <= 1)
                                               ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:75:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from remux.h:13,
                 from remux.c:10:
/usr/include/stdlib.h:722:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:77:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from remux.h:13,
                 from remux.c:10:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:84:3: note: candidate: constexpr __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:102:3: note: candidate: constexpr __float128 std::abs(__float128)
   abs(__float128 __x)
   ^~~
remux.c:1664:52: error: call of overloaded ‘abs(uint32_t)’ is ambiguous
                           else if (abs(Delta - 1800) <= 1)
                                                    ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:75:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from remux.h:13,
                 from remux.c:10:
/usr/include/stdlib.h:722:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:77:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/stdlib.h:36,
                 from config.h:15,
                 from channels.h:13,
                 from remux.h:13,
                 from remux.c:10:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:84:3: note: candidate: constexpr __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/std_abs.h:102:3: note: candidate: constexpr __float128 std::abs(__float128)
   abs(__float128 __x)
   ^~~
...

and patching this with a little change (see patch NEEDS TO BE REVIEWED) leads to successful compilation.
Comment 1 Mark Dominik Bürkle 2018-07-23 23:04:00 UTC
werkraumpc ~ # emerge --info
Portage 2.3.40 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.26-r7, 4.17.9-gentoo x86_64)
=================================================================
System uname: Linux-4.17.9-gentoo-x86_64-Intel-R-_Core-TM-_i5-4460_CPU_@_3.20GHz-with-gentoo-2.4.1
KiB Mem:     8096864 total,   4852248 free
KiB Swap:   17825788 total,  17636684 free
Timestamp of repository gentoo: Sun, 22 Jul 2018 16:45:01 +0000
Head commit of repository gentoo: 4abcda91d63f5f96012fc6d697c16bb799b2c134
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30-r2::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo, 7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx-i -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d /etc/portage /etc/rsyncd.conf /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/init.d /etc/pam.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core-avx-i -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=8 --with-bdeps=y --keep-going=y --quiet-fail=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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://lapmdb-hpl ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en fr"
MAKEOPTS="--jobs=5 --load-average=10"
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 a52 aac acl acpi alsa amd64 apache2 bash-completion berkdb bluetooth branding browserplugin bzip2 cairo cdda cdr cli colord crypt cups curl cxx dbus dri dts dvb dvd dvdr dvdread eds emboss encode evo exif fam flac gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk2 iconv imap introspection ipv6 jpeg lcms ldap libnotify libsecret libtirpc mad mmap mng modules mozilla mp3 mp4 mpeg multilib nautilus ncurses nls nptl nptl-only ogg oggvorbis openal opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp ssl startup-notification svg systemd tcpd theora tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xml2 xmlrpc xv xvid zlib" ABI_X86="64 32" 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="karbon plan sheets stage words" 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 keyboard mouse" KERNEL="linux" L10N="de en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nouveau intel" 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Mark Dominik Bürkle 2018-07-23 23:07:10 UTC
Created attachment 540694 [details]
standard build.log (no patches applied)
Comment 3 Mark Dominik Bürkle 2018-07-23 23:08:07 UTC
Created attachment 540696 [details]
build.log (with patched dvbdevice.c)
Comment 4 Mark Dominik Bürkle 2018-07-23 23:09:21 UTC
Created attachment 540698 [details, diff]
/etc/portage/patches/media-video/vdr/vdr-2.2.0-r1_dvbdevice.c.patch
Comment 5 Mark Dominik Bürkle 2018-07-23 23:09:53 UTC
Created attachment 540700 [details, diff]
/etc/portage/patches/media-video/vdr/vdr-2.2.0-r1_remux.c.patch
Comment 6 Mark Dominik Bürkle 2018-07-23 23:12:04 UTC
Patch remux.c.patch (https://bugs.gentoo.org/attachment.cgi?id=540700) NEEDS REVIEW. I didn't write C code for a long time, so I'm not entirely sure that this is right coding. Compiles fine, though. :-)
Comment 7 Joerg Bornkessel (RETIRED) gentoo-dev 2018-08-12 19:00:54 UTC
mark,

what about the media-video/vdr-2.2.0-r3 Version?
gcc-7 compile should be fixed there.

https://bugs.gentoo.org/show_bug.cgi?id=638348

it is not possible to edit the stable marked version or apply some patches,
so please test always with the latest version.
Comment 8 Joerg Bornkessel (RETIRED) gentoo-dev 2018-08-29 10:46:35 UTC
gcc-7 issues are all fixed now in 

media-video/vdr-2.2.0_r3

please upgrade to the latest version