Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTBFS with ffmpeg-6.1.1 #7

Closed
umlaeute opened this issue Jan 15, 2024 · 5 comments
Closed

FTBFS with ffmpeg-6.1.1 #7

umlaeute opened this issue Jan 15, 2024 · 5 comments

Comments

@umlaeute
Copy link
Contributor

Trying to build gmerlin-avdecoder against ffmpeg-6.1.1 (as currently packaged in Debian/testing as ffmpeg (7:6.1.1-1)) fails with a number of errors:

# make
Making all in lib
make[1]: Entering directory '/root/src/gmerlin-avdecoder/lib'
Making all in GSM610
make[2]: Entering directory '/root/src/gmerlin-avdecoder/lib/GSM610'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/src/gmerlin-avdecoder/lib/GSM610'
make[2]: Entering directory '/root/src/gmerlin-avdecoder/lib'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -I../include  -DLOCALE_DIR=\"/usr/local/share/locale\" "-I/usr/include" -D__BGAV__  -fvisibility=hidden -march=native -mtune=native -O3 -ffast-math  -I/usr/include/opus            -I/usr/include/x86_64-linux-gnu  -I/usr/include/x86_64-linux-gnu          -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/local/include  -Wall -Wmissing-declarations -Wdeclaration-after-statement -MT demux_ffmpeg.lo -MD -MP -MF .deps/demux_ffmpeg.Tpo -c -o demux_ffmpeg.lo demux_ffmpeg.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -DLOCALE_DIR=\"/usr/local/share/locale\" -I/usr/include -D__BGAV__ -fvisibility=hidden -march=native -mtune=native -O3 -ffast-math -I/usr/include/opus -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Wall -Wmissing-declarations -Wdeclaration-after-statement -MT demux_ffmpeg.lo -MD -MP -MF .deps/demux_ffmpeg.Tpo -c demux_ffmpeg.c  -fPIC -DPIC -o .libs/demux_ffmpeg.o
demux_ffmpeg.c:85:3: error: unknown type name 'ff_const59'
   85 |   ff_const59 AVInputFormat *avif;
      |   ^~~~~~~~~~
demux_ffmpeg.c:85:28: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
   85 |   ff_const59 AVInputFormat *avif;
      |                            ^
demux_ffmpeg.c:175:8: error: unknown type name 'ff_const59'
  175 | static ff_const59 AVInputFormat * get_format(bgav_input_context_t * input)
      |        ^~~~~~~~~~
demux_ffmpeg.c:175:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  175 | static ff_const59 AVInputFormat * get_format(bgav_input_context_t * input)
      |                                 ^
demux_ffmpeg.c: In function 'probe_ffmpeg':
demux_ffmpeg.c:196:11: warning: implicit declaration of function 'get_format' [-Wimplicit-function-declaration]
  196 |   format= get_format(input);
      |           ^~~~~~~~~~
demux_ffmpeg.c:196:9: warning: assignment to 'const AVInputFormat *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  196 |   format= get_format(input);
      |         ^
demux_ffmpeg.c: In function 'open_ffmpeg':
demux_ffmpeg.c:659:7: error: 'ffmpeg_priv_t' has no member named 'pkt'
  659 |   priv->pkt = av_packet_alloc();
      |       ^~
demux_ffmpeg.c:668:7: error: 'ffmpeg_priv_t' has no member named 'buffer'
  668 |   priv->buffer = av_malloc(BUFFER_SIZE);
      |       ^~
demux_ffmpeg.c:669:7: error: 'ffmpeg_priv_t' has no member named 'pb'
  669 |   priv->pb =
      |       ^~
