Question: Running r8s on Unix system
gravatar for rd446
20 months ago by
East Carolina University
rd44610 wrote:

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 • 1.1k views
ADD COMMENTlink modified 20 months ago by AK2.0k • written 20 months ago by rd44610
  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 REPLYlink written 20 months ago by Ram32k

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 REPLYlink modified 20 months ago • written 20 months ago by GenoMax96k
gravatar for AK
20 months ago by
AK2.0k wrote:

Hi rd446,

You can try:

wget -q \
  && 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 COMMENTlink written 20 months ago by AK2.0k

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

ADD REPLYlink written 18 months ago by binlu19810

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 REPLYlink written 3 months ago by Yanpeng Chen0

I had to combine solutions from the below sources: * * A: Running r8s on Unix system

> sudo apt install gfortran

> wget -q \
  && 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 REPLYlink written 14 days ago by Ric330
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1874 users visited in the last hour