Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Like Tree2Likes
Hi! I work with Linux Mint and I am trying to install a software named r8s. When I type 'make', I have the following message: make: *** No rule to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2012
    Posts
    6

    problem to compile r8s


    Hi!

    I work with Linux Mint and I am trying to install a software named r8s.

    When I type 'make', I have the following message:
    make: *** No rule to make target '/usr/include/sys/errno.h', needed by 'memory.o'. Stop

    I checked the makefile, there is a line like this:
    memory.o: /usr/include/errno.h /usr/include/sys/errno.h

    I looked for errno.h, in my computer it is in /usr/include.

    Is there a way to fix my problem and install r8s correctly on my computer?

    Thanks in advance for your help.

    Cheers,

    Marie

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Finland
    Posts
    96
    Have you read the READ ME file?
    It usually gives you a few clues to how to load the file/program.

  3. #3
    Just Joined!
    Join Date
    Sep 2012
    Posts
    6
    Hi!

    Here is what is said in the manual:

    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.

    There's no README file for r8s but there is one in a subdirectory concerning a subprogram (as far as I understand):

    tn.f Subroutines TN and TNBC, which solve unconstrained and simply
    bounded optimization problems by a truncated Newton algorithm.
    You must adapt subroutine MCHPR1 to your machine. Comments in
    TN and TNBC explain their usage.

    blas.f Standard BLAS (basic linear algebra subroutines) used by tn.f,
    plus one nonstandard one (DXPY).


    Sample calling programs:

    mainc.f Customized, no bounds.
    maincb.f Customized, bounds on variables.
    mainfc.f Finite-differencing, customized, no bounds.
    mains.f Easy to use, no bounds.
    mainsb.f Easy to use, bounds on variables.

    Output from running these sample programs on an SGI 4D/240S computer
    (IEEE arithmetic) appears in the corresponding .out files:
    mainc.out is from mainc.f, maincb.out from maincb.f, etc.

    Thanks for your help!

    Marie

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,286
    Hi.

    I downloaded r8s 1.8 from http://loco.biosci.arizona.edu/r8s/r8s.dist.tgz

    I unpacked the compressed tar file with:
    Code:
    tar xvf r8s.dist.tgz
    I entered the dist directory, and looked for a README file, but didn't find one. I briefly looked at the makefile, noticed some comments about gcc and gfortran.

    I ran command make and it started with:
    Code:
    % make
    gcc   -g -std=c99 -pedantic     -c -o DrawTree.o DrawTree.c
    and (many lines later) finished with:
    Code:
    gcc   -o r8s  -L/usr/local/gfortran/lib  DrawTree.o TreeSim.o moment.o powell.o ConstrOpt.o MyUtilities.o WuLi.o DistrFuncs.o NRCvectorUtils.o distance.o penalty.o ObjFunc.o main.o relativeRates.o ReadNexusFile2.o  memory.o root3taxa.o TimeAlgorithms.o nextToken2.o storeNexusFile.o MinND.o TreeUtils.o structures.o blas.o tn.o TNwrapper.o continuousML.o ancestral.o covarion.o -lgfortran -lm
    resulting in an apparently good executable:
    Code:
    % ls -lgG r8s
    -rwxr-xr-x 1 539309 Sep 27 05:18 r8s*
    I was using:
    Code:
    OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
    Distribution        : Debian GNU/Linux 5.0.8 (lenny) 
    make GNU Make 3.81
    gfortran GNU Fortran (Debian 4.3.2-1.1) 4.3.2
    gcc (Debian 4.3.2-1.1) 4.3.2
    So I did not need to do anything in addition to the make in order to compile and link the code using the system and tools noted.

    I did not use MiNT, but my recollection is that at least one of the MiNT versions is based on Debian.

    I uploaded the output from make to makefile_out.txt so that you can see the entire process. I did not have any sample data so I do not know if the executable will actually work, especially noting the warnings about ASSIGN and assigned GOTO statements.

    I think my initial suggestion would be to make sure that you have the tools needed: make, gcc, gfortran.

    Best wishes ... cheers, drl
    Attached Files Attached Files
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Sep 2012
    Posts
    6
    Hi!

    Yes, I have make, gcc, and gfortran, all in /usr/bin.

    I have Linux Mint 13 Maya and I think it is based on Debian.

    Thanks for your help.

    Best,

    Marie

  6. #6
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,286
    Hi.

    The file /usr/include/sys/errno.h is really just an include:
    Code:
    % cat /usr/include/sys/errno.h
    #include <errno.h>
    so I modified the makefile as follows:
    Code:
    # memory.o: /usr/include/errno.h /usr/include/sys/errno.h
    memory.o: /usr/include/errno.h
    and the make finished as expected.

    Perhaps that will help you move forward ... cheers, drl
    ccmf likes this.
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  7. #7
    Just Joined!
    Join Date
    Sep 2012
    Posts
    6
    Hi drl!
    ,
    Thank you for the tip, it worked partially (at least I am moving...) but I had an error because g77 was missing. Then it was my understanding that gfortran was doing the same thing than g77 so, in the makefile, I replaced FC=g77 by FC=gfortran and now I have an error because lg2c is missing. So, should I install lg2c or is there another library that could be doing the job?

    I am sorry if my questions are naive but I am just a biologist trying to use something else than mac OS.

    Thanks again!

    Best,

    Marie

  8. #8
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,286
    Hi.

    Good work on modifying the makefile for FC.

    I found that I had a version of MiNT 11 in a virtual machine, so I transferred the r8s code from my 64-bit workstation to the 32-bit VM.

    I needed to install gfortran, but otherwise everything seemed to work correctly to produce an executable. I had apparently earlier installed the pseudo-package build-essential:
    Code:
    % apt-cache policy build-essential
    build-essential:
      Installed: 11.5ubuntu1
      Candidate: 11.5ubuntu1
    The versions of tools that I used were:
    Code:
    OS, ker|rel, machine: Linux, 2.6.38-8-generic, i686
    Distribution        : Linux Mint 11 Katya 
    gfortran GNU Fortran (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
    gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
    GNU Make 3.81
    and the make output is in the below-attached file make_mint_01.txt

    The result was the file:
    Code:
    % file r8s
    r8s: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
    I did not encounter any problem with lg2c; the search tools:
    Code:
    apt-file search lg2c
    and
    Code:
    locate lg2c
    produced no output.

    Where / when in the make process does the issue of lg2c come up?

    Best wishes ... cheers, drl
    Attached Files Attached Files
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  9. #9
    Just Joined!
    Join Date
    Sep 2012
    Posts
    6
    Hi!

    I don't remember when the issue with lg2c came up but I read that gfortran, contrary to g77, produces programs that do not require an extra libg2c runtime library. So I thought I could modify the makefile by replacing:
    LIBS = -lg2c -lm
    by:
    LIBS = -lm

    And now I have an error 1...

    I am attaching the result of my attempt.

    Thanks for the help.

    All the best,
    Attached Files Attached Files

  10. #10
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,286
    Hi.

    I think our makefiles must differ. The only change I made was on the memory.o line for the issue that you were encountering. Here is the top of the makefile I am using:
    Code:
    # Make file for r8s
    # Updated April 2003 for Linux and Mac OS 10.2. No other builds currently supported
    #
    
    FC = gfortran  # Fortran compiler; standard on Linux, may have to go fetch this on OS X! (get it from Fink)
    CC = gcc  # GNU C compiler
    LIBS =  -lgfortran -lm  # FORTRAN to C library, and standard C library 
    #LPATH = -L/usr/local/gfortran/lib  
    #LPATH = -L/usr/local/lib/gfortran  
    LPATH = -L/usr/local/gfortran/lib # correct location as of August 2011. 
    CFLAGS = -g -std=c99 -pedantic  # for debugging, etc. 
    #CFLAGS =  # usual case 
    
    
    OBJS =  DrawTree.o TreeSim.o moment.o powell.o ConstrOpt.o \
    MyUtilities.o WuLi.o DistrFuncs.o NRCvectorUtils.o distance.o penalty.o \
    ObjFunc.o main.o relativeRates.o ReadNexusFile2.o  memory.o root3taxa.o \
    TimeAlgorithms.o nextToken2.o storeNexusFile.o MinND.o TreeUtils.o structures.o \
    blas.o tn.o TNwrapper.o continuousML.o ancestral.o covarion.o
    
    
    #r8s: ${OBJS}
    #	${CC} -o r8s  ${OBJS} ${LIBS}
    # Use the following for MAC OS X
    r8s: ${OBJS}
    	${CC} -o r8s  ${LPATH} ${OBJS} ${LIBS}
    I noted where I downloaded my copy of r8s, and I have had no trouble compiling and linking it on the 2 Linux platforms where I tried it. (But remember that I did not try to execute it.)

    I do not have any paths that are of the form:
    Code:
    /usr/local/...
    -- everything seems to be in a default place that the linker knows about, so those lines do not contribute anything in my builds.

    Where did you get your copy? Does it have something that the publicly-available copy does not have? ... cheers, drl
    dvorikus likes this.
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •