[vlc-devel] [PATCH 5/6] contrib: protobuf: build protoc from contribs

Steve Lhomme robux4 at ycbcr.xyz
Tue Mar 24 17:06:12 CET 2020


On 2020-03-24 16:18, Rémi Denis-Courmont wrote:
> Le tiistaina 24. maaliskuuta 2020, 11.32.09 EET Steve Lhomme a écrit :
>> On 2020-03-23 17:23, Rémi Denis-Courmont wrote:
>>> Le maanantaina 23. maaliskuuta 2020, 17.27.26 EET Steve Lhomme a écrit :
>>>> @@ -44,3 +45,17 @@ protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz
>>>> .sum-protobuf cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
>>>> --with-protoc="$(PROTOC)" cd $< && $(MAKE) && $(MAKE) install
>>>>
>>>>    	touch $@
>>>>
>>>> +
>>>> +.sum-protoc: .sum-protobuf
>>>> +	touch $@
>>>> +
>>>> +protoc: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protoc
>>>> +	$(UNPACK)
>>>> +	mv protobuf-$(PROTOBUF_VERSION) protobuf-$(PROTOBUF_VERSION)-cpp
>>>> +	$(APPLY) $(SRC)/protobuf/protobuf-win32.patch
>>>> +	$(MOVE)
>>>> +
>>>> +.protoc: protoc
>>>> +	cd $< && $(BUILDVARS) ./configure $(BUILDCONF)
>>>> +	cd $< && $(MAKE) && $(MAKE) install
>>>> +	touch $@
>>>
>>> That will install plenty of crap that we most probably don't want to
>>> install.
>> As the great philosopher once said: storage is cheap.
>   > And it's not that much.
> 
> I'm not worried about disk space here. I'm worried about two things:
> 1) unexpected/unhandled new directories directly under contrib/
>    (currently, we only handle bin/)

It's local so we don't really have to do anything.

> 2) filename conflicts between multiple platforms in the same contrib/ directory
>    (currently, we prefix everything with the host triplet)

There's indeed a chance they might collide. But then the whole 
contrib/$host-program concept is wrong. For example a program may need 
some share/ content that may defer depending on the target.

In the case of protoc I think it's built dynamically and relies on the 
lib it has build. So we may need to use a prefixed folder for all 
targets handled.

For example
x86_64-gnu_linux/x86_64-w64-mingw32/bin
x86_64-gnu_linux/x86_64-w64-mingw32/lib
x86_64-gnu_linux/x86_64-w64-mingw32/share

or

x86_64-gnu_linux/i686-w64-mingw32/bin
x86_64-gnu_linux/i686-w64-mingw32/lib
x86_64-gnu_linux/i686-w64-mingw32/share


More information about the vlc-devel mailing list