demux_ffmpeg.c:670:28: error: 'ffmpeg_priv_t' has no member named 'buffer'
  670 |     avio_alloc_context(priv->buffer,
      |                            ^~
demux_ffmpeg.c:689:7: error: 'ffmpeg_priv_t' has no member named 'avif'
  689 |   priv->avif = get_format(ctx->input);
      |       ^~
demux_ffmpeg.c:692:18: error: 'ffmpeg_priv_t' has no member named 'pb'
  692 |   avfc->pb = priv->pb;
      |                  ^~
demux_ffmpeg.c:694:49: error: 'ffmpeg_priv_t' has no member named 'avif'
  694 |   if(avformat_open_input(&avfc, tmp_string, priv->avif, NULL)<0)
      |                                                 ^~
demux_ffmpeg.c:711:7: error: 'ffmpeg_priv_t' has no member named 'avfc'
  711 |   priv->avfc= avfc;
      |       ^~
demux_ffmpeg.c:748:11: error: 'ffmpeg_priv_t' has no member named 'avfc'
  748 |   if((priv->avfc->duration != 0) && (priv->avfc->duration != AV_NOPTS_VALUE))
      |           ^~
demux_ffmpeg.c:748:42: error: 'ffmpeg_priv_t' has no member named 'avfc'
  748 |   if((priv->avfc->duration != 0) && (priv->avfc->duration != AV_NOPTS_VALUE))
      |                                          ^~
demux_ffmpeg.c:750:54: error: 'ffmpeg_priv_t' has no member named 'avfc'
  750 |     gavl_track_set_duration(ctx->tt->cur->info, (priv->avfc->duration * GAVL_TIME_SCALE) / AV_TIME_BASE);
      |                                                      ^~
demux_ffmpeg.c:752:12: error: 'ffmpeg_priv_t' has no member named 'avfc'
  752 |     if(priv->avfc->iformat->read_seek)
      |            ^~
demux_ffmpeg.c:798:37: error: 'ffmpeg_priv_t' has no member named 'avfc'
  798 |                                 priv->avfc->iformat->long_name);
      |                                     ^~
demux_ffmpeg.c: In function 'close_ffmpeg':
demux_ffmpeg.c:811:29: error: 'ffmpeg_priv_t' has no member named 'avfc'
  811 |   avformat_close_input(&priv->avfc);
      |                             ^~
demux_ffmpeg.c:816:23: error: 'ffmpeg_priv_t' has no member named 'pkt'
  816 |   av_packet_free(&priv->pkt);
      |                       ^~
demux_ffmpeg.c: In function 'next_packet_ffmpeg':
demux_ffmpeg.c:845:24: error: 'ffmpeg_priv_t' has no member named 'avfc'
  845 |   if(av_read_frame(priv->avfc, priv->pkt) < 0)
      |                        ^~
demux_ffmpeg.c:845:36: error: 'ffmpeg_priv_t' has no member named 'pkt'
  845 |   if(av_read_frame(priv->avfc, priv->pkt) < 0)
      |                                    ^~
demux_ffmpeg.c:848:39: error: 'ffmpeg_priv_t' has no member named 'pkt'
  848 |   s = bgav_track_find_stream(ctx, priv->pkt->stream_index);
      |                                       ^~
demux_ffmpeg.c:851:25: error: 'ffmpeg_priv_t' has no member named 'pkt'
  851 |     av_packet_unref(priv->pkt);
      |                         ^~
demux_ffmpeg.c:855:13: error: 'ffmpeg_priv_t' has no member named 'avfc'
  855 |   avs = priv->avfc->streams[priv->pkt->stream_index];
      |             ^~
demux_ffmpeg.c:855:33: error: 'ffmpeg_priv_t' has no member named 'pkt'
  855 |   avs = priv->avfc->streams[priv->pkt->stream_index];
      |                                 ^~
In file included from demux_ffmpeg.c:25:
demux_ffmpeg.c:858:28: error: 'ffmpeg_priv_t' has no member named 'pkt'
  858 |   bgav_packet_alloc(p, priv->pkt->size);
      |                            ^~
../include/avdec_private.h:171:54: note: in definition of macro 'bgav_packet_alloc'
  171 | #define bgav_packet_alloc(p, s) gavl_packet_alloc(p, s)
      |                                                      ^
demux_ffmpeg.c:859:26: error: 'ffmpeg_priv_t' has no member named 'pkt'
  859 |   memcpy(p->buf.buf, priv->pkt->data, priv->pkt->size);
      |                          ^~
