wtorek, 13 marca 2012

Compile sam2p on Fedora 16 64 bit

sam2p is a program for converting various types of graphics. Apparently very good.
Unfortunately not in Fedora distribution. Only Debian/Ubuntu.
First download he codes from google code page:

you'll need tif22pnm-0.14.tar.gz

unpack and untar tif22pnm and run:

two statuses should be announced at the end:
status tif22pnm: to be build
status png22pnm: to be build

if the second one is skipped, you need to install (with yum) libpng-devel.
now execute:
./do.sh compile   (they don't like to use make... hm)
and if you lucky you have both executables so copy them to /usr/bin or so.

If you are not lucky, you can have error message:
/usr/bin/ld: png22pnm.o: undefined reference to symbol 'pow@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pow@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line

Do what the linker tells you to do.
Open cc_help.sh in your favourite editor and add -lm, for instance to line with LIBS_PNG

execute again ./do.sh compile
if it worked copy both executables to /usr/bin or where you like.

some links concerning sam2p use:

Some remarks on use of sam2p:
  • if you get error addAlpha: too many colors, transparency impossible
 you can open the image in gimp  and re-save it with option Save color values from transparent pixels unticked.

Brak komentarzy:

Prześlij komentarz