duplicate code in cinelerra that also exists in support libraries
Please help me to understand why. This is my make-config and I'm building from scratch on Debian-13(trixie). I've re-run autoconf and aclocal to support the newer macros/features. Also note that I'm leveraging the distro libraries over the in-source thirdparty ones. I have sucessfully built this way several years ago. ----------------------------------------------- #! /bin/bash CUDA_PATH=/usr \ ./configure \ --prefix=/sharebin/cingg2511 \ --with-cuda \ --with-nv \ --with-gl \ --with-xv \ --with-jobs=8 \ --with-alsa \ --enable-audiofile \ --with-thirdparty=no ----------------------------------------------- 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. So far the only dependency I've had to use from the thirdparty directory is libdpx since it is quite obscure and not a standard part of Debian. -Rob
On Tue, Nov 18, 2025 at 8:19 PM Rob Prowel <[email protected]> wrote:
Please help me to understand why.
This is my make-config and I'm building from scratch on Debian-13(trixie). I've re-run autoconf and aclocal to support the newer macros/features. Also note that I'm leveraging the distro libraries over the in-source thirdparty ones. I have sucessfully built this way several years ago.
----------------------------------------------- #! /bin/bash
CUDA_PATH=/usr \ ./configure \ --prefix=/sharebin/cingg2511 \ --with-cuda \ --with-nv \ --with-gl \ --with-xv \ --with-jobs=8 \ --with-alsa \ --enable-audiofile \ --with-thirdparty=no -----------------------------------------------
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.
So far the only dependency I've had to use from the thirdparty directory is libdpx since it is quite obscure and not a standard part of Debian.
-Rob
_______________________________________________ Cin mailing list -- [email protected] To unsubscribe send an email to [email protected]
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. 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$ --------------------------------------------------------------------
вс, 23 нояб. 2025 г., 00:35 Rob Prowel <[email protected]>:
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$ --------------------------------------------------------------------
participants (2)
-
Andrew Randrianasulu -
Rob Prowel