sbopkg / sbopkg

Slackbuilds.org Package Browser
https://sbopkg.org/
Other
122 stars 45 forks source link

unpaper compilation error #91

Closed lpvm closed 1 year ago

lpvm commented 1 year ago

For unpaper version 6.1 (build 1), the compilation results in an error.

configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
  CC       unpaper-file.o
file.c: In function ‘loadImage’:
file.c:68:22: error: ‘AVStream’ has no member named ‘codec’
   68 |     if (s->streams[0]->codec->codec_type != AVMEDIA_TYPE_VIDEO)
      |                      ^~
file.c:71:11: warning: implicit declaration of function ‘avcodec_copy_context’; did you mean ‘avcodec_free_context’? [-Wimplicit-function-declaration]
   71 |     ret = avcodec_copy_context(avctx, s->streams[0]->codec);
      |           ^~~~~~~~~~~~~~~~~~~~
      |           avcodec_free_context
file.c:71:52: error: ‘AVStream’ has no member named ‘codec’
   71 |     ret = avcodec_copy_context(avctx, s->streams[0]->codec);
      |                                                    ^~
file.c:77:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   77 |     codec = avcodec_find_decoder(avctx->codec_id);
      |           ^
file.c:96:11: warning: implicit declaration of function ‘avcodec_decode_video2’; did you mean ‘avcodec_decode_subtitle2’? [-Wimplicit-function-declaration]
   96 |     ret = avcodec_decode_video2(avctx, frame, &got_frame, &pkt);
      |           ^~~~~~~~~~~~~~~~~~~~~
      |           avcodec_decode_subtitle2
file.c: In function ‘saveImage’:
file.c:147:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  147 |     fmt = av_guess_format("image2", NULL, NULL);
      |         ^
file.c:159:21: error: ‘AVFormatContext’ has no member named ‘filename’
  159 |     snprintf(out_ctx->filename, sizeof(out_ctx->filename), "%s", filename);
      |                     ^~
file.c:159:47: error: ‘AVFormatContext’ has no member named ‘filename’
  159 |     snprintf(out_ctx->filename, sizeof(out_ctx->filename), "%s", filename);
      |                                               ^~
file.c:186:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  186 |     codec = avcodec_find_encoder(output_codec);
      |           ^
file.c:196:25: error: ‘AVStream’ has no member named ‘codec’
  196 |     codec_ctx = video_st->codec;
      |                         ^~
file.c:221:5: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  221 |     av_init_packet(&pkt);
      |     ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:45,
                 from file.c:28:
/usr/include/libavcodec/packet.h:512:6: note: declared here
  512 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
file.c:224:11: warning: implicit declaration of function ‘avcodec_encode_video2’; did you mean ‘avcodec_encode_subtitle’? [-Wimplicit-function-declaration]
  224 |     ret = avcodec_encode_video2(video_st->codec, &pkt, image, &got_packet);
      |           ^~~~~~~~~~~~~~~~~~~~~
      |           avcodec_encode_subtitle
file.c:224:41: error: ‘AVStream’ has no member named ‘codec’
  224 |     ret = avcodec_encode_video2(video_st->codec, &pkt, image, &got_packet);
      |                                         ^~
file.c:217:5: warning: ignoring return value of ‘avformat_write_header’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  217 |     avformat_write_header(out_ctx, NULL);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:653: unpaper-file.o] Error 1
00:11 0 l1 root@asas /home/lupe/recolhidos/slackbuilds/unpaper 689 #
willysr commented 1 year ago

this should be reported to SBo, not sbopkg

lpvm commented 1 year ago

Since I'm using current and not 15.0, I reported here. Will report to SBo, then. Thank you @willysr.

willysr commented 1 year ago

if you are using -current, you should report it here: https://www.linuxquestions.org/questions/slackware-14/sbo-scripts-not-building-on-current-read-1st-post-pls-4175561999/