demux_ffmpeg.c:859:43: error: 'ffmpeg_priv_t' has no member named 'pkt'
  859 |   memcpy(p->buf.buf, priv->pkt->data, priv->pkt->size);
      |                                           ^~
demux_ffmpeg.c:860:20: error: 'ffmpeg_priv_t' has no member named 'pkt'
  860 |   p->buf.len = priv->pkt->size;
      |                    ^~
demux_ffmpeg.c:862:10: error: 'ffmpeg_priv_t' has no member named 'pkt'
  862 |   if(priv->pkt->pts != AV_NOPTS_VALUE)
      |          ^~
demux_ffmpeg.c:864:16: error: 'ffmpeg_priv_t' has no member named 'pkt'
  864 |     p->pts=priv->pkt->pts * priv->avfc->streams[priv->pkt->stream_index]->time_base.num;
      |                ^~
demux_ffmpeg.c:864:33: error: 'ffmpeg_priv_t' has no member named 'avfc'
  864 |     p->pts=priv->pkt->pts * priv->avfc->streams[priv->pkt->stream_index]->time_base.num;
      |                                 ^~
demux_ffmpeg.c:864:53: error: 'ffmpeg_priv_t' has no member named 'pkt'
  864 |     p->pts=priv->pkt->pts * priv->avfc->streams[priv->pkt->stream_index]->time_base.num;
      |                                                     ^~
demux_ffmpeg.c:866:46: error: 'ffmpeg_priv_t' has no member named 'pkt'
  866 |     if((s->type == GAVL_STREAM_VIDEO) && priv->pkt->duration)
      |                                              ^~
demux_ffmpeg.c:867:25: error: 'ffmpeg_priv_t' has no member named 'pkt'
  867 |       p->duration = priv->pkt->duration * avs->time_base.num;
      |                         ^~
demux_ffmpeg.c:875:54: error: 'ffmpeg_priv_t' has no member named 'pkt'
  875 |      (pal_i = (uint32_t*)av_packet_get_side_data(priv->pkt,
      |                                                      ^~
demux_ffmpeg.c:909:10: error: 'ffmpeg_priv_t' has no member named 'pkt'
  909 |   if(priv->pkt->flags&PKT_FLAG_KEY)
      |          ^~
demux_ffmpeg.c: In function 'seek_ffmpeg':
demux_ffmpeg.c:922:21: error: 'ffmpeg_priv_t' has no member named 'avfc'
  922 |   av_seek_frame(priv->avfc, -1,
      |                     ^~
make[2]: *** [Makefile:1552: demux_ffmpeg.lo] Error 1
make[2]: Leaving directory '/root/src/gmerlin-avdecoder/lib'
make[1]: *** [Makefile:1571: all-recursive] Error 1
make[1]: Leaving directory '/root/src/gmerlin-avdecoder/lib'
make: *** [Makefile:565: all-recursive] Error 1

i didn't dive very deep, but ff_const59 isnot part of a public API and should not be used!
see the old (ffmpeg-4.3) upstream documentation that explicitly says:

The ff_const59 define is not part of the public API and will be removed without further warning.

@umlaeute
Copy link
Contributor Author

replacing ff_const59 with const fixes the problem.

@bplaum
Copy link
Owner

bplaum commented Jan 24, 2024

Done.

I still get ffmpeg warnings here and I'm tempted to believe that it's still impossible to compile warning free against a wider range of versions (although things got much better than 20 years ago).

@bplaum bplaum closed this as completed Jan 24, 2024
@umlaeute
Copy link
Contributor Author

hmm, this report is not about some compiler warnings, but about plain old build failures.

also, I do not see how this has been addressed. did you forget to push?

@bplaum
Copy link
Owner

bplaum commented Jan 24, 2024

Ahh sorry, now I pushed.

@umlaeute
Copy link
Contributor Author

see 48a57b0#commitcomment-138027886 why i think this is not completely resolved (i admit, i haven't done any actual testing though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants