On 11/22/25 8:41 AM, Andrew Randrianasulu wrote:
>> build fails due to function redeclaration of
>>
>> int GifQuantizeBuffer(unsigned int Width,
>> unsigned int Height,
>> int *ColorMapSize,
>> GifByteType * RedInput,
>> GifByteType * GreenInput,
>> GifByteType * BlueInput,
>> GifByteType * OutputBuffer,
>> GifColorType * OutputColorMap);
>>
>> in filegif.h and filegif.C...but this method also exists in the
>> thirdparty library giflib. The reason it fails is that in the library
>> the pointers are const (as they should be) but in the duplicated code
>> under cinelerra directory they are not...and simply adding const in the
>> included code is not a fix, IMHO. Lets please evaluate why the library
>> code was duplicated within the project source in the first place.
>> giflib is not only available under the thirdparty directory, but is a
>> common library on most linux distros. It seems odd that it's both
>> referenced from the library AND duplicated in-source.
>
> Because this function at some point disappeared from official giflib ....
>
> I guess adding version defines around this piece of code will be
> correct course of action.
>
Thanks for the followup. So my point of confusion is that the Debian
giflib version says 5.2.2 and it does include the Quant function...while
the sourceforge version does not.
I'd suggest that while there are multiple variants of the same version
out there in the wild then the only giflib allowed during compile should
be the one from the cinelerra git repo. ie forced inclusion of the git
repo one.
I think I run into this problem while building on FreeBSD first, where I completely disable thirdparty libs. So, proper proper way to deal with this seems to check function's existence in system giflib header and compile or not our copy according to result of test at ./configure time (if func_exist && giflib_not_from_thirdparty ...)
I'll try to cook up such patch.
In any case I'll pull the fix once it's in the git repo.
thanks!
--------------------------------------------------------------------
rprowel@files:~/programming/cingg/cinelerra-5.1/thirdparty/src/giflib-5.2.2$
diff gif_lib.h /usr/include/gif_lib.h
214a215,223
> Color table quantization
>
******************************************************************************/
> int GifQuantizeBuffer(unsigned int Width, unsigned int Height,
> int *ColorMapSize, const GifByteType *RedInput,
> const GifByteType *GreenInput,
> const GifByteType *BlueInput,
> GifByteType *OutputBuffer, GifColorType
*OutputColorMap);
>
>
/******************************************************************************
rprowel@files:~/programming/cingg/cinelerra-5.1/thirdparty/src$ apt list
libgif-dev
libgif-dev/stable,now 5.2.2-1+b1 amd64 [installed]
rprowel@files:~/programming/cingg/cinelerra-5.1/thirdparty/src$
--------------------------------------------------------------------