HowTo for compiling (j)emboss under windows(tm)

voltigeur at worldonline.ch voltigeur at worldonline.ch
Mon Jun 30 14:22:31 UTC 2003


Hello,

At the end of this mail you will find the full version
of my HowTo for compiling (j)embos under windows. The
emboss part was modified according to the remarks, and
the jemboss part should be error-free (but surely not
the fastest or best way of compiling, at least it works).

Remarks, bug-reports are welcome,

Olivier Martin





EMBOSS:

1) install cygwin (http://www.cygwin.com). That's surely possible to 
compile without it, but it's making everything easier. You'll have
to install the base part plus the devel/make and devel/gcc packages. 
Before installing, see the first line of 2).
Then you'll have a linux-like command-line with tools like gcc and
make. The paths are then made according to the place where you installed
cygwin (ex: c\cygwin becomes /).

2) cygwin (and EMBOSS, and other linux/unix programs) don't like empty
spaces in names. Be sure that you install everything in places without
empty spaces (avoid "C:\Program Files\"). But by default cygwin uses your
windows login (something like "FirstName LastName") to create the 
/home/user_folder. Find and edit the /etc/passwd file and rename 
"FirstName LastName" into "FirstName_LastName" (or whatever else).

3) quit and restart the cygwin bash (you'll start in your "FirstName_LastName"
directory, you can delete "FirstName LastName"), download the EMBOSS 
package and cd to the place where you uncompressed it. Follow the usual

procedure:
./configure --without-x CFLAGS=-s
make
make install
 
--without-x because at one point the X11 library is required (even if 
useless) and without this flag the compilation would stop.
CFLAGS=-s to make the binaries smaller.

4) you can now use the EMBOSS programs from the cygwin bash like you
usually do from linux (but have a look at 5) and 6) before).

5) text files are different between windows and linux. If you save 
(for ex.) emboss.default from, say, notepad, EMBOSS programs parsing
this file won't be able to pass the first line and they will crash.
To overcome this, use wordpad instead, or convert the file to linux
format (various tools are available on internet, it's a common problem).

6) EMBOSS has then been built with cygwin. To use it from a ms-dos cmd
instead of the cygwin bash the cygwin1.dll has to be in your windows
PATH (since moving the .dll is discouraged, add another entry to the
PATH variable).



JEMBOSS (standalone version):

I assume you start with EMBOSS already installed (see previous part). 
Running the install script as described in the webpages of EMBOSS 
would also take care of EMBOSS as well as JEMBOSS, but on my computer 
that led to errors in the make process (missing includes).
I did not try to solve them (my goal was to make it work, not to debug
everything. That shouldn't be too difficult, though). The remarks made 
in the EMBOSS part are still relevant.

1) install the java2 sdk in a place without empty spaces (i.e. don't use
"C:\Program Files").

2) modify the Makefile.am file from the jemboss directory: change the
"javac org/emboss/jemboss/Jemboss.java" into 
"javac -classpath `cygpath -wp $CLASSPATH` org/emboss/jemboss/Jemboss.java"
at both places in the "all-local" part.
See "http://www.inonit.com/cygwin/faq/" for an explanation.

3) modify the install-server-jemboss.sh script located in the jemboss/utils
directory. As in 2), change the "javac..." lines (four of them). Change
also
the "$JAVA_HOME/bin/jar cvf $JEMBOSS/resources/wossname.jar wossname.out"
into
"$JAVA_HOME/bin/jar cvf `cygpath -w $JEMBOSS/resources/wossname.jar` wossname.out"

4) using the cygwin setup.exe, install devel/automake and devel/libtool

(that will also install other packages automatically).

5) run aclocal in the emboss directory. This will allow the various scripts
to take into account the changes made to the Makefile.am.

6) run the install script (install-jemboss-server.sh) as described in the

jemboss webpage. Warning: the default location for installation is not the
same
as for the emboss installation. Change it or you'll have binaries everywhere.

7) for some reason, the runJemboss.csh is incorrect (and there is no
csh under cygwin so it wouldn't work anyway). You have to change it
so that it will look like this:

#!/bin/bash
LD_LIBRARY_PATH="/usr/local/lib";
CLASSPATH="/usr/local/share/EMBOSS/jemboss/lib/soap.jar:/usr/local/share/EMBOSS/jemboss/lib/xerces.jar:/usr/local/share/EMBOSS/jemboss/lib/mail.jar:/usr/local/share/EMBOSS/jemboss/lib/activation.jar:/usr/local/share/EMBOSS/jemboss/lib/jakarta-regexp-1.2.jar:/usr/local/share/EMBOSS/jemboss/lib/jalview.jar:/usr/local/share/EMBOSS/jemboss/lib/jcert.jar:/usr/local/share/EMBOSS/jemboss/lib/jnet.jar:/usr/local/share/EMBOSS/jemboss/lib/jsse.jar:.";
(cd /usr/local/share/EMBOSS/jemboss; java -classpath `cygpath -wp $CLASSPATH`
org/emboss/jemboss/Jemboss local &)

8) check that your jemboss.properties is correct. Especially the paths must
begin with /cygwin/, or emboss will search in C:\usr\local\...

PS: for a reason that I can't understand, jemboss is searching for the 
binaries in a wrong place (for me /usr/local/share/EMBOSS/jemboss/PATH).
As I was in lack of wise solutions, I simply moved the binaries to this
place. There are smarter solutions, though.

PPS: this procedure should also apply to the server-client version of 
jemboss (not tested), as long as you take care of the various pitfalls
(i.e. using cygpath, not using paths with empty spaces,...).











More information about the EMBOSS mailing list