[vlc-devel] [PATCH] contrib: allow using prebuilt packages when cross-compiling

Steve Lhomme robux4 at ycbcr.xyz
Thu Jan 30 16:37:57 CET 2020


On 2020-01-30 16:34, Alexandre Janniaux wrote:
> Hi,
> 
> While I want such patch as much as you want, this doesn't
> respect the original intent of this, which is avoiding using
> system libraries for targets when we don't want to, so it
> should probably be enabled with an option somehow imho.
> 
> An example of such issue would be linking some system
> library while building for android, because you have an
> environment alike available system-wide for other purpose,
> and not shipping the shared object that was linked.

That's a side effect of using pkg-config incorrectly (wrong 
PKG_CONFIG_LIBDIR, direct pkg-config instead of $TRIPLET-pkg-config, 
etc). When using pkg-config properly you don't need to care if you're 
going to hit system libraries while cross-compiling, because it will 
never find them.
> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Thu, Jan 30, 2020 at 04:13:02PM +0100, Steve Lhomme wrote:
>> In the case of Raspbian there's a heavily patched libavcodec which we can
>> access through pre-built packages.
>> Qt cross compiling also a major PITA which we can avoid this way.
>> ---
>>   contrib/src/main.mak | 5 +----
>>   1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
>> index 27722baf513..1b7ff3190f3 100644
>> --- a/contrib/src/main.mak
>> +++ b/contrib/src/main.mak
>> @@ -45,13 +45,10 @@ ifeq ($(ARCH)-$(HAVE_WIN32),aarch64-1)
>>   HAVE_WIN64 := 1
>>   endif
>>
>> +need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
>>   ifdef HAVE_CROSS_COMPILE
>> -need_pkg = 1
>> -else
>>   ifeq ($(findstring mingw32,$(BUILD)),mingw32)
>>   need_pkg = $(shell PKG_CONFIG_LIBDIR="${PKG_CONFIG_PATH}" $(PKG_CONFIG) $(1) || echo 1)
>> -else
>> -need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
>>   endif
>>   endif
>>
>> --
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list