Note_ the below is to show how to configure & get cinepaint to build it (cinepaint), though it appears to Not be that useful/usable in Debian/Ubuntu. So really just for info purposes. Whether it works well in a supported distro no clue, you'd have to try
Your best tool is to use synaptic & search a truncated name of missing, usually looking a -dev package.
Searching cms will return results for both liblcms1-dev & liblcms2-dev, which one is needed you'd have to see.
fltk will likewise return 2 possible, libfltk1.1-dev & libfltk1.3-dev (I'd say the earlier are good for both
What you want to do is keep running the ./configure until it fills in fully, just because it meets the min to build doesn't mean you'll get all you may want. Read back thru the full configure each time.
So with a little ./configure > search in synaptic, install a -dev, ect. get this -
In addition to the 2 mentioned packages above (liblcms1-dev libfltk1.1-dev
GTK CinePaint Version 1.0-4
Gtk2 toolkit yes 2.24.17
DnD support yes X11/Xmu
littleCMS yes lcms 1.19
Plug-ins with external dependencies:
Python plug-in: no
OpenEXR plug-in: yes OpenEXR 1.6.1
Tiff plug-in: yes
PNG plug-in: yes libpng 1.2.49
Jpeg plug-in: yes
Print plug-in: yes Gutenprint 5.2.9
FLTK dependent plug-ins: yes bracketing_to_hdr collect pdf
Thread dependent plug-ins: yes icc_examine
Flex dependent plug-ins: yes iol
The deps above in red will enable the red configure option, you don't want them as it likely will cause a build error that I've no reason to look in to...
The other issue that some of the individual makefiles (makefile.am in various folders) have their linking in the wrong order so your build will fail. The proper way would be to identify which ones & patch. In this case no reason to as the app will likely not be worth using or using very often. A muck around all the linking issues will be to use an LDFLAGS= in the configure.
So if you wanted to try install the above mentioned packages, make sure the red ones are not installed.
Then configure with -
screen 3 shows 1 ex. of a makefile that was ordered wrong, -lX11 -lstdc++ -lm are at the beginning (& still are, hence "muck around"), the LD flag added them to the end where they belong
./configure LDFLAGS="-lX11 -lstdc++ -lm"
If it succeeds then a make & sudo make install followed by a sudo ldconfig
The reason files don't open is None of the folder paths are filled in, see screen 2 for filled in here. The palette & gradients paths, if enabled will segfault cinepaint, so don't
Edit: read here for some alt.