LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2007, 10:54 AM   #1
Executor21
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Can't get a Fortran compiler


Here's the story: I want to install Octave on my SuSe 10.1 system, but I couldn't find any binaries or rpm packages. So, I downloaded the source code and tried to install the thing:

Quote:
[computer-name]: # cd /usr/local/src
[computer-name]:/usr/local/src # ls
octave-2.1.73.tar.gz
[computer-name]:/usr/local/src # tar -xzvf octave-2.1.73.tar.gz
<snip: lists files>
[computer-name]:/usr/local/src # ls
octave-2.1.73 octave-2.1.73.tar.gz
[computer-name]:/usr/local/src # cd octave-2.1.73
[computer-name]:/usr/local/src/octave-2.1.73 # ls
aclocal.m4 ChangeLog.1 configure.in FLEX.patch liboctave mk-
acx_blas.m4 config.guess COPYING INSTALL Makeconf.in mov
acx_lapack.m4 config.h.in dlfcn INSTALL.OCTAVE Makefile NEW
autogen.sh config.log doc install-octave.in Makefile.in NEW
BUGS config.sub emacs install-sh mkinstalldirs oct
ChangeLog configure examples libcruft mkoctfile.in oct
[computer-name]:/usr/local/src/octave-2.1.73 # ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for library containing strerror... none required
defining man1dir to be $(mandir)/man1
defining man1ext to be .1
defining infofile to be $(infodir)/octave.info
defining octincludedir to be $(includedir)/octave-$(version)
defining fcnfiledir to be $(datadir)/octave/$(version)/m
defining localfcnfiledir to be $(datadir)/octave/site/m
defining localapifcnfiledir to be $(datadir)/octave/site/$(apiversion)/m
defining localverfcnfiledir to be $(datadir)/octave/$(version)/site/m
defining localfcnfilepath to be $(localverfcnfiledir)//:$(localapifcnfiledir)//:$(localfcnfiledir)//
defining octlibdir to be $(libdir)/octave-$(version)
defining archlibdir to be $(libexecdir)/octave/$(version)/exec/$(canonical_host_type)
defining localarchlibdir to be $(libexecdir)/octave/site/exec/$(canonical_host_type)
defining localverarchlibdir to be $(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)
defining octfiledir to be $(libexecdir)/octave/$(version)/oct/$(canonical_host_type)
defining localoctfiledir to be $(libexecdir)/octave/site/oct/$(canonical_host_type)
defining localapioctfiledir to be $(libexecdir)/octave/site/oct/$(apiversion)/$(canonical_host_type)
defining localveroctfiledir to be $(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)
defining localoctfilepath to be $(localveroctfiledir)//:$(localapioctfiledir)//:$(localoctfiledir)//
defining fcnfilepath to be .:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//
defining imagedir to be $(datadir)/octave/$(version)/imagelib
defining imagepath to be .:$(imagedir)//
defining __NO_MATH_INLINES avoids buggy GNU libc exp function
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C++ support for new friend template declaration... yes
checking if C++ library is ISO compliant... yes
checking for nm... nm
checking C++ ABI version used by g++... gnu_v3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking whether gcc accepts -mieee-fp... yes
adding -mieee-fp to XTRA_CFLAGS
checking whether g++ accepts -mieee-fp... yes
adding -mieee-fp to XTRA_CXXFLAGS
checking whether g++ prepends an underscore to external names... no
checking for sin in -lm... yes
checking for H5Pcreate in -lhdf5... no
checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking for MPI_Init in -lmpi... no
checking for IEEE 754 data format... yes
checking for ranlib... ranlib
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking for f2c... no
configure: WARNING: in order to build octave, you must have a compatible
configure: WARNING: Fortran compiler or f2c installed and in your path.
configure: error: See the file INSTALL for more information.
OK, so I need a Fortran compiler. Unfortunately, the DVD I used to install my system doesn't have one included (it has C and Java compilers, but apparently someone decided not to include the entire gcc collection). So I went online and found this. I followed the instructions:

Quote:
[computer-name]:/etc # tar -zxvf gfortran-linux.tar.gz
<snip: lists files>
[computer-name]:/etc # /etc/irun/bin/gfortran --version
GNU Fortran 95 (GCC) 4.3.0 20070111 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

[computer-name]:/etc # export LD_LIBRARY_PATH=/etc/irun/lib
No luck. When I try to compile Octave now, I get the exact same error message. I probably didn't quite understand exactly what the last two instructions in that link meant:

Quote:
(v) You will need to set LD_LIBRARY_FLAG or compile with -static.

(vi) Assuming that you are using bash, find your .bash_profile and add the line,

export LD_LIBRARY_PATH=$mypath/irun/lib alternatively, invoke bash at the command line and enter this previous line.
What should I do to get the Fortran compiler working?
 
Old 01-15-2007, 11:29 AM   #2
psisquare
Member
 
Registered: Sep 2004
Location: Germany
Distribution: Gentoo
Posts: 164

Rep: Reputation: 31
Technically speaking, the problem is that the directory containing the gfortran executable (/etc/irun/bin) is not on your $PATH. Thus, the quick solution is
Code:
export PATH="$PATH:/etc/irun/bin"
What really got you there is the strange paths they're using for those gfortran binaries you found. Normally, executables should end up in /usr/bin or /usr/local/bin. /etc is for configuration files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM
Fortran 95 Compiler alunduil Programming 2 08-16-2006 07:12 AM
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 08:59 AM
Fortran Compiler in SuSE? Krater47 Linux - Software 4 09-09-2004 12:10 AM
Fortran Compiler bob10a Linux - Software 14 07-19-2003 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration