Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592446 - media-tv/kodi-16.0: building w/gcc-6: error: macro "min" passed 3 arguments, but takes just 2
Summary: media-tv/kodi-16.0: building w/gcc-6: error: macro "min" passed 3 arguments, ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 598456 (view as bug list)
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2016-08-30 15:55 UTC by Francesco Turco
Modified: 2017-01-19 14:22 UTC (History)
3 users (show)

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


Attachments
build log for kodi-16.0 using gcc-6.2.0 (kodi.log,10.97 KB, text/plain)
2016-08-30 15:55 UTC, Francesco Turco
Details
emerge --info (info.txt,6.15 KB, text/plain)
2016-08-30 15:56 UTC, Francesco Turco
Details
Dirty fix to kodi sources. (0001-Rename-min-max-macros-to-__min-__max-in-order-to-com.patch,24.60 KB, patch)
2016-12-01 15:06 UTC, Luigi 'Comio' Mantellini
Details | Diff
Rename max/maximum min/minimum to avoid conflicts with gcc (kodi-16.1-gcc-6.patch,61.95 KB, patch)
2016-12-02 08:01 UTC, Luigi 'Comio' Mantellini
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!