diff mbox

[FFmpeg-devel] configure: Make sure libpostproc can be found if -rpath-link doesn't work

Message ID CAB0OVGpUMW+66okNV9-Z4z5u5JjPy=TvQ6gAsdRv9Ay_6a9NGg@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Dec. 22, 2018, 11:04 p.m. UTC
2018-12-22 9:35 GMT+01:00, Michael Niedermayer <michael@niedermayer.cc>:
> On Sat, Dec 22, 2018 at 12:08:19AM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes running fate with "--enable-shared --enable-gpl" on
>> Solaris, the linker searches "libpostproc" in a
>> directory"-link=libpostproc".
>> Only tested on Solaris.
>>
>> Please comment, Carl Eugen
>
>>  configure |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> cb5e59b98712ca53aba4561f4d7fe365b3b1e2ff
>> 0001-configure-Make-sure-libpostproc-can-be-found-if-rpat.patch
>> From d69f1fcee41e803e5208bbfabdeb37a19e73814b Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Sat, 22 Dec 2018 00:04:43 +0100
>> Subject: [PATCH] configure: Make sure libpostproc can be found if
>> -rpath-link
>>  doesn't work.
>>
>> Solaris ld takes "-rpath-link=libpostproc" as indication to search in
>> "-link=libpostproc".
>> ---
>>  configure |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 2205751..04d3417 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6535,7 +6535,7 @@ EOF
>>
>>  # add some linker flags
>>  check_ldflags -Wl,--warn-common
>> -check_ldflags
>> -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
>> +check_ldflags
>> -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
>>  enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags
>> -Wl,-rpath,$libdir
>>  test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
>
> theres a second similar use of rpath in git (in tools/target_dec_fuzzer.c)

New patch attached.

Thank you, Carl Eugen

Comments

Carl Eugen Hoyos Dec. 27, 2018, 11:23 p.m. UTC | #1
2018-12-23 0:04 GMT+01:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
> 2018-12-22 9:35 GMT+01:00, Michael Niedermayer <michael@niedermayer.cc>:
>> On Sat, Dec 22, 2018 at 12:08:19AM +0100, Carl Eugen Hoyos wrote:
>>> Hi!
>>>
>>> Attached patch fixes running fate with "--enable-shared --enable-gpl" on
>>> Solaris, the linker searches "libpostproc" in a
>>> directory"-link=libpostproc".
>>> Only tested on Solaris.
>>>
>>> Please comment, Carl Eugen
>>
>>>  configure |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> cb5e59b98712ca53aba4561f4d7fe365b3b1e2ff
>>> 0001-configure-Make-sure-libpostproc-can-be-found-if-rpat.patch
>>> From d69f1fcee41e803e5208bbfabdeb37a19e73814b Mon Sep 17 00:00:00 2001
>>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>> Date: Sat, 22 Dec 2018 00:04:43 +0100
>>> Subject: [PATCH] configure: Make sure libpostproc can be found if
>>> -rpath-link
>>>  doesn't work.
>>>
>>> Solaris ld takes "-rpath-link=libpostproc" as indication to search in
>>> "-link=libpostproc".
>>> ---
>>>  configure |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 2205751..04d3417 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6535,7 +6535,7 @@ EOF
>>>
>>>  # add some linker flags
>>>  check_ldflags -Wl,--warn-common
>>> -check_ldflags
>>> -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
>>> +check_ldflags
>>> -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
>>>  enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags
>>> -Wl,-rpath,$libdir
>>>  test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
>>
>> theres a second similar use of rpath in git (in
>> tools/target_dec_fuzzer.c)
>
> New patch attached.

Patch applied.

Carl Eugen
diff mbox

Patch

From d69f1fcee41e803e5208bbfabdeb37a19e73814b Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sat, 22 Dec 2018 00:04:43 +0100
Subject: [PATCH] configure: Make sure libpostproc can be found if -rpath-link
 doesn't work.

Solaris ld takes "-rpath-link=libpostproc" as indication to search in "-link=libpostproc".
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 2205751..04d3417 100755
--- a/configure
+++ b/configure
@@ -6535,7 +6535,7 @@  EOF
 
 # add some linker flags
 check_ldflags -Wl,--warn-common
-check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
 enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir
 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
 
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index a94d5e6..2a6d525 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -30,7 +30,7 @@ 
   * build the fuzz target.
     Choose the value of FFMPEG_CODEC (e.g. AV_CODEC_ID_DVD_SUBTITLE) and
     choose one of FUZZ_FFMPEG_VIDEO, FUZZ_FFMPEG_AUDIO, FUZZ_FFMPEG_SUBTITLE.
-    clang -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp tools/target_dec_fuzzer.c -o target_dec_fuzzer -I.   -DFFMPEG_CODEC=AV_CODEC_ID_MPEG1VIDEO -DFUZZ_FFMPEG_VIDEO ../../libfuzzer/libFuzzer.a   -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -ldl -lxcb -lxcb-shm -lxcb -lxcb-xfixes  -lxcb -lxcb-shape -lxcb -lX11 -lasound -lm -lbz2 -lz -pthread
+    clang -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp tools/target_dec_fuzzer.c -o target_dec_fuzzer -I.   -DFFMPEG_CODEC=AV_CODEC_ID_MPEG1VIDEO -DFUZZ_FFMPEG_VIDEO ../../libfuzzer/libFuzzer.a   -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -ldl -lxcb -lxcb-shm -lxcb -lxcb-xfixes  -lxcb -lxcb-shape -lxcb -lX11 -lasound -lm -lbz2 -lz -pthread
   * create a corpus directory and put some samples there (empty dir is ok too):
     mkdir CORPUS && cp some-files CORPUS

-- 
1.7.10.4