Wednesday, November 10, 2010

EMBOSS


I made a stab at building EMBOSS but failed and succeeded, I think.

According to the adminguide, it requires zlib and libpng as well as gd. Since EMBOSS is set up for Linux, I will probably have to edit the config file to show where these libraries are on my machine.

I installed zlib and libpng to get matplotlib up and running (according to Gavin Huttley's wiki instructions).

Let's get gd. Downloaded gd-2.0.35.tar.gz from this page. According to the readme, it's the usual:

./configure
make install

(using sudo). And it has a problem:

gdft.c:1403:35: error: fontconfig/fontconfig.h: No such file or directory
gdft.c:1466: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gdft.c:1479: error: expected ')' before '*' token
gdft.c: In function 'font_pattern':
gdft.c:1516: error: 'FcPattern' undeclared (first use in this function)
gdft.c:1516: error: (Each undeclared identifier is reported only once
gdft.c:1516: error: for each function it appears in.)
gdft.c:1516: error: 'font' undeclared (first use in this function)
gdft.c:1517: error: 'FcChar8' undeclared (first use in this function)
gdft.c:1517: error: 'file' undeclared (first use in this function)
gdft.c:1518: error: 'pattern' undeclared (first use in this function)
gdft.c:1525: warning: assignment makes pointer from integer without a cast
gdft.c:1531: error: expected ')' before 'FcChar8'
gdft.c:1538: error: 'FC_FILE' undeclared (first use in this function)
gdft.c:1538: error: 'FcResultMatch' undeclared (first use in this function)
make[1]: *** [gdft.lo] Error 1
make: *** [install-recursive] Error 1

It seems to be related to a library called Fontconfig.

Get fontconfig-2.8.0.tar.bz2 from here. According to INSTALL do:

./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man

but it fails because there is no configure, why not? From a web search it seems that
autoconf processes configure.in to produce a configure script

so I try this:

$ autoconf
configure.in:36: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:38: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.in:59: error: possibly undefined macro: AM_CONFIG_HEADER
configure.in:64: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.in:65: error: possibly undefined macro: AM_PROG_LIBTOOL
configure.in:78: error: possibly undefined macro: AM_CONDITIONAL

and then do as before:

$ sudo ./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
./configure: line 1728: syntax error near unexpected token `fontconfig,'
./configure: line 1728: `AM_INIT_AUTOMAKE(fontconfig, 2.8.0)'

It looks like I'm supposed to use autoconf, but first I have to fix the above error.

After another web search, try adding this to configure.in

m4_pattern_allow([AM_INIT_AUTOMAKE])
m4_pattern_allow([AM_MAINTAINER_MODE])
m4_pattern_allow([AM_CONFIG_HEADER])
m4_pattern_allow([AC_LIBTOOL_WIN32_DLL])
m4_pattern_allow([AM_PROG_LIBTOOL])
m4_pattern_allow([AM_CONDITIONAL])

autoconf goes fine. Now:

$ sudo ./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man

./configure: line 1736: syntax error near unexpected token `fontconfig,'
./configure: line 1736: `AM_INIT_AUTOMAKE(fontconfig, 2.8.0)'

And I'm stuck. You can't feed fontconfig to AM_INIT_AUTOMAKE.No EMBOSS for me, it seems.

[UPDATE: I found instructions for installing GD here. It turns out I already had /usr/X11R6/include/fontconfig. The test of GD looks fine.

Followed simple instructions for EMBOSS and did:

./configure
make
make install

And after searching around for 10 minutes I finally ran:

/usr/local/share/EMBOSS/jemboss/runJemboss.sh

Now I have a window to play with (graphic at top of post)! ]