Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918113 - media-video/mplayer-1.5_p20230618 - libmpcodecs/mp_image.c: error: INT_MAX undeclared (first use in this function)
Summary: media-video/mplayer-1.5_p20230618 - libmpcodecs/mp_image.c: error: INT_MAX un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-11-24 10:19 UTC by Toralf Förster
Modified: 2023-12-06 09:18 UTC (History)
6 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.87 KB, text/plain)
2023-11-24 10:19 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,27.76 KB, text/plain)
2023-11-24 10:19 UTC, Toralf Förster
Details
environment (environment,92.53 KB, text/plain)
2023-11-24 10:19 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,11.49 KB, application/x-xz)
2023-11-24 10:19 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,9.71 KB, application/x-xz)
2023-11-24 10:19 UTC, Toralf Förster
Details
media-video:mplayer-1.5_p20230618:20231124-044610.log (media-video:mplayer-1.5_p20230618:20231124-044610.log,95.60 KB, text/plain)
2023-11-24 10:19 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,87.80 KB, text/plain)
2023-11-24 10:19 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,30.66 KB, application/x-xz)
2023-11-24 10:19 UTC, Toralf Förster
Details
Fixes INT_MAX undeclared bug (fix_intmax.patch,394 bytes, patch)
2023-11-28 02:38 UTC, Robert Schultz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-11-24 10:19:25 UTC
too long lines were shrinked:

      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

x86_64-pc-linux-gnu-gcc -MMD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O3 -pipe -march=native -fno-diagnostics-color -fno-tree-vec
x86_64-pc-linux-gnu-gcc -MMD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O3 -pipe -march=native -fno-diagnostics-color -fno-tree-vec
x86_64-pc-linux-gnu-gcc -MMD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O3 -pipe -march=native -fno-diagnostics-color -fno-tree-vec
libmpcodecs/mp_image.c: In function 'mp_image_alloc_planes':
libmpcodecs/mp_image.c:39:39: error: 'INT_MAX' undeclared (first use in this function)
   39 |   if ((unsigned int)mpi->height + 2 > INT_MAX ||
      |                                       ^~~~~~~

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-20231123-152703

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
/usr/lib/llvm/17
17.0.5
Python 3.11.6
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):

  HEAD of ::gentoo
commit fb883c10def2e7a72c7210e39a7d445ee1fcdf72
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Nov 24 00:16:58 2023 +0000

    2023-11-24 00:16:57 UTC

emerge -qpvO media-video/mplayer
[ebuild  N    ] media-video/mplayer-1.5_p20230618  USE="X a52 alsa cdio dts dvd dvdnav enca encode iconv ipv6 jpeg libass mng mp3 network opengl osdmenu png pulseaudio sdl shm truetype unicode vcd vorbis x264 xscreensaver xv xvid -aalib (-aqua) -bidi -bl -bluray -bs2b -cddb -cdparanoia -cpudetection -debug -dga -doc -dv -dvb -faac -faad -fbcon -ftp -ggi -gsm -jack -joystick -ladspa -libcaca -libmpeg2 -lirc -live -lzo -mad -md5sum -nas -openal -oss -pnm -pvr -radio -rar -rtc -rtmp -samba (-selinux) -speex -tga -theora -toolame -tremor -twolame -v4l -vdpau (-vidix) -xinerama -yuv4mpeg -zoran" CPU_FLAGS_X86="avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" VIDEO_CARDS="-mga"
Comment 1 Toralf Förster gentoo-dev 2023-11-24 10:19:26 UTC
Created attachment 875478 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-11-24 10:19:27 UTC
Created attachment 875479 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-11-24 10:19:29 UTC
Created attachment 875480 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-11-24 10:19:30 UTC
Created attachment 875481 [details]
etc.portage.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-11-24 10:19:31 UTC
Created attachment 875482 [details]
logs.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-11-24 10:19:32 UTC
Created attachment 875483 [details]
media-video:mplayer-1.5_p20230618:20231124-044610.log
Comment 7 Toralf Förster gentoo-dev 2023-11-24 10:19:33 UTC
Created attachment 875484 [details]
qlist-info.txt
Comment 8 Toralf Förster gentoo-dev 2023-11-24 10:19:35 UTC
Created attachment 875485 [details]
temp.tar.xz
Comment 9 Robert Schultz 2023-11-28 02:38:11 UTC
Created attachment 875857 [details, diff]
Fixes INT_MAX undeclared bug

The attached patch fixes the issue. It just adds an #include <limits.h> to mp_image.c
Dunno if this is the "proper" way to fix it, but it does work.
Comment 10 Leonid Kopylov 2023-11-29 05:24:08 UTC
(In reply to Robert Schultz from comment #9)
> Created attachment 875857 [details, diff] [details, diff]
> Fixes INT_MAX undeclared bug
> 
> The attached patch fixes the issue. It just adds an #include <limits.h> to
> mp_image.c
> Dunno if this is the "proper" way to fix it, but it does work.

yes, can confirm patch works for me
Comment 11 Argh!... Rats!... 2023-12-06 01:55:35 UTC
(In reply to Robert Schultz from comment #9)
> Created attachment 875857 [details, diff] [details, diff]
> Fixes INT_MAX undeclared bug
> 
> The attached patch fixes the issue. It just adds an #include <limits.h> to
> mp_image.c
> Dunno if this is the "proper" way to fix it, but it does work.

Confirm too. Builds successfully
Comment 12 Dale 2023-12-06 04:55:37 UTC
(In reply to Robert Schultz from comment #9)
> Created attachment 875857 [details, diff] [details, diff]
> Fixes INT_MAX undeclared bug
> 
> The attached patch fixes the issue. It just adds an #include <limits.h> to
> mp_image.c
> Dunno if this is the "proper" way to fix it, but it does work.

It worked for me as well.  I might add, this seems to affect both versions of mplayer in the tree.  This needs to be fixed when possible.
Comment 13 Larry the Git Cow gentoo-dev 2023-12-06 08:32:12 UTC
The bug has been referenced in the following commit(s):

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

commit fa1593152d4a210b8ac3327557620746b6ddb152
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-06 08:28:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-06 08:31:40 +0000

    media-video/mplayer: backport gcc-13 fix
    
    The snapshot I just pushed (1.5_p20231206) will fix it for ~arch users, but let's
    backport this for stable.
    
    Bug: https://bugs.gentoo.org/918113
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/mplayer/files/mplayer-1.5_p20230618-gcc13.patch | 11 +++++++++++
 media-video/mplayer/mplayer-1.5_p20230618.ebuild            |  4 ++++
 2 files changed, 15 insertions(+)

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

commit e69018682821d282dcfa0c3161c0ea8359b795c5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-06 08:25:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-06 08:31:39 +0000

    media-video/mplayer: add 1.5_p20231206
    
    Bug: https://bugs.gentoo.org/918113
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/mplayer/Manifest                     |   1 +
 media-video/mplayer/mplayer-1.5_p20231206.ebuild | 641 +++++++++++++++++++++++
 media-video/mplayer/mplayer-9999.ebuild          |  23 +-
 3 files changed, 658 insertions(+), 7 deletions(-)