[FFmpeg-devel] [PATCH] configure: add check for pkg-config return value

Måns Rullgård mans
Mon Feb 28 14:16:24 CET 2011


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Monday 2011-02-28 12:09:30 +0000, M?ns Rullg?rd encoded:
>> Martin Storsj? <martin at martin.st> writes:
>> 
>> > On Mon, 28 Feb 2011, M?ns Rullg?rd wrote:
>> >
>> >> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> [...]
>> >> > Simplified and updated.
>> >> >
>> >> > Note: I'm not sure /dev/null is portable (what about MinGW/CygWin?).
>> >> >
>> >> > I already explained on irc the reason of the failure, it was due to a
>> >> > pkg-config limitation (pkg-config flags only reflect the condition of
>> >> > the system when a package was installed), but an additional check
>> >> > can't hurt too much and it saves the time wasted on debugging the
>> >> > consequential misconfiguration/compilation problems.
>> >> 
>> >> No, you never explained how the same link command can succeed in
>> >> configure and fail during make.
>> >
>> > If I understood the situation corretly, there never was such a case. Only 
>> > a case where missing dependency libs were brought in by another library 
>> > transitively. When linking to this dependency was disabled, the other 
>> > linking dependency broke. So he's not trying to fix any concrete breakage, 
>> > only wanting to notice breakage more clearly early on.
>> 
>> If the patch doesn't actually fix anything it is rejected.
>
> configure --enable-librtmp --enable-libopencv
> Package libssl was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libssl.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libssl', required by 'librtmp', not found
> [...]
>
> pkg-config complains that libssl is not installed (indeed it isn't,
> altough it was during librtmp compilation / installation), so -lrtmp
> is not added to the LDFLAGS.
>
> configure succeeds, but then when linking ffmpeg:
>
> /home/stefano/src/sastes-ffmpeg/libavformat/librtmp.c:157: undefined reference to `RTMP_Socket'
>
> Note: libcvaux links against librtmp:
>  ldd /usr/lib/libcvaux.so | grep rtmp
> 	librtmp.so.0 => /home/stefano/lib/librtmp.so.0 (0xb42e1000)
>
> I don't know why configure was able to pass the linking test and
> then linking ffmpeg doesn't work.

Could it have anything to do with the --as-needed flag?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list