Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 592446

Summary: media-tv/kodi-16.0: building w/gcc-6: error: macro "min" passed 3 arguments, but takes just 2
Product: Gentoo Linux Reporter: Francesco Turco <fturco>
Component: Current packagesAssignee: SpanKY <vapier>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, klaus818, media-video
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: build log for kodi-16.0 using gcc-6.2.0
emerge --info
Dirty fix to kodi sources.
Rename max/maximum min/minimum to avoid conflicts with gcc

Description Francesco Turco 2016-08-30 15:55:53 UTC
Created attachment 444450 [details]
build log for kodi-16.0 using gcc-6.2.0

After upgrading gcc to version 6.2.0 I cannot build media-tv/kodi-16.0 anymore.

Error snippet:

> In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/deque:60:0,
>                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/queue:60,
>                 from ximadsp.cpp:3480:
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
>     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
>                                                        ^
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
>     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
>                                                        ^

I can build kodi without any problems with gcc-5.4.0.

--------------------

# emerge -pv kodi

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-tv/kodi-16.0::gentoo  USE="X alsa css dbus opengl pulseaudio samba texturepacker udisks upower usb -airplay -avahi -bluetooth -bluray -caps -cec -debug -gles -java -joystick -midi -mysql -nfs -profile -rtmp -sftp {-test} -upnp -vaapi -vdpau -webserver" PYTHON_TARGETS="python2_7" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Francesco Turco 2016-08-30 15:56:15 UTC
Created attachment 444452 [details]
emerge --info
Comment 2 Peter Levine 2016-09-21 18:45:36 UTC
cximage was removed from master branch upstream.

Nonetheless, there is a pull request:
https://github.com/xbmc/xbmc/pull/9703
Comment 3 Coacher 2016-10-31 00:11:02 UTC
*** Bug 598456 has been marked as a duplicate of this bug. ***
Comment 4 Francesco Turco 2016-11-20 17:52:44 UTC
I can reproduce the same error with media-tv/kodi-16.1
Comment 5 Luigi 'Comio' Mantellini 2016-12-01 15:06:58 UTC
Created attachment 454826 [details, diff]
Dirty fix to kodi sources.

Find the attached patch (tested with kodi 16.1).

ciao

luigi
Comment 6 Luigi 'Comio' Mantellini 2016-12-02 08:01:19 UTC
Created attachment 454888 [details, diff]
Rename max/maximum min/minimum to avoid conflicts with gcc

New patch.
Comment 7 Toralf Förster gentoo-dev 2016-12-11 09:43:45 UTC
same here
amd64-13.0-systemd-unstable_20161203-103941//tmp/issues/20161211-104149_media-tv_kodi-16.1
Comment 8 Craig Andrews gentoo-dev 2017-01-16 22:24:12 UTC
included in https://github.com/gentoo/gentoo/pull/3513

Thank you for this bug report and the patch fixing the issue!