compile error with HAS_GIF := 1 with 64bit Ubuntu 16.04
Closed this issue · 1 comments
Hi Francois,
I successfully compiled Cytosim on my machine with the following options in makefile.inc
in addition to a few modifications for compatibility with library paths and package names in Ubuntu 16.04
MACHINE := linux-ubuntu
COMPILER := gcc
MODE := D
HAS_MKL := 0
HAS_PNG := 1
HAS_GIF := 0
The repository package names changed when calling apt-get install
and the library locations of libpng.a
, libz.a
and libgif.a
from /usr/lib/
to /usr/lib/x86_64-linux-gnu/
.
When setting the option HAS_GIF := 1
the following error occurs during compilation. The files and libraries definitely exist. Could this be due to the newer version of libgif-dev? The version I have is 5.1.4
.
g++ -ffinite-math-only -ftrapping-math -Wfatal-errors -O0 -g3 -ggdb -Wall -Wno-unknown-pragmas -c -DHAS_PNG -DHAS_GIF src/gl/saveimage.cc -o build/saveimage.o
src/gl/saveimage.cc: In function ‘int SaveImage::saveColorGIF(FILE*, const GLubyte*, int, int)’:
src/gl/saveimage.cc:627:62: error: ‘MakeMapObject’ was not declared in this scope
ColorMapObject *colormap = MakeMapObject(colormap_size, 0);
^
compilation terminated due to -Wfatal-errors.
src/gl/makefile.inc:38: recipe for target 'build/saveimage.o' failed
make: *** [build/saveimage.o] Error 1
Thank you for your feedback.
Yes, this is likely due to incompatibility with the newer GIFLIB.
I would suggest that you use PNG, since it replaces all usage of GIF.