Running r8s on Unix system
1
3
Entering edit mode
4.8 years ago
rd446 ▴ 30

I'm running r8s as part of the CAFE manual to create an ultrametric tree for CAFE input.

I need to run r8s using a Unix operating system, but the download only comes with an OS X executable file.

After adding to the path, when I run the r8s command, my error is

cannot execute binary file

I have added executable permission of the file, which is a potential source of this error.

Additionally, the manual says that after I untar the file,

This sets up a subdirectory called dist which has four subdirectories, bin, sample, doc, and src.

In the 1.8 version of r8s, the dist directory opens up but the four subdirectories are not present. I have found answers online for solving this problem, but they rely on the subdirectories, which just flat out aren't there.

The manual speaks on the issue here as well,

If you are working on another UNIX operating system (so the OS X executable is obviously useless!), or if you are on OS X but wish to compile the program from its source code, a makefile is included that works on Linux machines and OS X (assuming you have installed FORTRAN correctly). There are known incompatibilities with some other compiler's libraries or headers, most of which are easy to resolve. You should own a copy of Numerical Recipes in C (Press et al. 1992 or more recent versions) to compile and run from source.

But I am having difficulty deciphering this.

Thank you.

r8s cafe • 4.5k views
ADD COMMENT
0
Entering edit mode
  1. Where did you download the tar file?
  2. There should be a makefile in the tar file. What happens when you cd into the directory and type make?
ADD REPLY
0
Entering edit mode

Unix operating system

That general term encompasses different types of unix OS's. A unix binary is not necessarily be going to be compatible across the spectrum of unix distributions out there. macOS, though based on BSD-unix has its own specific libraries/modifications. So it is unlikely that a binary made for macOS will work on a non-macOS system. You will need to find source code and try to compile it yourself (if that is a possibility).

Looks like the source for CAFE is available here (if that is the same CAFE you are using).

ADD REPLY
4
Entering edit mode
4.8 years ago
AK ★ 2.2k

Hi rd446,

You can try:

wget -q https://sourceforge.net/projects/r8s/files/r8s1.81.tar.gz \
  && tar -zxvf r8s1.81.tar.gz \
  && cd r8s1.81/src \
  && cp Makefile.linux Makefile.linux.bak \
  && sed -i 's/continuousML.o //' Makefile.linux \
  && sed -i 's/continuousML.o:/#continuousML.o:/' Makefile.linux \
  && make -f Makefile.linux

The resulting r8s1.81/src/r8s is the executable main program. Or if you use docker you can pull the image by: docker pull shkao/r8s:1.81.

ADD COMMENT
0
Entering edit mode

@SMK, still reported errors "make: * No rule to make target '/usr/include/sys/errno.h', needed by 'memory.o'. Stop." any suggestions?

ADD REPLY
0
Entering edit mode

hi @AK, the package seeks lack some files such as contunuousML.o, if you comment the line, it will result in a compile error

ADD REPLY
2
Entering edit mode

I had to combine solutions from the below sources: * http://phylobotanist.blogspot.com/2015/02/dated-phylogenies-my-experience-using.html * A: Running r8s on Unix system

> sudo apt install gfortran

> wget -q https://sourceforge.net/projects/r8s/files/r8s1.81.tar.gz \
  && tar -zxvf r8s1.81.tar.gz \
  && cd r8s1.81/src \
  && sed -i 's|/usr/include/sys/errno.h||' Makefile.linux \
  && sed -i 's/continuousML.o //' Makefile.linux \
  && sed -i 's/continuousML.o:/#continuousML.o:/' Makefile.linux \
  && make -f Makefile.linux
ADD REPLY
0
Entering edit mode

@Ric thanks for the tip it really worked in my case.

ADD REPLY

Login before adding your answer.

Traffic: 2006 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6