Message ID | 80511c36-5370-c366-8889-d31204c7e9b6@gmail.com |
---|---|
State | Accepted |
Commit | 4226c57b2b1f0b04a7d6dd4b1b3bcdab66bff424 |
Headers | show |
I'm not sure why you guys have to make all these changes to the build process lately. All of a sudden ffmpeg does not compile anymore. During configure I get: ERROR: libbluray not found using pkg-config which worked perfectly 2 days ago. So, whatever changes you made, they screwed up other things. I'm doing the snapshots for OSX and I'm currently having a lot of issues fixing the build problems in my scripts. Currently I am not able to compile a valid build.
On 10/12/2017 3:11 PM, Helmut K. C. Tessarek wrote: > I'm not sure why you guys have to make all these changes to the build > process lately. It's part of a cleaning process. It's specifically left out of the 3.4 release since breakages like this were a possibility. I'm fixing them as they are reported. > > All of a sudden ffmpeg does not compile anymore. During configure I get: > > ERROR: libbluray not found using pkg-config > > which worked perfectly 2 days ago. So, whatever changes you made, they > screwed up other things. > I'm doing the snapshots for OSX and I'm currently having a lot of issues > fixing the build problems in my scripts. Currently I am not able to > compile a valid build. Can you open a bug in http://trac.ffmpeg.org/ and attach your config.log there? Also, what are the contents of the .pc file for libbluray? It sounds like it's missing some dependencies and might have to be reported to their bug tracker. Mac builds are something I've been trying to debug, especially when linking libavutil if videotoolbox is enabled, but i haven't gotten much help in that regard so far and i lack such a system, so if you can provide which configure command lines are failing and the corresponding config.log output for them it would be really helpful.
On 2017-10-12 13:25, James Almer wrote: > That'd be because showcqt is missing its fontconfig and freetype deps in > configure, a mistake that was hidden by extralibs being global before > this merge. This does not seem to be the only mistake in configure. It looks like there are dependencies missing for freetype as well: BEGIN /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c 1 #include <libbluray/bluray.h> 2 #include <stdint.h> 3 long check_bd_open(void) { return (long) bd_open; } 4 int main(void) { int ret = 0; 5 ret |= ((intptr_t)check_bd_open) & 0xFFFF; 6 return ret; } END /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c /usr/bin/clang -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I$(SRC_PATH)/compat/dispatch_semaphore -DPIC -I/Users/Shared/ffmpeg/sw/include -arch x86_64 -L/Users/Shared/ffmpeg/sw/lib -std=c11 -fomit-frame-pointer -fPIC -pthread -I/Users/Shared/ffmpeg/sw/include -I/Users/Shared/ffmpeg/sw/include/freetype2 -I/Users/Shared/ffmpeg/sw/include -I/Users/Shared/ffmpeg/sw/include/fribidi -I/Users/Shared/ffmpeg/sw/include/freetype2 -I/Users/Shared/ffmpeg/sw/include -I/Users/Shared/ffmpeg/sw/include -L/Users/Shared/ffmpeg/sw/lib -c -o /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.o /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c clang: warning: argument unused during compilation: '-L/Users/Shared/ffmpeg/sw/lib' clang: warning: argument unused during compilation: '-L/Users/Shared/ffmpeg/sw/lib' /usr/bin/clang -L/Users/Shared/ffmpeg/sw/lib -I/Users/Shared/ffmpeg/sw/include -arch x86_64 -L/Users/Shared/ffmpeg/sw/lib -lstdc++ -lass -lfontconfig -lexpat -lenca -lfribidi -lfreetype -framework CoreText -Wl,-dynamic,-search_paths_first -I/Users/Shared/ffmpeg/sw/include -L/Users/Shared/ffmpeg/sw/lib -o /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.o -lbluray Undefined symbols for architecture x86_64: "_BZ2_bzDecompress", referenced from: _ft_bzip2_file_fill_output in libfreetype.a(ftbzip2.o) "_BZ2_bzDecompressEnd", referenced from: _ft_bzip2_file_reset in libfreetype.a(ftbzip2.o) _ft_bzip2_file_done in libfreetype.a(ftbzip2.o) "_BZ2_bzDecompressInit", referenced from: _ft_bzip2_file_init in libfreetype.a(ftbzip2.o) _ft_bzip2_file_reset in libfreetype.a(ftbzip2.o) "_inflate", referenced from: _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o) _ft_gzip_file_fill_output in libfreetype.a(ftgzip.o) "_inflateEnd", referenced from: _ft_gzip_file_done in libfreetype.a(ftgzip.o) _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o) "_inflateInit2_", referenced from: _ft_gzip_file_init in libfreetype.a(ftgzip.o) _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o) "_inflateReset", referenced from: _ft_gzip_file_reset in libfreetype.a(ftgzip.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ERROR: libbluray not found using pkg-config
On 2017-10-12 14:19, James Almer wrote: > Can you open a bug in http://trac.ffmpeg.org/ and attach your config.log > there? Also, what are the contents of the .pc file for libbluray? It > sounds like it's missing some dependencies and might have to be reported > to their bug tracker. I can, but I believe it's no a libbluray issue after all. I sent a separate reply. Dependency issues with freetype??? > Mac builds are something I've been trying to debug, especially when > linking libavutil if videotoolbox is enabled, but i haven't gotten much > help in that regard so far and i lack such a system, so if you can > provide which configure command lines are failing and the corresponding > config.log output for them it would be really helpful. I'm rather busy, and creating my compile script is an ongoing process which I have been maintaining for the last 6 years. But if you send me exact steps to test something (and I can automate this somehow), then I can provide you feedback.
On Thu, 12 Oct 2017 14:28:01 -0400 "Helmut K. C. Tessarek" <tessarek@evermeet.cx> wrote: > I'm rather busy, and creating my compile script is an ongoing process > which I have been maintaining for the last 6 years. Probably better not to use bleeding edge git master, then.
On Thu, Oct 12, 2017 at 02:22:08PM -0400, Helmut K. C. Tessarek wrote: > On 2017-10-12 13:25, James Almer wrote: > > That'd be because showcqt is missing its fontconfig and freetype deps in > > configure, a mistake that was hidden by extralibs being global before > > this merge. > > This does not seem to be the only mistake in configure. > > It looks like there are dependencies missing for freetype as well: > what's your configure line? how is freetype built?
On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote: > On 10/12/2017 1:56 PM, Michael Niedermayer wrote: > > On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote: > >> On 10/11/2017 9:22 PM, Michael Niedermayer wrote: > >>> On Wed, Oct 11, 2017 at 09:26:18PM +0000, James Almer wrote: > >>>> ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Wed Oct 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer > >>>> > >>>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63' > >>>> > >>>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63': > >>>> build: Fine-grained link-time dependency settings > >>>> > >>>> Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870, > >>>> d9da7151eef7fc469787e7298196cea291acfd82 and > >>>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f. > >>>> > >>>> Merged-by: James Almer <jamrial@gmail.com> > >>>> > >>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8 > >>>> --- > >>>> > >>>> Makefile | 3 +- > >>>> configure | 297 +++++++++++++++++++++++++++++------------------- > >>>> ffbuild/common.mak | 2 +- > >>>> ffbuild/library.mak | 2 +- > >>>> tests/checkasm/Makefile | 2 +- > >>>> 5 files changed, 187 insertions(+), 119 deletions(-) > >>> > >>> This breaks build here (linux x86-64) > >>> > >>> ./configure --enable-libxavs --enable-gpl > >>> ERROR: libxavs not found > >>> > >>> Iam trying to test most patches for FFmpeg before they are pushed, but > >>> i can only test what is posted for review on ffmpeg-devel ... > >> > >> Testing locally i see it's complaining about missing pthreads and libm > >> ldflag, since they of course are not part of the global extralibs anymore. > >> Switching detection to pkg-config would be ideal, but for some reason > >> even the supplied .pc file doesn't include the -lm ldflag, only the > >> pthreads one, and libxavs looks like it hasn't been updated for six > >> years now (at least the one in sourceforge), so it's unlikely to be > >> fixed on their end. > >> > >> Can you test the attached patch? > > > > seems to fix it > > Pushed then. Thanks. > > > but i get a build failure with fontconfig now: > > > > ../configure --enable-fontconfig && make -j12 > > > > LD ffmpeg_g > > libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig': > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to `FcInitLoadConfigAndFonts' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to `FcNameParse' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to `FcDefaultSubstitute' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to `FcConfigSubstitute' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to `FcFontMatch' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to `FcPatternDestroy' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to `FcPatternDestroy' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to `FcConfigDestroy' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to `FcPatternDestroy' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to `FcConfigDestroy' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to `FcPatternGetString' > > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to `FcConfigDestroy' > > collect2: error: ld returned 1 exit status > > make: *** [ffmpeg_g] Error 1 > > That'd be because showcqt is missing its fontconfig and freetype deps in > configure, a mistake that was hidden by extralibs being global before > this merge. > > Does the attached patch fix it? it seems so but it just results in the next failure make distclean ; ../configure --build-suffix=asterix && make -j12 LD ffmpeg_g fftools/ffmpeg_opt.o: In function `new_output_stream': ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to `av_bsf_get_by_name' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to `av_bsf_alloc' fftools/ffmpeg_opt.o: In function `opt_init_hw_device': ffmpeg/linux32/src/fftools/ffmpeg_opt.c:513: undefined reference to `av_hwdevice_get_type_name' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:511: undefined reference to `av_hwdevice_iterate_types' fftools/ffmpeg_opt.o: In function `new_output_stream': ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to `av_bsf_get_by_name' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to `av_bsf_alloc' fftools/ffmpeg_opt.o: In function `add_input_streams': ffmpeg/linux32/src/fftools/ffmpeg_opt.c:784: undefined reference to `avcodec_parameters_to_context' ffmpeg/linux32/src/fftools/ffmpeg_opt.c:896: undefined reference to `avcodec_parameters_from_context' fftools/ffmpeg_opt.o: In function `open_output_file': ffmpeg/linux32/src/fftools/ffmpeg_opt.c:2686: undefined reference to `av_program_add_stream_index' fftools/cmdutils.o: In function `show_bsfs': ffmpeg/linux32/src/fftools/cmdutils.c:1605: undefined reference to `av_bsf_next' fftools/ffmpeg.o: In function `ifilter_send_eof': ffmpeg/linux32/src/fftools/ffmpeg.c:2233: undefined reference to `av_buffersrc_close' fftools/ffmpeg.o: In function `output_packet': ffmpeg/linux32/src/fftools/ffmpeg.c:837: undefined reference to `av_bsf_send_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:845: undefined reference to `av_bsf_receive_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:857: undefined reference to `av_bsf_send_packet' fftools/ffmpeg.o: In function `do_video_out': ffmpeg/linux32/src/fftools/ffmpeg.c:1288: undefined reference to `avcodec_send_frame' ffmpeg/linux32/src/fftools/ffmpeg.c:1293: undefined reference to `avcodec_receive_packet' fftools/ffmpeg.o: In function `init_output_bsfs': ffmpeg/linux32/src/fftools/ffmpeg.c:3018: undefined reference to `avcodec_parameters_copy' ffmpeg/linux32/src/fftools/ffmpeg.c:3025: undefined reference to `av_bsf_init' ffmpeg/linux32/src/fftools/ffmpeg.c:3018: undefined reference to `avcodec_parameters_copy' ffmpeg/linux32/src/fftools/ffmpeg.c:3025: undefined reference to `av_bsf_init' ffmpeg/linux32/src/fftools/ffmpeg.c:3034: undefined reference to `avcodec_parameters_copy' fftools/ffmpeg.o: In function `init_output_stream': ffmpeg/linux32/src/fftools/ffmpeg.c:3467: undefined reference to `av_buffersink_get_hw_frames_ctx' ffmpeg/linux32/src/fftools/ffmpeg.c:3468: undefined reference to `av_buffersink_get_hw_frames_ctx' ffmpeg/linux32/src/fftools/ffmpeg.c:3469: undefined reference to `av_buffersink_get_format' ffmpeg/linux32/src/fftools/ffmpeg.c:3501: undefined reference to `avcodec_parameters_from_context' fftools/ffmpeg.o: In function `init_output_stream_streamcopy': ffmpeg/linux32/src/fftools/ffmpeg.c:3055: undefined reference to `avcodec_parameters_to_context' fftools/ffmpeg.o: In function `init_output_stream_encode': ffmpeg/linux32/src/fftools/ffmpeg.c:3362: undefined reference to `av_buffersink_get_time_base' ffmpeg/linux32/src/fftools/ffmpeg.c:3373: undefined reference to `av_buffersink_get_w' ffmpeg/linux32/src/fftools/ffmpeg.c:3374: undefined reference to `av_buffersink_get_h' ffmpeg/linux32/src/fftools/ffmpeg.c:3380: undefined reference to `av_buffersink_get_format' fftools/ffmpeg.o: In function `init_output_stream': ffmpeg/linux32/src/fftools/ffmpeg.c:3521: undefined reference to `av_stream_new_side_data' fftools/ffmpeg.o: In function `init_output_stream_streamcopy': ffmpeg/linux32/src/fftools/ffmpeg.c:3063: undefined reference to `avcodec_parameters_from_context' ffmpeg/linux32/src/fftools/ffmpeg.c:3073: undefined reference to `avcodec_parameters_copy' ffmpeg/linux32/src/fftools/ffmpeg.c:3083: undefined reference to `avformat_transfer_internal_stream_timing_info' ffmpeg/linux32/src/fftools/ffmpeg.c:3103: undefined reference to `av_stream_new_side_data' fftools/ffmpeg.o: In function `init_output_stream': ffmpeg/linux32/src/fftools/ffmpeg.c:3566: undefined reference to `avcodec_parameters_to_context' ffmpeg/linux32/src/fftools/ffmpeg.c:3539: undefined reference to `av_stream_new_side_data' fftools/ffmpeg.o: In function `init_output_stream_encode': ffmpeg/linux32/src/fftools/ffmpeg.c:3347: undefined reference to `av_buffersink_get_format' ffmpeg/linux32/src/fftools/ffmpeg.c:3351: undefined reference to `av_buffersink_get_sample_rate' ffmpeg/linux32/src/fftools/ffmpeg.c:3352: undefined reference to `av_buffersink_get_channel_layout' ffmpeg/linux32/src/fftools/ffmpeg.c:3353: undefined reference to `av_buffersink_get_channels' fftools/ffmpeg.o: In function `init_output_stream_streamcopy': ffmpeg/linux32/src/fftools/ffmpeg.c:3089: undefined reference to `av_stream_get_codec_timebase' ffmpeg/linux32/src/fftools/ffmpeg.c:3111: undefined reference to `av_stream_new_side_data' fftools/ffmpeg.o: In function `init_output_stream_encode': ffmpeg/linux32/src/fftools/ffmpeg.c:3377: undefined reference to `av_buffersink_get_sample_aspect_ratio' fftools/ffmpeg.o: In function `init_output_stream': ffmpeg/linux32/src/fftools/ffmpeg.c:3470: undefined reference to `av_buffersink_get_hw_frames_ctx' fftools/ffmpeg.o: In function `reap_filters': ffmpeg/linux32/src/fftools/ffmpeg.c:1475: undefined reference to `av_buffersink_get_time_base' ffmpeg/linux32/src/fftools/ffmpeg.c:1494: undefined reference to `av_buffersink_get_type' fftools/ffmpeg.o: In function `do_audio_out': ffmpeg/linux32/src/fftools/ffmpeg.c:921: undefined reference to `avcodec_send_frame' ffmpeg/linux32/src/fftools/ffmpeg.c:926: undefined reference to `avcodec_receive_packet' fftools/ffmpeg.o: In function `reap_filters': ffmpeg/linux32/src/fftools/ffmpeg.c:1464: undefined reference to `av_buffersink_get_type' fftools/ffmpeg.o: In function `decode': ffmpeg/linux32/src/fftools/ffmpeg.c:2265: undefined reference to `avcodec_send_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:2272: undefined reference to `avcodec_receive_frame' ffmpeg/linux32/src/fftools/ffmpeg.c:2265: undefined reference to `avcodec_send_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:2272: undefined reference to `avcodec_receive_frame' fftools/ffmpeg.o: In function `ffmpeg_cleanup': ffmpeg/linux32/src/fftools/ffmpeg.c:537: undefined reference to `av_bsf_free' ffmpeg/linux32/src/fftools/ffmpeg.c:558: undefined reference to `avcodec_parameters_free' fftools/ffmpeg.o: In function `flush_encoders': ffmpeg/linux32/src/fftools/ffmpeg.c:1931: undefined reference to `avcodec_send_frame' ffmpeg/linux32/src/fftools/ffmpeg.c:1930: undefined reference to `avcodec_receive_packet' fftools/ffmpeg.o: In function `output_packet': ffmpeg/linux32/src/fftools/ffmpeg.c:837: undefined reference to `av_bsf_send_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:857: undefined reference to `av_bsf_send_packet' ffmpeg/linux32/src/fftools/ffmpeg.c:845: undefined reference to `av_bsf_receive_packet' fftools/ffmpeg_filter.o: In function `configure_input_video_filter': ffmpeg/linux32/src/fftools/ffmpeg_filter.c:751: undefined reference to `av_buffersrc_parameters_alloc' ffmpeg/linux32/src/fftools/ffmpeg_filter.c:793: undefined reference to `av_buffersrc_parameters_set' fftools/ffmpeg_filter.o: In function `configure_filtergraph': ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1108: undefined reference to `av_buffersink_get_format' ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1110: undefined reference to `av_buffersink_get_w' ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1111: undefined reference to `av_buffersink_get_h' ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1113: undefined reference to `av_buffersink_get_sample_rate' ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1114: undefined reference to `av_buffersink_get_channel_layout' fftools/ffmpeg_hw.o: In function `hwaccel_retrieve_data': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:354: undefined reference to `av_hwframe_transfer_data' fftools/ffmpeg_hw.o: In function `hw_device_init_from_string': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:93: undefined reference to `av_hwdevice_find_type_by_name' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:175: undefined reference to `av_hwdevice_ctx_create_derived' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:139: undefined reference to `av_hwdevice_ctx_create' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:161: undefined reference to `av_hwdevice_ctx_create' fftools/ffmpeg_hw.o: In function `hw_device_match_type_in_name': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:245: undefined reference to `av_hwdevice_iterate_types' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:247: undefined reference to `av_hwdevice_iterate_types' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:248: undefined reference to `av_hwdevice_get_type_name' fftools/ffmpeg_hw.o: In function `hw_device_setup_for_decode': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:289: undefined reference to `av_hwdevice_get_type_name' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:299: undefined reference to `av_hwdevice_get_type_name' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:272: undefined reference to `av_hwdevice_get_type_name' fftools/ffmpeg_hw.o: In function `hw_device_match_type_in_name': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:245: undefined reference to `av_hwdevice_iterate_types' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:247: undefined reference to `av_hwdevice_iterate_types' ffmpeg/linux32/src/fftools/ffmpeg_hw.c:248: undefined reference to `av_hwdevice_get_type_name' fftools/ffmpeg_hw.o: In function `hw_device_setup_for_encode': ffmpeg/linux32/src/fftools/ffmpeg_hw.c:321: undefined reference to `av_hwdevice_get_type_name' fftools/ffmpeg_cuvid.o: In function `cuvid_init': ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:48: undefined reference to `av_hwframe_ctx_alloc' ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:64: undefined reference to `av_hwframe_ctx_init' ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:39: undefined reference to `av_hwdevice_ctx_create' collect2: error: ld returned 1 exit status make: *** [ffmpeg_g] Error 1 [...]
On 2017-10-12 14:53, wm4 wrote:
> Probably better not to use bleeding edge git master, then.
Hmm, kind of detrimental when I provide snapshots almost daily.
On 10/12/2017 4:25 PM, Michael Niedermayer wrote: > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote: >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote: >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote: >>>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote: >>>>> On Wed, Oct 11, 2017 at 09:26:18PM +0000, James Almer wrote: >>>>>> ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Wed Oct 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer >>>>>> >>>>>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63' >>>>>> >>>>>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63': >>>>>> build: Fine-grained link-time dependency settings >>>>>> >>>>>> Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870, >>>>>> d9da7151eef7fc469787e7298196cea291acfd82 and >>>>>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f. >>>>>> >>>>>> Merged-by: James Almer <jamrial@gmail.com> >>>>>> >>>>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8 >>>>>> --- >>>>>> >>>>>> Makefile | 3 +- >>>>>> configure | 297 +++++++++++++++++++++++++++++------------------- >>>>>> ffbuild/common.mak | 2 +- >>>>>> ffbuild/library.mak | 2 +- >>>>>> tests/checkasm/Makefile | 2 +- >>>>>> 5 files changed, 187 insertions(+), 119 deletions(-) >>>>> >>>>> This breaks build here (linux x86-64) >>>>> >>>>> ./configure --enable-libxavs --enable-gpl >>>>> ERROR: libxavs not found >>>>> >>>>> Iam trying to test most patches for FFmpeg before they are pushed, but >>>>> i can only test what is posted for review on ffmpeg-devel ... >>>> >>>> Testing locally i see it's complaining about missing pthreads and libm >>>> ldflag, since they of course are not part of the global extralibs anymore. >>>> Switching detection to pkg-config would be ideal, but for some reason >>>> even the supplied .pc file doesn't include the -lm ldflag, only the >>>> pthreads one, and libxavs looks like it hasn't been updated for six >>>> years now (at least the one in sourceforge), so it's unlikely to be >>>> fixed on their end. >>>> >>>> Can you test the attached patch? >>> >>> seems to fix it >> >> Pushed then. Thanks. >> >>> but i get a build failure with fontconfig now: >>> >>> ../configure --enable-fontconfig && make -j12 >>> >>> LD ffmpeg_g >>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig': >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to `FcInitLoadConfigAndFonts' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to `FcNameParse' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to `FcDefaultSubstitute' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to `FcConfigSubstitute' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to `FcFontMatch' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to `FcPatternDestroy' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to `FcPatternDestroy' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to `FcConfigDestroy' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to `FcPatternDestroy' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to `FcConfigDestroy' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to `FcPatternGetString' >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to `FcConfigDestroy' >>> collect2: error: ld returned 1 exit status >>> make: *** [ffmpeg_g] Error 1 >> >> That'd be because showcqt is missing its fontconfig and freetype deps in >> configure, a mistake that was hidden by extralibs being global before >> this merge. >> >> Does the attached patch fix it? > > it seems so Will apply then. Thanks. > but it just results in the next failure > > make distclean ; ../configure --build-suffix=asterix && make -j12 This is not "the next failure" result of fixing showcqt. You're using a completely different command line where showcqt would have shown no issues even without the above fix. > LD ffmpeg_g > fftools/ffmpeg_opt.o: In function `new_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' Apparently buildsuf breaks dependencies somewhere by changing the library names. At least here on mingw-64 i instead get "ld.exe: cannot find -lav*" for every library, instead of undefined references. I'll take a look, but could nonetheless use some help. > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to `av_bsf_get_by_name' > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to `av_bsf_alloc' > fftools/ffmpeg_opt.o: In function `opt_init_hw_device': > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:513: undefined reference to `av_hwdevice_get_type_name' > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:511: undefined reference to `av_hwdevice_iterate_types' > fftools/ffmpeg_opt.o: In function `new_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to `av_bsf_get_by_name' > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to `av_bsf_alloc' > fftools/ffmpeg_opt.o: In function `add_input_streams': > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:784: undefined reference to `avcodec_parameters_to_context' > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:896: undefined reference to `avcodec_parameters_from_context' > fftools/ffmpeg_opt.o: In function `open_output_file': > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:2686: undefined reference to `av_program_add_stream_index' > fftools/cmdutils.o: In function `show_bsfs': > ffmpeg/linux32/src/fftools/cmdutils.c:1605: undefined reference to `av_bsf_next' > fftools/ffmpeg.o: In function `ifilter_send_eof': > ffmpeg/linux32/src/fftools/ffmpeg.c:2233: undefined reference to `av_buffersrc_close' > fftools/ffmpeg.o: In function `output_packet': > ffmpeg/linux32/src/fftools/ffmpeg.c:837: undefined reference to `av_bsf_send_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:845: undefined reference to `av_bsf_receive_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:857: undefined reference to `av_bsf_send_packet' > fftools/ffmpeg.o: In function `do_video_out': > ffmpeg/linux32/src/fftools/ffmpeg.c:1288: undefined reference to `avcodec_send_frame' > ffmpeg/linux32/src/fftools/ffmpeg.c:1293: undefined reference to `avcodec_receive_packet' > fftools/ffmpeg.o: In function `init_output_bsfs': > ffmpeg/linux32/src/fftools/ffmpeg.c:3018: undefined reference to `avcodec_parameters_copy' > ffmpeg/linux32/src/fftools/ffmpeg.c:3025: undefined reference to `av_bsf_init' > ffmpeg/linux32/src/fftools/ffmpeg.c:3018: undefined reference to `avcodec_parameters_copy' > ffmpeg/linux32/src/fftools/ffmpeg.c:3025: undefined reference to `av_bsf_init' > ffmpeg/linux32/src/fftools/ffmpeg.c:3034: undefined reference to `avcodec_parameters_copy' > fftools/ffmpeg.o: In function `init_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg.c:3467: undefined reference to `av_buffersink_get_hw_frames_ctx' > ffmpeg/linux32/src/fftools/ffmpeg.c:3468: undefined reference to `av_buffersink_get_hw_frames_ctx' > ffmpeg/linux32/src/fftools/ffmpeg.c:3469: undefined reference to `av_buffersink_get_format' > ffmpeg/linux32/src/fftools/ffmpeg.c:3501: undefined reference to `avcodec_parameters_from_context' > fftools/ffmpeg.o: In function `init_output_stream_streamcopy': > ffmpeg/linux32/src/fftools/ffmpeg.c:3055: undefined reference to `avcodec_parameters_to_context' > fftools/ffmpeg.o: In function `init_output_stream_encode': > ffmpeg/linux32/src/fftools/ffmpeg.c:3362: undefined reference to `av_buffersink_get_time_base' > ffmpeg/linux32/src/fftools/ffmpeg.c:3373: undefined reference to `av_buffersink_get_w' > ffmpeg/linux32/src/fftools/ffmpeg.c:3374: undefined reference to `av_buffersink_get_h' > ffmpeg/linux32/src/fftools/ffmpeg.c:3380: undefined reference to `av_buffersink_get_format' > fftools/ffmpeg.o: In function `init_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg.c:3521: undefined reference to `av_stream_new_side_data' > fftools/ffmpeg.o: In function `init_output_stream_streamcopy': > ffmpeg/linux32/src/fftools/ffmpeg.c:3063: undefined reference to `avcodec_parameters_from_context' > ffmpeg/linux32/src/fftools/ffmpeg.c:3073: undefined reference to `avcodec_parameters_copy' > ffmpeg/linux32/src/fftools/ffmpeg.c:3083: undefined reference to `avformat_transfer_internal_stream_timing_info' > ffmpeg/linux32/src/fftools/ffmpeg.c:3103: undefined reference to `av_stream_new_side_data' > fftools/ffmpeg.o: In function `init_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg.c:3566: undefined reference to `avcodec_parameters_to_context' > ffmpeg/linux32/src/fftools/ffmpeg.c:3539: undefined reference to `av_stream_new_side_data' > fftools/ffmpeg.o: In function `init_output_stream_encode': > ffmpeg/linux32/src/fftools/ffmpeg.c:3347: undefined reference to `av_buffersink_get_format' > ffmpeg/linux32/src/fftools/ffmpeg.c:3351: undefined reference to `av_buffersink_get_sample_rate' > ffmpeg/linux32/src/fftools/ffmpeg.c:3352: undefined reference to `av_buffersink_get_channel_layout' > ffmpeg/linux32/src/fftools/ffmpeg.c:3353: undefined reference to `av_buffersink_get_channels' > fftools/ffmpeg.o: In function `init_output_stream_streamcopy': > ffmpeg/linux32/src/fftools/ffmpeg.c:3089: undefined reference to `av_stream_get_codec_timebase' > ffmpeg/linux32/src/fftools/ffmpeg.c:3111: undefined reference to `av_stream_new_side_data' > fftools/ffmpeg.o: In function `init_output_stream_encode': > ffmpeg/linux32/src/fftools/ffmpeg.c:3377: undefined reference to `av_buffersink_get_sample_aspect_ratio' > fftools/ffmpeg.o: In function `init_output_stream': > ffmpeg/linux32/src/fftools/ffmpeg.c:3470: undefined reference to `av_buffersink_get_hw_frames_ctx' > fftools/ffmpeg.o: In function `reap_filters': > ffmpeg/linux32/src/fftools/ffmpeg.c:1475: undefined reference to `av_buffersink_get_time_base' > ffmpeg/linux32/src/fftools/ffmpeg.c:1494: undefined reference to `av_buffersink_get_type' > fftools/ffmpeg.o: In function `do_audio_out': > ffmpeg/linux32/src/fftools/ffmpeg.c:921: undefined reference to `avcodec_send_frame' > ffmpeg/linux32/src/fftools/ffmpeg.c:926: undefined reference to `avcodec_receive_packet' > fftools/ffmpeg.o: In function `reap_filters': > ffmpeg/linux32/src/fftools/ffmpeg.c:1464: undefined reference to `av_buffersink_get_type' > fftools/ffmpeg.o: In function `decode': > ffmpeg/linux32/src/fftools/ffmpeg.c:2265: undefined reference to `avcodec_send_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:2272: undefined reference to `avcodec_receive_frame' > ffmpeg/linux32/src/fftools/ffmpeg.c:2265: undefined reference to `avcodec_send_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:2272: undefined reference to `avcodec_receive_frame' > fftools/ffmpeg.o: In function `ffmpeg_cleanup': > ffmpeg/linux32/src/fftools/ffmpeg.c:537: undefined reference to `av_bsf_free' > ffmpeg/linux32/src/fftools/ffmpeg.c:558: undefined reference to `avcodec_parameters_free' > fftools/ffmpeg.o: In function `flush_encoders': > ffmpeg/linux32/src/fftools/ffmpeg.c:1931: undefined reference to `avcodec_send_frame' > ffmpeg/linux32/src/fftools/ffmpeg.c:1930: undefined reference to `avcodec_receive_packet' > fftools/ffmpeg.o: In function `output_packet': > ffmpeg/linux32/src/fftools/ffmpeg.c:837: undefined reference to `av_bsf_send_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:857: undefined reference to `av_bsf_send_packet' > ffmpeg/linux32/src/fftools/ffmpeg.c:845: undefined reference to `av_bsf_receive_packet' > fftools/ffmpeg_filter.o: In function `configure_input_video_filter': > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:751: undefined reference to `av_buffersrc_parameters_alloc' > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:793: undefined reference to `av_buffersrc_parameters_set' > fftools/ffmpeg_filter.o: In function `configure_filtergraph': > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1108: undefined reference to `av_buffersink_get_format' > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1110: undefined reference to `av_buffersink_get_w' > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1111: undefined reference to `av_buffersink_get_h' > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1113: undefined reference to `av_buffersink_get_sample_rate' > ffmpeg/linux32/src/fftools/ffmpeg_filter.c:1114: undefined reference to `av_buffersink_get_channel_layout' > fftools/ffmpeg_hw.o: In function `hwaccel_retrieve_data': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:354: undefined reference to `av_hwframe_transfer_data' > fftools/ffmpeg_hw.o: In function `hw_device_init_from_string': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:93: undefined reference to `av_hwdevice_find_type_by_name' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:175: undefined reference to `av_hwdevice_ctx_create_derived' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:139: undefined reference to `av_hwdevice_ctx_create' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:161: undefined reference to `av_hwdevice_ctx_create' > fftools/ffmpeg_hw.o: In function `hw_device_match_type_in_name': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:245: undefined reference to `av_hwdevice_iterate_types' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:247: undefined reference to `av_hwdevice_iterate_types' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:248: undefined reference to `av_hwdevice_get_type_name' > fftools/ffmpeg_hw.o: In function `hw_device_setup_for_decode': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:289: undefined reference to `av_hwdevice_get_type_name' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:299: undefined reference to `av_hwdevice_get_type_name' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:272: undefined reference to `av_hwdevice_get_type_name' > fftools/ffmpeg_hw.o: In function `hw_device_match_type_in_name': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:245: undefined reference to `av_hwdevice_iterate_types' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:247: undefined reference to `av_hwdevice_iterate_types' > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:248: undefined reference to `av_hwdevice_get_type_name' > fftools/ffmpeg_hw.o: In function `hw_device_setup_for_encode': > ffmpeg/linux32/src/fftools/ffmpeg_hw.c:321: undefined reference to `av_hwdevice_get_type_name' > fftools/ffmpeg_cuvid.o: In function `cuvid_init': > ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:48: undefined reference to `av_hwframe_ctx_alloc' > ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:64: undefined reference to `av_hwframe_ctx_init' > ffmpeg/linux32/src/fftools/ffmpeg_cuvid.c:39: undefined reference to `av_hwdevice_ctx_create' > collect2: error: ld returned 1 exit status > make: *** [ffmpeg_g] Error 1 > > > [...] > > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > n
I'm building ffmpeg for the last 6 years and provide snapshots and releases for OSX. On 2017-10-12 15:00, Clément Bœsch wrote: > what's your configure line? ./configure --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay > how is freetype built? ./configure --prefix=${TARGET} --without-png --disable-shared --enable-static --with-harfbuzz=no Please note that I build static ffmpeg binaries and I have an isolated dev env, so that no other libs than system libs and libs that I have compiled are used. I also had to set the following to satisfy build dependency issues due to errors in the build process (wrong dependencies in configure and/or pkg_config files). export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca -lfribidi -lfreetype -framework CoreText" I'm pretty sure I can fix my problem by just adding all libraries that can't be found to LDFLAGS, but this is just a workaround and does not solve the root problem. e.g. why do I have to specify libfontconfig manually, although the fontconfig.pc is perfectly valid? That was a rhetorical question. The build process has been broken forever and it is still broken. Otherwise I would not have to set any of the LDFLAGS manually.
On 10/12/2017 4:44 PM, Helmut K. C. Tessarek wrote: > I'm building ffmpeg for the last 6 years and provide snapshots and > releases for OSX. > > On 2017-10-12 15:00, Clément Bœsch wrote: >> what's your configure line? > > ./configure --cc=/usr/bin/clang --prefix=/opt/ffmpeg > --extra-version=tessus --enable-avisynth --enable-fontconfig > --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype > --enable-libgsm --enable-libmodplug --enable-libmp3lame > --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus > --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis > --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 > --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi > --enable-version3 --disable-ffplay > >> how is freetype built? > ./configure --prefix=${TARGET} --without-png --disable-shared > --enable-static --with-harfbuzz=no > > > Please note that I build static ffmpeg binaries and I have an isolated > dev env, so that no other libs than system libs and libs that I have > compiled are used. > > I also had to set the following to satisfy build dependency issues due > to errors in the build process (wrong dependencies in configure and/or > pkg_config files). > > export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca > -lfribidi -lfreetype -framework CoreText" Sounds like pkg-config is not providing you with the required deps. Since you're doing a static build with static external libraries, try adding "--pkg-config-flags=--static" to your configure line. > > I'm pretty sure I can fix my problem by just adding all libraries that > can't be found to LDFLAGS, but this is just a workaround and does not > solve the root problem. > > e.g. why do I have to specify libfontconfig manually, although the > fontconfig.pc is perfectly valid? That was a rhetorical question. Adding --static to --pkg-config-flags might let you remove some of these custom ldflags. But probably not all. > > The build process has been broken forever and it is still broken. > Otherwise I would not have to set any of the LDFLAGS manually.
On Thu, Oct 12, 2017 at 04:42:19PM -0300, James Almer wrote: > On 10/12/2017 4:25 PM, Michael Niedermayer wrote: > > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote: > >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote: > >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote: > >>>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote: > >>>>> On Wed, Oct 11, 2017 at 09:26:18PM +0000, James Almer wrote: > >>>>>> ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Wed Oct 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer > >>>>>> > >>>>>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63' > >>>>>> > >>>>>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63': > >>>>>> build: Fine-grained link-time dependency settings > >>>>>> > >>>>>> Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870, > >>>>>> d9da7151eef7fc469787e7298196cea291acfd82 and > >>>>>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f. > >>>>>> > >>>>>> Merged-by: James Almer <jamrial@gmail.com> > >>>>>> > >>>>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8 > >>>>>> --- > >>>>>> > >>>>>> Makefile | 3 +- > >>>>>> configure | 297 +++++++++++++++++++++++++++++------------------- > >>>>>> ffbuild/common.mak | 2 +- > >>>>>> ffbuild/library.mak | 2 +- > >>>>>> tests/checkasm/Makefile | 2 +- > >>>>>> 5 files changed, 187 insertions(+), 119 deletions(-) > >>>>> > >>>>> This breaks build here (linux x86-64) > >>>>> > >>>>> ./configure --enable-libxavs --enable-gpl > >>>>> ERROR: libxavs not found > >>>>> > >>>>> Iam trying to test most patches for FFmpeg before they are pushed, but > >>>>> i can only test what is posted for review on ffmpeg-devel ... > >>>> > >>>> Testing locally i see it's complaining about missing pthreads and libm > >>>> ldflag, since they of course are not part of the global extralibs anymore. > >>>> Switching detection to pkg-config would be ideal, but for some reason > >>>> even the supplied .pc file doesn't include the -lm ldflag, only the > >>>> pthreads one, and libxavs looks like it hasn't been updated for six > >>>> years now (at least the one in sourceforge), so it's unlikely to be > >>>> fixed on their end. > >>>> > >>>> Can you test the attached patch? > >>> > >>> seems to fix it > >> > >> Pushed then. Thanks. > >> > >>> but i get a build failure with fontconfig now: > >>> > >>> ../configure --enable-fontconfig && make -j12 > >>> > >>> LD ffmpeg_g > >>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig': > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to `FcInitLoadConfigAndFonts' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to `FcNameParse' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to `FcDefaultSubstitute' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to `FcConfigSubstitute' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to `FcFontMatch' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to `FcPatternDestroy' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to `FcPatternDestroy' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to `FcConfigDestroy' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to `FcPatternDestroy' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to `FcConfigDestroy' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to `FcPatternGetString' > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to `FcConfigDestroy' > >>> collect2: error: ld returned 1 exit status > >>> make: *** [ffmpeg_g] Error 1 > >> > >> That'd be because showcqt is missing its fontconfig and freetype deps in > >> configure, a mistake that was hidden by extralibs being global before > >> this merge. > >> > >> Does the attached patch fix it? > > > > it seems so > > Will apply then. Thanks. > > > but it just results in the next failure > > > > make distclean ; ../configure --build-suffix=asterix && make -j12 > > This is not "the next failure" result of fixing showcqt. You're using a > completely different command line where showcqt would have shown no > issues even without the above fix. it was meant as in "the next issue that the recent build system changes caused) also i simplified the command before submitting removing unneeded options > > > LD ffmpeg_g > > fftools/ffmpeg_opt.o: In function `new_output_stream': > > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' > > Apparently buildsuf breaks dependencies somewhere by changing the > library names. At least here on mingw-64 i instead get > > "ld.exe: cannot find -lav*" for every library, instead of undefined > references. it might be that this is in fact the same issue undefined references resulting out of it finding some old lib maybe ... [...]
On 10/12/2017 5:07 PM, Michael Niedermayer wrote: > On Thu, Oct 12, 2017 at 04:42:19PM -0300, James Almer wrote: >> On 10/12/2017 4:25 PM, Michael Niedermayer wrote: >>> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote: >>>> On 10/12/2017 1:56 PM, Michael Niedermayer wrote: >>>>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote: >>>>>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote: >>>>>>> On Wed, Oct 11, 2017 at 09:26:18PM +0000, James Almer wrote: >>>>>>>> ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Wed Oct 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer >>>>>>>> >>>>>>>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63' >>>>>>>> >>>>>>>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63': >>>>>>>> build: Fine-grained link-time dependency settings >>>>>>>> >>>>>>>> Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870, >>>>>>>> d9da7151eef7fc469787e7298196cea291acfd82 and >>>>>>>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f. >>>>>>>> >>>>>>>> Merged-by: James Almer <jamrial@gmail.com> >>>>>>>> >>>>>>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8 >>>>>>>> --- >>>>>>>> >>>>>>>> Makefile | 3 +- >>>>>>>> configure | 297 +++++++++++++++++++++++++++++------------------- >>>>>>>> ffbuild/common.mak | 2 +- >>>>>>>> ffbuild/library.mak | 2 +- >>>>>>>> tests/checkasm/Makefile | 2 +- >>>>>>>> 5 files changed, 187 insertions(+), 119 deletions(-) >>>>>>> >>>>>>> This breaks build here (linux x86-64) >>>>>>> >>>>>>> ./configure --enable-libxavs --enable-gpl >>>>>>> ERROR: libxavs not found >>>>>>> >>>>>>> Iam trying to test most patches for FFmpeg before they are pushed, but >>>>>>> i can only test what is posted for review on ffmpeg-devel ... >>>>>> >>>>>> Testing locally i see it's complaining about missing pthreads and libm >>>>>> ldflag, since they of course are not part of the global extralibs anymore. >>>>>> Switching detection to pkg-config would be ideal, but for some reason >>>>>> even the supplied .pc file doesn't include the -lm ldflag, only the >>>>>> pthreads one, and libxavs looks like it hasn't been updated for six >>>>>> years now (at least the one in sourceforge), so it's unlikely to be >>>>>> fixed on their end. >>>>>> >>>>>> Can you test the attached patch? >>>>> >>>>> seems to fix it >>>> >>>> Pushed then. Thanks. >>>> >>>>> but i get a build failure with fontconfig now: >>>>> >>>>> ../configure --enable-fontconfig && make -j12 >>>>> >>>>> LD ffmpeg_g >>>>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig': >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to `FcInitLoadConfigAndFonts' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to `FcNameParse' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to `FcDefaultSubstitute' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to `FcConfigSubstitute' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to `FcFontMatch' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to `FcPatternDestroy' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to `FcPatternDestroy' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to `FcConfigDestroy' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to `FcPatternDestroy' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to `FcConfigDestroy' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to `FcPatternGetString' >>>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to `FcConfigDestroy' >>>>> collect2: error: ld returned 1 exit status >>>>> make: *** [ffmpeg_g] Error 1 >>>> >>>> That'd be because showcqt is missing its fontconfig and freetype deps in >>>> configure, a mistake that was hidden by extralibs being global before >>>> this merge. >>>> >>>> Does the attached patch fix it? >>> >>> it seems so >> >> Will apply then. Thanks. >> >>> but it just results in the next failure >>> >>> make distclean ; ../configure --build-suffix=asterix && make -j12 >> >> This is not "the next failure" result of fixing showcqt. You're using a >> completely different command line where showcqt would have shown no >> issues even without the above fix. > > it was meant as in "the next issue that the recent build system changes > caused) > > also i simplified the command before submitting removing unneeded > options Ah, i see. Nevermind then. > > >> >>> LD ffmpeg_g >>> fftools/ffmpeg_opt.o: In function `new_output_stream': >>> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to `avcodec_parameters_alloc' >> >> Apparently buildsuf breaks dependencies somewhere by changing the >> library names. At least here on mingw-64 i instead get >> >> "ld.exe: cannot find -lav*" for every library, instead of undefined >> references. > > it might be that this is in fact the same issue> > undefined references resulting out of it finding some old lib maybe ... It most likely probably is. But wonder how old your system ffmpeg libs are that functions like avcodec_parameters_alloc() are not in them...
On 2017-10-12 16:04, James Almer wrote: > Sounds like pkg-config is not providing you with the required deps. > Since you're doing a static build with static external libraries, try > adding "--pkg-config-flags=--static" to your configure line. Which makes no sense, since I checked the pkg_config files and they look fine. Anyway, I tried --pkg-config-flags=--static. It did not help. But as I've suspected I had to add -lbz2 -lz to LDFLAGS. Now it works. export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca -lfribidi -lfreetype -lbz2 -lz -framework CoreText" > Adding --static to --pkg-config-flags might let you remove some of these > custom ldflags. But probably not all. It doesn't look that way. Btw, I still get these awful warnings for every file. Ronald B. mentioned in another thread: ------------------------------------------------------------------------- From IRC yesterday (gcc=clang here): bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success clang: warning: /dev/null: 'linker' input unused [-Wunused-command-line-argument] clang: warning: argument unused during compilation: '-Wno-bool-operation' [-Wunused-command-line-argument] success bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o -Werror=unused-command-line-argument && echo success warning: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Wunknown-warning-option] 1 warning generated. successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o -Werror=unused-command-line-argument -Werror=unknown-warning-option && echo success error: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option] That last one should allow this to work. ------------------------------------------------------------------------- Can someone please fix this?
On 10/12/2017 6:12 PM, Helmut K. C. Tessarek wrote: > On 2017-10-12 16:04, James Almer wrote: >> Sounds like pkg-config is not providing you with the required deps. >> Since you're doing a static build with static external libraries, try >> adding "--pkg-config-flags=--static" to your configure line. > > Which makes no sense, since I checked the pkg_config files and they look > fine. > Anyway, I tried --pkg-config-flags=--static. It did not help. bzip2 and zlib show up as dependencies of freetype2 in the "Requires.private" section of its .pc file in your system, right? If you're using an static build of freetype2, pkg-config needs to be run with --static to actually get the required ldflags for said dependencies. Now, the issue here is libbluray adding freetype2 ldflags directly instead of setting freetype2 as a dependency, much like freetype2 sets bzip2 and zlib. > > But as I've suspected I had to add -lbz2 -lz to LDFLAGS. Now it works. I suppose that if that change is done to libbluray's .pc file (namely, adding a "Requires.private: freetype2 fontconfig" line or similar, if i understand this correctly), you'll be able to use the --static pkg-config-flag and remove most if not all of these LDFLAGS you list below. > > export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca > -lfribidi -lfreetype -lbz2 -lz -framework CoreText" > >> Adding --static to --pkg-config-flags might let you remove some of these >> custom ldflags. But probably not all. > > It doesn't look that way. > > Btw, I still get these awful warnings for every file. > > Ronald B. mentioned in another thread: > > ------------------------------------------------------------------------- > From IRC yesterday (gcc=clang here): > > bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success > clang: warning: /dev/null: 'linker' input unused > [-Wunused-command-line-argument] > clang: warning: argument unused during compilation: '-Wno-bool-operation' > [-Wunused-command-line-argument] > success > bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o > -Werror=unused-command-line-argument && echo success > warning: unknown warning option '-Wno-bool-operation'; did you mean > '-Wno-bool-conversion'? [-Wunknown-warning-option] > 1 warning generated. > successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o > -Werror=unused-command-line-argument -Werror=unknown-warning-option && echo > success > error: unknown warning option '-Wno-bool-operation'; did you mean > '-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option] > > That last one should allow this to work. > > ------------------------------------------------------------------------- > > Can someone please fix this? Just sent a patch for this.
On 12-10-2017 20:11, Helmut K. C. Tessarek <tessarek@evermeet.cx> wrote: > I'm not sure why you guys have to make all these changes to the build > process lately. > > All of a sudden ffmpeg does not compile anymore. During configure I get: > > ERROR: libbluray not found using pkg-config > > which worked perfectly 2 days ago. So, whatever changes you made, they > screwed up other things. Same here. I was about to compile another FFmpeg executable, but got configure complaining about libbluray as well (note: I always use --pkg-config-flags=--static). I've worked around that by changing the pc-file prefix=/cygdrive/[...] exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libbluray Description: library supporting Blu-ray playback Version: 1.0.1 Libs: -L${libdir} -lbluray Libs.private: -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib -lfreetype -lgdi32 Cflags: -I${includedir} ...into: prefix=/cygdrive/[...] exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libbluray Description: library supporting Blu-ray playback Version: 1.0.1 Requires: libxml-2.0, freetype2 Libs: -L${libdir} -lbluray Libs.private: -lgdi32 Cflags: -I${includedir} Next however was iLBC. I got "undefined reference to `pthread_once'" and "ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix' that. Now it's complaining about libmysofa: /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f): undefined reference to `inflateInit_' /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76): undefined reference to `inflate' /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a): undefined reference to `inflateEnd' collect2: error: ld returned 1 exit status ERROR: libmysofa not found Something is seriously broken here. On 12-10-2017 22:36, James Almer <jamrial@gmail.com> wrote: > Does the attached patch ('0001-build-fix-building-with-build-suffix.patch') fix this for you? Does nothing for me. -- Reino
On 10/12/2017 6:42 PM, Reino Wijnsma wrote: > On 12-10-2017 20:11, Helmut K. C. Tessarek <tessarek@evermeet.cx> wrote: >> I'm not sure why you guys have to make all these changes to the build >> process lately. >> >> All of a sudden ffmpeg does not compile anymore. During configure I get: >> >> ERROR: libbluray not found using pkg-config >> >> which worked perfectly 2 days ago. So, whatever changes you made, they >> screwed up other things. > Same here. I was about to compile another FFmpeg executable, but got > configure complaining about libbluray as well (note: I always use > --pkg-config-flags=--static). > I've worked around that by changing the pc-file > > prefix=/cygdrive/[...] > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: libbluray > Description: library supporting Blu-ray playback > Version: 1.0.1 > Libs: -L${libdir} -lbluray > Libs.private: -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib > -lfreetype -lgdi32 > Cflags: -I${includedir} > > ...into: > > prefix=/cygdrive/[...] > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: libbluray > Description: library supporting Blu-ray playback > Version: 1.0.1 > Requires: libxml-2.0, freetype2 > Libs: -L${libdir} -lbluray > Libs.private: -lgdi32 > Cflags: -I${includedir} Thanks a lot! You confirmed what i suspected. Guess we'll have to get libbluray to change their .pc file. > > Next however was iLBC. I got "undefined reference to `pthread_once'" and > "ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix' > that. > > Now it's complaining about libmysofa: > > /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f): > undefined reference to `inflateInit_' > /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76): > undefined reference to `inflate' > /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a): > undefined reference to `inflateEnd' > collect2: error: ld returned 1 exit status > ERROR: libmysofa not found Does libmysofa have a pkg-config file? Otherwise, guess i'll have to add -lz to its extralibs. > > Something is seriously broken here. Dependencies are being figured out after ldflags were changed into a per-component basis instead of globally. > > On 12-10-2017 22:36, James Almer <jamrial@gmail.com> wrote: >> Does the attached patch ('0001-build-fix-building-with-build-suffix.patch') fix this for you? > Does nothing for me. It's not meant to. That fixed another bug. > > -- Reino > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >
On 2017-10-12 17:35, James Almer wrote: > bzip2 and zlib show up as dependencies of freetype2 in the > "Requires.private" section of its .pc file in your system, right? If almost, my freetype2.pc looks like this: prefix=/Users/Shared/ffmpeg/sw exec_prefix=/Users/Shared/ffmpeg/sw libdir=/Users/Shared/ffmpeg/sw/lib includedir=/Users/Shared/ffmpeg/sw/include Name: FreeType 2 URL: http://freetype.org Description: A free, high-quality, and portable font engine. Version: 18.6.12 Requires: Requires.private: zlib Libs: -L${libdir} -lfreetype Libs.private: -lbz2 Cflags: -I${includedir}/freetype2 > you're using an static build of freetype2, pkg-config needs to be run > with --static to actually get the required ldflags for said dependencies. > > Now, the issue here is libbluray adding freetype2 ldflags directly > instead of setting freetype2 as a dependency, much like freetype2 sets > bzip2 and zlib. my libbluray.pc look like this: prefix=/Users/Shared/ffmpeg/sw exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libbluray Description: library supporting Blu-ray playback Version: 1.0.0 Libs: -L${libdir} -lbluray Libs.private: -L${libdir} -lfreetype -L${libdir} -lfontconfig -lfreetype Cflags: -I${includedir} > I suppose that if that change is done to libbluray's .pc file (namely, > adding a "Requires.private: freetype2 fontconfig" line or similar, if i > understand this correctly), you'll be able to use the --static > pkg-config-flag and remove most if not all of these LDFLAGS you list below. > It doesn't seem to work, because I already have those in the libs.private section.
On 10/12/2017 7:48 PM, Helmut K. C. Tessarek wrote: > > > On 2017-10-12 17:35, James Almer wrote: >> bzip2 and zlib show up as dependencies of freetype2 in the >> "Requires.private" section of its .pc file in your system, right? If > > almost, my freetype2.pc looks like this: > > prefix=/Users/Shared/ffmpeg/sw > exec_prefix=/Users/Shared/ffmpeg/sw > libdir=/Users/Shared/ffmpeg/sw/lib > includedir=/Users/Shared/ffmpeg/sw/include > > Name: FreeType 2 > URL: http://freetype.org > Description: A free, high-quality, and portable font engine. > Version: 18.6.12 > Requires: > Requires.private: zlib > Libs: -L${libdir} -lfreetype > Libs.private: -lbz2 > Cflags: -I${includedir}/freetype2 Ideally/IMO, bzip2 would be the same as zlib, but in this case it probably makes no difference. > >> you're using an static build of freetype2, pkg-config needs to be run >> with --static to actually get the required ldflags for said dependencies. >> >> Now, the issue here is libbluray adding freetype2 ldflags directly >> instead of setting freetype2 as a dependency, much like freetype2 sets >> bzip2 and zlib. > > my libbluray.pc look like this: > > prefix=/Users/Shared/ffmpeg/sw > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: libbluray > Description: library supporting Blu-ray playback > Version: 1.0.0 > Libs: -L${libdir} -lbluray > Libs.private: -L${libdir} -lfreetype -L${libdir} -lfontconfig -lfreetype > Cflags: -I${includedir} > >> I suppose that if that change is done to libbluray's .pc file (namely, >> adding a "Requires.private: freetype2 fontconfig" line or similar, if i >> understand this correctly), you'll be able to use the --static >> pkg-config-flag and remove most if not all of these LDFLAGS you list below. >> > > It doesn't seem to work, because I already have those in the > libs.private section. Having those in Libs.Private just adds the listed -l* flags. If it had instead a real dependency on freetype2 (Requires or Requires.private entry), it'd then also get the bzip2 and zlib ldflags alongside the freetype2 ldflags when you run pkg-config with the --static flag. I'll see about sending a patch to libbluray to change this. Unless someone else can do it instead while i'm busy fixing assorted failures.
On 13-10-2017 0:27, James Almer <jamrial@gmail.com> wrote: > On 10/12/2017 6:42 PM, Reino Wijnsma wrote: >> On 12-10-2017 20:11, Helmut K. C. Tessarek <tessarek@evermeet.cx> wrote: >>> I'm not sure why you guys have to make all these changes to the build >>> process lately. >>> >>> All of a sudden ffmpeg does not compile anymore. During configure I get: >>> >>> ERROR: libbluray not found using pkg-config >>> >>> which worked perfectly 2 days ago. So, whatever changes you made, they >>> screwed up other things. >> Same here. I was about to compile another FFmpeg executable, but got >> configure complaining about libbluray as well (note: I always use >> --pkg-config-flags=--static). >> I've worked around that by changing the pc-file >> >> prefix=/cygdrive/[...] >> exec_prefix=${prefix} >> libdir=${exec_prefix}/lib >> includedir=${prefix}/include >> >> Name: libbluray >> Description: library supporting Blu-ray playback >> Version: 1.0.1 >> Libs: -L${libdir} -lbluray >> Libs.private: -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib >> -lfreetype -lgdi32 >> Cflags: -I${includedir} >> >> ...into: >> >> prefix=/cygdrive/[...] >> exec_prefix=${prefix} >> libdir=${exec_prefix}/lib >> includedir=${prefix}/include >> >> Name: libbluray >> Description: library supporting Blu-ray playback >> Version: 1.0.1 >> Requires: libxml-2.0, freetype2 >> Libs: -L${libdir} -lbluray >> Libs.private: -lgdi32 >> Cflags: -I${includedir} > Thanks a lot! You confirmed what i suspected. > > Guess we'll have to get libbluray to change their .pc file. > >> Next however was iLBC. I got "undefined reference to `pthread_once'" and >> "ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix' >> that. >> >> Now it's complaining about libmysofa: >> >> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f): >> undefined reference to `inflateInit_' >> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76): >> undefined reference to `inflate' >> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a): >> undefined reference to `inflateEnd' >> collect2: error: ld returned 1 exit status >> ERROR: libmysofa not found > Does libmysofa have a pkg-config file? Otherwise, guess i'll have to add > -lz to its extralibs. No, it does not. However,... enabled libmysofa && require libmysofa "mysofa.h" mysofa_load -lmysofa -lz appending "-lz" here fixes the issue for me. Next in line is libopenmpt. A LONG list of error-messages, saved and attached as '/config_libopenmpt.log/'. Also notice the warning on line 19 and the GCC 7.2.0 undefined-reference-messages on line 134 and 135 for instance. My '/libopenmpt.pc/' looks like: prefix=/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32 exec_prefix=${prefix} includedir=${prefix}/include libdir=${exec_prefix}/lib Name: libopenmpt Description: Tracker module player based on OpenMPT Version: 0.3.1+release.autotools Requires.private: zlib libmpg123 ogg vorbis vorbisfile Libs: -L${libdir} -lopenmpt Libs.private: Cflags: -I${includedir} -- Reino [...] require_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create use_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create check_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create pkg-config --exists --print-errors libopenmpt >= 0.2.6557 check_func_headers libopenmpt/libopenmpt.h openmpt_module_create -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg check_ld cc -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg check_cc -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c 1 #include <libopenmpt/libopenmpt.h> 2 #include <stdint.h> 3 long check_openmpt_module_create(void) { return (long) openmpt_module_create; } 4 int main(void) { int ret = 0; 5 ret |= ((intptr_t)check_openmpt_module_create) & 0xFFFF; 6 return ret; } END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c /cygdrive/[...]/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=pentium3 -O2 -mfpmath=sse -msse -DCACA_STATIC -DLIBTWOLAME_STATIC -march=pentium3 -O2 -mfpmath=sse -msse -std=c11 -fomit-frame-pointer -pthread -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/fribidi -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/bs2b -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/fribidi -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -c -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c: In function 'check_openmpt_module_create': /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c:3:1: warning: 'openmpt_module_create' is deprecated [-Wdeprecated-declarations] long check_openmpt_module_create(void) { return (long) openmpt_module_create; } ^~~~ In file included from /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c:1:0: /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libopenmpt/libopenmpt.h:645:55: note: declared here LIBOPENMPT_API LIBOPENMPT_DEPRECATED openmpt_module * openmpt_module_create( openmpt_stream_callbacks stream_callbacks, void * stream, openmpt_log_func logfunc, void * loguser, const openmpt_module_initial_ctl * ctls ); ^~~~~~~~~~~~~~~~~~~~~ /cygdrive/[...]/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Wl,--large-address-aware -Wl,--nxcompat,--dynamicbase -Wl,--as-needed -Wl,--pic-executable,-e,_mainCRTStartup -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.exe /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.o -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg -lshlwapi -lpthread -lcrypt32 /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZN7openmpt6helper11make_uniqueINS_14logfunc_loggerEJPFvPKcPvERS5_EEESt10unique_ptrIT_St14default_deleteISA_EEDpOT0_': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:200: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:201: undefined reference to `operator new(unsigned int)' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:201: undefined reference to `operator delete(void*, unsigned int)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_current_speed': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1448: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_current_tempo': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1458: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1463: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1463: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1463: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_tempo_factor': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1468: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1473: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1473: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1473: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_tempo_factor': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1478: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1482: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1482: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1482: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_pitch_factor': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1487: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1492: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1492: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1492: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_pitch_factor': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1497: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1501: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1501: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1501: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_global_volume': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1506: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1511: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1511: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1511: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_global_volume': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1516: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1520: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1520: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1520: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_channel_volume': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1525: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1530: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1530: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1530: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_channel_volume': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1535: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1539: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1539: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1539: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_channel_mute_status': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1544: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1549: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1549: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1549: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_channel_mute_status': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1554: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1558: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1558: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1558: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_instrument_mute_status': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1563: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1568: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1568: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1568: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_instrument_mute_status': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1573: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1577: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1577: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1577: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `play_note': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1582: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1586: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1586: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1586: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `stop_note': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1591: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1596: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1596: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1596: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_pattern_row_channel_effect_type': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1436: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1440: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1440: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1440: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `get_pattern_row_channel_volume_effect_type': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1427: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1431: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1431: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1431: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_get_library_version': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:283: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:286: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:286: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:286: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_get_core_version': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:292: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:295: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:295: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:295: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_get_string': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:310: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZN9__gnu_cxx13new_allocatorIcE10deallocateEPcj': /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/c++/7.2.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/c++/7.2.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag': /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/c++/7.2.0/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZN9__gnu_cxx13new_allocatorIcE10deallocateEPcj': /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/c++/7.2.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_get_string': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:316: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:316: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:316: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_is_extension_supported': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:342: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:348: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:348: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:348: undefined reference to `__cxa_end_catch' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_could_open_probability2': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:465: undefined reference to `__gxx_personality_sj0' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZN7openmpt14logfunc_loggerD4Ev': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:55: undefined reference to `operator delete(void*, unsigned int)' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:55: undefined reference to `operator delete(void*, unsigned int)' /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `openmpt_could_open_probability2': /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:469: undefined reference to `__cxa_begin_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:469: undefined reference to `__cxa_end_catch' /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:469: undefined reference to `__cxa_end_catch' [... and so on for more than 12000 lines! ...] collect2: error: ld returned 1 exit status ERROR: libopenmpt >= 0.2.6557 not found using pkg-config
On 10/13/2017 1:05 PM, Reino Wijnsma wrote: > On 13-10-2017 0:27, James Almer <jamrial@gmail.com> wrote: >> On 10/12/2017 6:42 PM, Reino Wijnsma wrote: >>> On 12-10-2017 20:11, Helmut K. C. Tessarek <tessarek@evermeet.cx> wrote: >>>> I'm not sure why you guys have to make all these changes to the build >>>> process lately. >>>> >>>> All of a sudden ffmpeg does not compile anymore. During configure I get: >>>> >>>> ERROR: libbluray not found using pkg-config >>>> >>>> which worked perfectly 2 days ago. So, whatever changes you made, they >>>> screwed up other things. >>> Same here. I was about to compile another FFmpeg executable, but got >>> configure complaining about libbluray as well (note: I always use >>> --pkg-config-flags=--static). >>> I've worked around that by changing the pc-file >>> >>> prefix=/cygdrive/[...] >>> exec_prefix=${prefix} >>> libdir=${exec_prefix}/lib >>> includedir=${prefix}/include >>> >>> Name: libbluray >>> Description: library supporting Blu-ray playback >>> Version: 1.0.1 >>> Libs: -L${libdir} -lbluray >>> Libs.private: -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib >>> -lfreetype -lgdi32 >>> Cflags: -I${includedir} >>> >>> ...into: >>> >>> prefix=/cygdrive/[...] >>> exec_prefix=${prefix} >>> libdir=${exec_prefix}/lib >>> includedir=${prefix}/include >>> >>> Name: libbluray >>> Description: library supporting Blu-ray playback >>> Version: 1.0.1 >>> Requires: libxml-2.0, freetype2 >>> Libs: -L${libdir} -lbluray >>> Libs.private: -lgdi32 >>> Cflags: -I${includedir} >> Thanks a lot! You confirmed what i suspected. >> >> Guess we'll have to get libbluray to change their .pc file. >> >>> Next however was iLBC. I got "undefined reference to `pthread_once'" and >>> "ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix' >>> that. >>> >>> Now it's complaining about libmysofa: >>> >>> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f): >>> undefined reference to `inflateInit_' >>> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76): >>> undefined reference to `inflate' >>> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a): >>> undefined reference to `inflateEnd' >>> collect2: error: ld returned 1 exit status >>> ERROR: libmysofa not found >> Does libmysofa have a pkg-config file? Otherwise, guess i'll have to add >> -lz to its extralibs. > No, it does not. However,... > > enabled libmysofa && require libmysofa "mysofa.h" mysofa_load > -lmysofa -lz > > appending "-lz" here fixes the issue for me. Yes, i fixed it this way earlier today. > > > Next in line is libopenmpt. A LONG list of error-messages, saved and > attached as '/config_libopenmpt.log/'. > Also notice the warning on line 19 and the GCC 7.2.0 > undefined-reference-messages on line 134 and 135 for instance. > My '/libopenmpt.pc/' looks like: > > prefix=/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32 > exec_prefix=${prefix} > includedir=${prefix}/include > libdir=${exec_prefix}/lib > > Name: libopenmpt > Description: Tracker module player based on OpenMPT > Version: 0.3.1+release.autotools > Requires.private: zlib libmpg123 ogg vorbis vorbisfile > Libs: -L${libdir} -lopenmpt > Libs.private: > Cflags: -I${includedir} > > -- Reino > > > config_libopenmpt.log > > > [...] > require_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create > use_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create > check_pkg_config libopenmpt libopenmpt >= 0.2.6557 libopenmpt/libopenmpt.h openmpt_module_create > pkg-config --exists --print-errors libopenmpt >= 0.2.6557 > check_func_headers libopenmpt/libopenmpt.h openmpt_module_create -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg > check_ld cc -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg > check_cc -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib > BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c > 1 #include <libopenmpt/libopenmpt.h> > 2 #include <stdint.h> > 3 long check_openmpt_module_create(void) { return (long) openmpt_module_create; } > 4 int main(void) { int ret = 0; > 5 ret |= ((intptr_t)check_openmpt_module_create) & 0xFFFF; > 6 return ret; } > END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c > /cygdrive/[...]/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc > -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ > -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=pentium3 -O2 > -mfpmath=sse -msse -DCACA_STATIC -DLIBTWOLAME_STATIC -march=pentium3 -O2 > -mfpmath=sse -msse -std=c11 -fomit-frame-pointer -pthread -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/fribidi > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/bs2b -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -DLIBXML_STATIC > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libxml2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/freetype2 > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/fribidi > -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -c -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c > /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c: In function 'check_openmpt_module_create': > /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c:3:1: warning: 'openmpt_module_create' is deprecated [-Wdeprecated-declarations] > long check_openmpt_module_create(void) { return (long) openmpt_module_create; } > ^~~~ > In file included from /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.c:1:0: > /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include/libopenmpt/libopenmpt.h:645:55: note: declared here > LIBOPENMPT_API LIBOPENMPT_DEPRECATED openmpt_module * openmpt_module_create( openmpt_stream_callbacks stream_callbacks, void * stream, openmpt_log_func logfunc, void * loguser, const openmpt_module_initial_ctl * ctls ); > ^~~~~~~~~~~~~~~~~~~~~ > /cygdrive/[...]/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc > -Wl,--large-address-aware -Wl,--nxcompat,--dynamicbase -Wl,--as-needed > -Wl,--pic-executable,-e,_mainCRTStartup -I/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -L/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.exe /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.f7SNCo4C/test.o -lopenmpt -lz -lmpg123 -lvorbisfile -lvorbis -lm -logg -lshlwapi -lpthread -lcrypt32 So in here it's including the libraries libopenmpt.pc said it needed (using pkg-config --static). Are "-lshlwapi -lpthread -lcrypt32" extralibs you added manually, or were they derived from dependencies like libmpg123, vorbis, etc by pkg-config? Also, all the errors below mention functions from the c++ standard library, so it looks like libopenmpt.pc should be including -lstdc++ in Libs.private but it doesn't? I see that libopempt depends on PortAudiocpp to build, so i'm guessing that's indeed the case. See if adding -lstdc++ fixes it. If it does then it means that, before the commit that introduced these issues, a previous library you requested (maybe libgme) added -lstdc++ to the global ldflags. It would for that matter help a lot if you post the exact configure line you're using. > /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `ZN7openmpt6helper11make_uniqueINS_14logfunc_loggerEJPFvPKcPvERS5_EEESt10unique_ptrIT_St14default_deleteISA_EEDpOT0_': > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:200: undefined reference to `__gxx_personality_sj0' > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:201: undefined reference to `operator new(unsigned int)' > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_impl.hpp:201: undefined reference to `operator delete(void*, unsigned int)' > /cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/libopenmpt.a(libopenmpt_la-libopenmpt_c.o): In function `set_current_speed': > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1448: undefined reference to `__gxx_personality_sj0' > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_begin_catch' > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_end_catch' > /cygdrive/[...]/win32/libopenmpt-0.3.1+release.autotools/libopenmpt/libopenmpt_c.cpp:1453: undefined reference to `__cxa_end_catch'
On 13-10-2017 18:48, James Almer <jamrial@gmail.com> wrote: > Are "-lshlwapi -lpthread -lcrypt32" > extralibs you added manually, or were they derived from dependencies > like libmpg123, vorbis, etc by pkg-config? My configure line up until now with the manually added extra-libs: # ./configure --arch=x86 --target-os=mingw32 --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable-gray --enable-version3 --disable-debug --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-schannel --disable-txtpages --disable-w32threads --enable-avisynth --enable-avresample --enable-fontconfig --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gnutls *--extra-libs=-lcrypt32* --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC --enable-libfdk-aac --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc *--extra-libs=-lpthread* --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenmpt *--extra-libs=-lshlwapi* --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags='-march=pentium3' --extra-cflags=-O2 --extra-cflags='-mfpmath=sse' --extra-cflags=-msse --enable-static --disable-shared --prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 > See if adding -lstdc++ fixes it. It does. And since we're in the process of fixing the external library checks in 'configure', I've removed all --extra-libs and --extra-cflags entries from the configure line and I've made some changes to 'configure' until no more errors showed up. _Libcaca_ -enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas +enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas -DCACA_STATIC && add_cppflags -DCACA_STATIC (see https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/cross_compile_ffmpeg.sh#L1652-L1653 ) Otherwise you'll get "undefined reference to `_imp__caca_create_canvas'" and "ERROR: caca not found using pkg-config". _Libilbc_ On 13-10-2017 20:09, James Almer <jamrial@gmail.com> wrote: > With this, the check will include the needed pthreads ldflags when > pkg-config is invoked with the --static flag. My 'libilbc.pc' doesn't include -lpthread at all. Adding it here manually works for me. -enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc +enabled libilbc && require_pkg_config libilbc libilbc ilbc.h WebRtcIlbcfix_InitDecode -lpthread _Libmodplug_ -enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load +enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags -DMODPLUG_STATIC Although I've replaced libmodplug for libopenmpt, I know FFmpeg's 'configure' needs this. I don't know the "undefined reference"-message anymore. _Libopenmpt_ -enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create +enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ -lshlwapi Adding -lstdc++ fixes the 12000 errors I mentioned earlier, but without -lshlwapi you'd still get: /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224): undefined reference to `_imp__PathIsUNCW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670): undefined reference to `_imp__PathIsUNCW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b): undefined reference to `_imp__PathCombineW@12' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4): undefined reference to `_imp__PathIsUNCW@4' _Librubberband_ -enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new +enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ Same sort of error-messages as with libopenmpt. _Libsnappy_ -enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy +enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ Same sort of error-messages as with libopenmpt. _Libtwolame_ -enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame && +enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame -DLIBTWOLAME_STATIC && add_cppflags -DLIBTWOLAME_STATIC && Otherwise you'll get "undefined reference to `_imp__twolame_init'" and "ERROR: libtwolame not found". _Libzvbi_ -enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi && +enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new && Otherwise you'll get lots of "undefined reference to `pthread_mutex_[...]'" errors. zvbi-0.2.pc: prefix=/cygdrive/[...] exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: ZVBI Description: VBI Capturing and Decoding Library Requires: Version: 0.2.35 Libs: -L${libdir} -lzvbi -lm -lpthread -lwsock32 -lpthread -lm -liconv Cflags: -I${includedir} This way all the libraries get loaded, including -lpthread. And this works. No more errors during ./configure, but then... [...] CC fftools/ffmpeg_cuvid.o LD ffmpeg_g.exe /cygdrive/[...]/lib/libgnutls.a(sha256-ssse3-x86.o): warning: common of `_gnutls_x86_cpuid_s' overridden by definition /cygdrive/[...]/lib/libgnutls.a(x86-common.o): warning: defined here /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224): undefined reference to `_imp__PathIsUNCW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670): undefined reference to `_imp__PathIsUNCW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b): undefined reference to `_imp__PathCombineW@12' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b): undefined reference to `_imp__PathIsRelativeW@4' /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4): undefined reference to `_imp__PathIsUNCW@4' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0xe66): undefined reference to `_imp__CertGetCertificateContextProperty@16' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x1652): undefined reference to `_imp__CertOpenSystemStoreA@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x168e): undefined reference to `_imp__CertFindCertificateInStore@24' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x16b1): undefined reference to `_imp__CertGetCertificateContextProperty@16' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x192d): undefined reference to `_imp__CertFreeCertificateContext@4' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x193f): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2167): undefined reference to `_imp__CertOpenSystemStoreA@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21a3): undefined reference to `_imp__CertFindCertificateInStore@24' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21f0): undefined reference to `_imp__CertFreeCertificateContext@4' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x221d): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x23ad): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x249f): undefined reference to `_imp__CertOpenSystemStoreA@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x255b): undefined reference to `_imp__CertEnumCertificatesInStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x26db): undefined reference to `_imp__CertOpenSystemStoreA@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2735): undefined reference to `_imp__CertFindCertificateInStore@24' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x277b): undefined reference to `_imp__CertGetCertificateContextProperty@16' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x27cd): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x286f): undefined reference to `_imp__CertDeleteCertificateFromStore@4' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2ab5): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2d70): undefined reference to `_imp__PFXImportCertStore@12' /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2e7f): undefined reference to `_imp__CertFindCertificateInStore@24' /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xe0): undefined reference to `_imp__CertOpenSystemStoreA@8' /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xf5): undefined reference to `_imp__CertEnumCertificatesInStore@8' /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x1fb): undefined reference to `_imp__CertCloseStore@8' /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x230): undefined reference to `_imp__CertOpenSystemStoreA@8' collect2: error: ld returned 1 exit status make: *** [Makefile:107: ffmpeg_g.exe] Error 1 ...and I have no idea yet why this is happening. -- Reino
On 10/13/2017 6:30 PM, Reino Wijnsma wrote: > On 13-10-2017 18:48, James Almer <jamrial@gmail.com> wrote: >> Are "-lshlwapi -lpthread -lcrypt32" >> extralibs you added manually, or were they derived from dependencies >> like libmpg123, vorbis, etc by pkg-config? > My configure line up until now with the manually added extra-libs: > > # ./configure --arch=x86 --target-os=mingw32 > --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- > --pkg-config=pkg-config --pkg-config-flags=--static > --extra-version=Reino --enable-gray --enable-version3 --disable-debug > --disable-doc --disable-htmlpages --disable-manpages --disable-podpages > --disable-schannel --disable-txtpages --disable-w32threads > --enable-avisynth --enable-avresample --enable-fontconfig > --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gnutls > *--extra-libs=-lcrypt32* --enable-gpl --enable-libass --enable-libbluray > --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC > --enable-libfdk-aac --enable-libflite --enable-libfreetype > --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc > *--extra-libs=-lpthread* --enable-libmp3lame --enable-libmysofa > --enable-libopencore-amrnb --enable-libopencore-amrwb > --enable-libopenh264 --enable-libopenmpt *--extra-libs=-lshlwapi* > --enable-libopus --enable-librubberband --enable-libsnappy > --enable-libsoxr --enable-libspeex --enable-libtheora > --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis > --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 > --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg > --enable-libzvbi --extra-cflags='-march=pentium3' --extra-cflags=-O2 > --extra-cflags='-mfpmath=sse' --extra-cflags=-msse --enable-static > --disable-shared > --prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 > >> See if adding -lstdc++ fixes it. > It does. Ok, fixing this way then. Consider reporting this bug to libopenmpt, while at it. They should add -lstdc++ to their pkg-config file for static builds, instead of projects using the library having to workaround it. > And since we're in the process of fixing the external library > checks in 'configure', I've removed all --extra-libs and --extra-cflags > entries from the configure line and I've made some changes to > 'configure' until no more errors showed up. Thanks a lot for that! > > _Libcaca_ > > -enabled libcaca && require_pkg_config libcaca caca caca.h > caca_create_canvas > +enabled libcaca && require_pkg_config libcaca caca caca.h > caca_create_canvas -DCACA_STATIC && add_cppflags -DCACA_STATIC > (see > <https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/cross_compile_ffmpeg.sh#L1652-L1653>https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/cross_compile_ffmpeg.sh#L1652-L1653 > ) > > Otherwise you'll get "undefined reference to `_imp__caca_create_canvas'" > and "ERROR: caca not found using pkg-config". This i will not touch. It's unrelated to the commit that revamped the dependency checking code and is something the maintainer of the libcaca wrapper should solve. > > _Libilbc_ > > On 13-10-2017 20:09, James Almer <jamrial@gmail.com> wrote: >> With this, the check will include the needed pthreads ldflags when >> pkg-config is invoked with the --static flag. > My 'libilbc.pc' doesn't include -lpthread at all. Adding it here > manually works for me. It doesn't? That's weird, seeing "Libs.private: @PTHREAD_LIBS@" is listed in the source package. > > -enabled libilbc && require libilbc ilbc.h > WebRtcIlbcfix_InitDecode -lilbc > +enabled libilbc && require_pkg_config libilbc libilbc ilbc.h > WebRtcIlbcfix_InitDecode -lpthread This doesn't work as is. -lpthread will be used as part of the check, but afterwards it will not be added to libilbc's ldflags. require_pkg_config() doesn't work the same as require(), for some reason. I'll keep the current non pkg-config check then and add the pthreads ldflag to it. > > _Libmodplug_ > > -enabled libmodplug && require_pkg_config libmodplug libmodplug > libmodplug/modplug.h ModPlug_Load > +enabled libmodplug && require_pkg_config libmodplug libmodplug > libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags > -DMODPLUG_STATIC Again, i'll not change this. Needing project specific pre-processor flags is unrelated. > > Although I've replaced libmodplug for libopenmpt, I know FFmpeg's > 'configure' needs this. I don't know the "undefined reference"-message > anymore. > > _Libopenmpt_ > > -enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create > +enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ > -lshlwapi > > Adding -lstdc++ fixes the 12000 errors I mentioned earlier, but without > -lshlwapi you'd still get: > > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224): > undefined reference to `_imp__PathIsUNCW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670): > undefined reference to `_imp__PathIsUNCW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b): > undefined reference to `_imp__PathCombineW@12' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4): > undefined reference to `_imp__PathIsUNCW@4' Another lib they have to add to their pkg-config file then... This one seems to be Windows specific, though. Will add -lstdc++ for now. > > _Librubberband_ > > -enabled librubberband && require_pkg_config librubberband > "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new > +enabled librubberband && require_pkg_config librubberband > "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ > > Same sort of error-messages as with libopenmpt. Another broken pkg-config file... Will add the flag as a workaround. > > _Libsnappy_ > > -enabled libsnappy && require libsnappy snappy-c.h > snappy_compress -lsnappy > +enabled libsnappy && require libsnappy snappy-c.h > snappy_compress -lsnappy -lstdc++ > > Same sort of error-messages as with libopenmpt. Will add the flag, thanks. > > _Libtwolame_ > > -enabled libtwolame && require libtwolame twolame.h twolame_init > -ltwolame && > +enabled libtwolame && require libtwolame twolame.h twolame_init > -ltwolame -DLIBTWOLAME_STATIC && add_cppflags -DLIBTWOLAME_STATIC && > > Otherwise you'll get "undefined reference to `_imp__twolame_init'" and > "ERROR: libtwolame not found". Again, not going to change this. > > _Libzvbi_ > > -enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new > -lzvbi && > +enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 > libzvbi.h vbi_decoder_new && > > Otherwise you'll get lots of "undefined reference to > `pthread_mutex_[...]'" errors. > > zvbi-0.2.pc: > > prefix=/cygdrive/[...] > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: ZVBI > Description: VBI Capturing and Decoding Library > Requires: > Version: 0.2.35 > Libs: -L${libdir} -lzvbi -lm -lpthread -lwsock32 -lpthread -lm -liconv > Cflags: -I${includedir} > > This way all the libraries get loaded, including -lpthread. Yeah, this one definitely needs to switch to pkg-config, so i did that. Thanks. > > > And this works. No more errors during ./configure, but then... > > [...] > CC fftools/ffmpeg_cuvid.o > LD ffmpeg_g.exe > /cygdrive/[...]/lib/libgnutls.a(sha256-ssse3-x86.o): warning: common of > `_gnutls_x86_cpuid_s' overridden by definition > /cygdrive/[...]/lib/libgnutls.a(x86-common.o): warning: defined here > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224): > undefined reference to `_imp__PathIsUNCW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670): > undefined reference to `_imp__PathIsUNCW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b): > undefined reference to `_imp__PathCombineW@12' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b): > undefined reference to `_imp__PathIsRelativeW@4' > /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4): > undefined reference to `_imp__PathIsUNCW@4' These are from -lshlwapi. > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0xe66): > undefined reference to `_imp__CertGetCertificateContextProperty@16' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x1652): > undefined reference to `_imp__CertOpenSystemStoreA@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x168e): > undefined reference to `_imp__CertFindCertificateInStore@24' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x16b1): > undefined reference to `_imp__CertGetCertificateContextProperty@16' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x192d): > undefined reference to `_imp__CertFreeCertificateContext@4' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x193f): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2167): > undefined reference to `_imp__CertOpenSystemStoreA@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21a3): > undefined reference to `_imp__CertFindCertificateInStore@24' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21f0): > undefined reference to `_imp__CertFreeCertificateContext@4' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x221d): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x23ad): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x249f): > undefined reference to `_imp__CertOpenSystemStoreA@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x255b): > undefined reference to `_imp__CertEnumCertificatesInStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x26db): > undefined reference to `_imp__CertOpenSystemStoreA@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2735): > undefined reference to `_imp__CertFindCertificateInStore@24' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x277b): > undefined reference to `_imp__CertGetCertificateContextProperty@16' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x27cd): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x286f): > undefined reference to `_imp__CertDeleteCertificateFromStore@4' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2ab5): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2d70): > undefined reference to `_imp__PFXImportCertStore@12' > /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2e7f): > undefined reference to `_imp__CertFindCertificateInStore@24' > /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xe0): undefined > reference to `_imp__CertOpenSystemStoreA@8' > /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xf5): undefined > reference to `_imp__CertEnumCertificatesInStore@8' > /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x1fb): > undefined reference to `_imp__CertCloseStore@8' > /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x230): > undefined reference to `_imp__CertOpenSystemStoreA@8' And these from -lcrypt32 You had those two as custom extra-ldflags before the commit that introduced all these issues, or had to start doing it after it? > collect2: error: ld returned 1 exit status > make: *** [Makefile:107: ffmpeg_g.exe] Error 1 > > ...and I have no idea yet why this is happening.> > -- Reino
Hello On 10/14/2017 01:32 AM, James Almer wrote: > On 10/13/2017 6:30 PM, Reino Wijnsma wrote: >> On 13-10-2017 18:48, James Almer <jamrial@gmail.com> wrote: >>> Are "-lshlwapi -lpthread -lcrypt32" >>> extralibs you added manually, or were they derived from dependencies >>> like libmpg123, vorbis, etc by pkg-config? >> My configure line up until now with the manually added extra-libs: >> >> # ./configure --arch=x86 --target-os=mingw32 >> --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- >> --pkg-config=pkg-config --pkg-config-flags=--static >> --extra-version=Reino --enable-gray --enable-version3 --disable-debug >> --disable-doc --disable-htmlpages --disable-manpages --disable-podpages >> --disable-schannel --disable-txtpages --disable-w32threads >> --enable-avisynth --enable-avresample --enable-fontconfig >> --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gnutls >> *--extra-libs=-lcrypt32* --enable-gpl --enable-libass --enable-libbluray >> --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC >> --enable-libfdk-aac --enable-libflite --enable-libfreetype >> --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc >> *--extra-libs=-lpthread* --enable-libmp3lame --enable-libmysofa >> --enable-libopencore-amrnb --enable-libopencore-amrwb >> --enable-libopenh264 --enable-libopenmpt *--extra-libs=-lshlwapi* >> --enable-libopus --enable-librubberband --enable-libsnappy >> --enable-libsoxr --enable-libspeex --enable-libtheora >> --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC >> --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis >> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 >> --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg >> --enable-libzvbi --extra-cflags='-march=pentium3' --extra-cflags=-O2 >> --extra-cflags='-mfpmath=sse' --extra-cflags=-msse --enable-static >> --disable-shared >> --prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 >> >>> See if adding -lstdc++ fixes it. >> It does. > > Ok, fixing this way then. > > Consider reporting this bug to libopenmpt, while at it. They should add > -lstdc++ to their pkg-config file for static builds, instead of projects > using the library having to workaround it. I'm the libopenmpt maintainer. The problem is not solved by adding a hard-coded -lstdc++ to pkg-config Libs.private. This would only be correct if the C++ standard library is actually called "libstdc++" on the given platform. In particular, it is not called libstdc++ on FreeBSD and macOS (where LLVM libc++ is used by default) and libstdc++ might be available additionally. Android is even worse with its many available C++ standard libraries. Sadly, I am not aware of an easy and fail-proof way to detect the name of the C++ standard library from within the build system. As far as I know (please correct me if I am wrong), there is no gcc or clang option to actually return it (which could be used in an Autoconf check). For clang, it can even be chosen by the user when building by specifying appropriate CXXFLAGS (-stdlib=[libstdc++|libc++]). The problem is fundamentally inherent to statically linking libraries implemented in C++ with pkg-config. "Libs.private: -lstdc++" would fix the default Linux setup with GCC (and cross-compiling with MinGW), but would break FreeBSD and macOS. I'd rather prefer to not handle that and leave it up to the user who builds (the user knows which build system/target/platform system is used and can thus add the required C++ standard library when using static linking (or use the C++ compiler instead of the linker for linking everything, however this implies using a C++ compiler for libraries that themselves do not actually use C++ in the first place)). I am fully aware that this is not a perfect solution, but frankly, I do not think there is one available with the current infrastructure situation. There was also a discussion on the pkg-config mailing list not too long ago which further goes into details about the issue (talking about a different library, but it applies equally well to the ffmpeg / libopenmpt situation): > https://lists.freedesktop.org/archives/pkg-config/2016-August/001055.html Regard, Jörn
On 14-10-2017 1:32, James Almer <jamrial@gmail.com> wrote: > On 10/13/2017 6:30 PM, Reino Wijnsma wrote: >> _Libilbc_ >> On 13-10-2017 20:09, James Almer <jamrial@gmail.com> wrote: >>> With this, the check will include the needed pthreads ldflags when >>> pkg-config is invoked with the --static flag. >> My 'libilbc.pc' doesn't include -lpthread at all. Adding it here >> manually works for me. > It doesn't? That's weird, seeing "Libs.private: @PTHREAD_LIBS@" is > listed in the source package. I've seen it too in 'libilbc.pc.in', but still the final 'libilbc.pc' doesn't have it. On 14-10-2017 1:32, James Almer <jamrial@gmail.com> wrote: > On 10/13/2017 6:30 PM, Reino Wijnsma wrote: >> And this works. No more errors during ./configure, but then... >> [...] >> CC fftools/ffmpeg_cuvid.o >> LD ffmpeg_g.exe >> /cygdrive/[...]/lib/libgnutls.a(sha256-ssse3-x86.o): warning: common of >> `_gnutls_x86_cpuid_s' overridden by definition >> /cygdrive/[...]/lib/libgnutls.a(x86-common.o): warning: defined here >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb): >> undefined reference to `_imp__PathIsRelativeW@4' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224): >> undefined reference to `_imp__PathIsUNCW@4' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9): >> undefined reference to `_imp__PathIsRelativeW@4' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670): >> undefined reference to `_imp__PathIsUNCW@4' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b): >> undefined reference to `_imp__PathCombineW@12' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b): >> undefined reference to `_imp__PathIsRelativeW@4' >> /cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4): >> undefined reference to `_imp__PathIsUNCW@4' > These are from -lshlwapi. >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0xe66): >> undefined reference to `_imp__CertGetCertificateContextProperty@16' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x1652): >> undefined reference to `_imp__CertOpenSystemStoreA@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x168e): >> undefined reference to `_imp__CertFindCertificateInStore@24' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x16b1): >> undefined reference to `_imp__CertGetCertificateContextProperty@16' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x192d): >> undefined reference to `_imp__CertFreeCertificateContext@4' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x193f): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2167): >> undefined reference to `_imp__CertOpenSystemStoreA@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21a3): >> undefined reference to `_imp__CertFindCertificateInStore@24' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21f0): >> undefined reference to `_imp__CertFreeCertificateContext@4' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x221d): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x23ad): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x249f): >> undefined reference to `_imp__CertOpenSystemStoreA@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x255b): >> undefined reference to `_imp__CertEnumCertificatesInStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x26db): >> undefined reference to `_imp__CertOpenSystemStoreA@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2735): >> undefined reference to `_imp__CertFindCertificateInStore@24' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x277b): >> undefined reference to `_imp__CertGetCertificateContextProperty@16' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x27cd): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x286f): >> undefined reference to `_imp__CertDeleteCertificateFromStore@4' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2ab5): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2d70): >> undefined reference to `_imp__PFXImportCertStore@12' >> /cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2e7f): >> undefined reference to `_imp__CertFindCertificateInStore@24' >> /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xe0): undefined >> reference to `_imp__CertOpenSystemStoreA@8' >> /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xf5): undefined >> reference to `_imp__CertEnumCertificatesInStore@8' >> /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x1fb): >> undefined reference to `_imp__CertCloseStore@8' >> /cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x230): >> undefined reference to `_imp__CertOpenSystemStoreA@8' > And these from -lcrypt32 > You had those two as custom extra-ldflags before the commit that > introduced all these issues, or had to start doing it after it? I forgot to mention I also appended "-lcrypt32" to the gnutls-line: enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init -lcrypt32 It fixes "undefined reference to `_imp__Cert[...]'" and "ERROR: gnutls not found using pkg-config" (Windows only issue?) during ./configure, and it now seems _only_ during ./configure. ./configure --enable-gnutls --extra-libs=-lcrypt32 is still needed for making 'ffmpeg.exe'. And the same goes for -lshlwapi. I've applied your "[FFmpeg-devel] [PATCH] configure: add pthreads ldflags globally" and "[FFmpeg-devel] [PATCH] build: add global extralibs to pkg-config file generation" patch and I've successfully compiled a FFmpeg build with ./configure --enable-gnutls --extra-libs=-lcrypt32 --enable-libcaca --extra-cflags=-DCACA_STATIC --enable-libopenmpt --extra-libs=-lshlwapi --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC. -- Reino
diff --git a/configure b/configure index 2de19fab0f..211ce9e33b 100755 --- a/configure +++ b/configure @@ -3267,6 +3267,7 @@ scale_filter_deps="swscale" scale_qsv_filter_deps="libmfx" select_filter_select="pixelutils" showcqt_filter_deps="avcodec avformat swscale" +showcqt_filter_suggest="libfontconfig libfreetype" showcqt_filter_select="fft" showfreqs_filter_deps="avcodec" showfreqs_filter_select="fft"