Opened 8 months ago

Last modified 8 months ago

#5909 new defect

media-video/ffmpeg-3.1.5 can't link properly with openjpeg

Reported by: PPed72 Owned by:
Priority: important Component: build system
Version: unspecified Keywords: libopenjpeg regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Trying to build ffmpeg-3.1.5 on Gentoo with USE=jpeg2k I get errors at link time.

How to reproduce:
# emerge -1 =ffmpeg-3.1.5
[...]
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/media-video/ffmpeg-3.1.5/temp/ccgz0epr.ltrans21.ltrans.o: requires dynamic R_X86_64_PC32 reloc against 'opj_create_decompress' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/media-video/ffmpeg-3.1.5/temp/ccgz0epr.ltrans21.ltrans.o: requires dynamic R_X86_64_PC32 reloc against 'opj_set_default_encoder_parameters' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_create_decompress' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_error_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_warning_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_info_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_setup_decoder' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_default_create' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_read_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_skip_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_seek_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_user_data' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_user_data_length' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_read_header' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_create_decompress' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_image_destroy' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_destroy' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_destroy_codec' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_decode' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_image_create' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_destroy' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_destroy_codec' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_image_destroy' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_create_compress' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_error_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_warning_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_info_handler' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_setup_encoder' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_default_create' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_write_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_skip_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_seek_function' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_stream_set_user_data' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_start_compress' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_encode' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_end_compress' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_default_encoder_parameters' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_version' is not defined locally
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: hidden symbol 'opj_set_default_decoder_parameters' is not defined locally
collect2: error: ld returned 1 exit status

See also: https://bugs.gentoo.org/show_bug.cgi?id=598054#c2
where another Gentoo user has a patch for the configure checks.

Change History (4)

comment:1 follow-up: Changed 8 months ago by cehoyos

  • Keywords libopenjpeg added

Please test current FFmpeg git head.

Or is this is a regression in unpatched FFmpeg 3.1.5 compared to older unpatched FFmpeg releases?

comment:2 in reply to: ↑ 1 Changed 8 months ago by PPed72

Replying to cehoyos:

Please test current FFmpeg git head.

Same error.

Or is this is a regression in unpatched FFmpeg 3.1.5 compared to older unpatched FFmpeg releases?

No. As you can see in Gentoo Bug, Gentoo carried a patch for 3.1.4 to fix linking with openjpeg-2.1 which is slightly different from what you implemented for 3.1.5, and that patch does not suffer from this problem.

comment:3 follow-up: Changed 8 months ago by cehoyos

  • Component changed from undetermined to build system
  • Keywords regression added
  • Priority changed from normal to important

Should never have been backported imo, 3.1 didn't support (some) libopenjpeg 2.1, so what?

comment:4 in reply to: ↑ 3 Changed 8 months ago by PPed72

Replying to cehoyos:

Should never have been backported imo, 3.1 didn't support (some) libopenjpeg 2.1, so what?

You could use the Gentoo patch or change the configure script as in comment #2 of the gentoo bug. Or is there something wrong with that?

Note: See TracTickets for help on using tickets.