1

I'm trying to install the FORTRAN program rmodel described at http://www.ucm.es/info/Astrof/software/rmodel/rmodel.html

./configure fails with the following error:

phym-ssweet2:rmodel-3.2.0 seasto$ sudo ./configure F77=gfortran
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking uname -s for detecting host operating system... Darwin
LDFLAGS set to... -L/opt/local/lib
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for main in -lX11... no
configure: error: X11 library not found

I tried pointing ./configure to the libraries using export CPPFLAGS=-I/opt/X11/include and export CPPFLAGS=-I/opt/X11/include LDFLAGS=-L/opt/X11/lib but to no avail. (These suggestions from Mountain Lion X11 libraries can't ./configure and Mountain Lion rvm install 1.8.7 x11 error)

Any suggestions would be greatly appreciated.

Community
  • 1
  • 1
sarahsweet
  • 31
  • 6

2 Answers2

1

This worked: ./configure F77=gfortran LDFLAGS=-L/opt/X11/lib. It seems the key was to not edit CPPFLAGS.

sarahsweet
  • 31
  • 6
0

Look in config.log, you should be able to see the compile/link line for the program used to test for X11 (conftest.c) and the reason for failure.

parkydr
  • 7,596
  • 3
  • 32
  • 42
  • `configure:3570: gcc -o conftest -g -O2 -L/opt/local/lib conftest.c -lX11 >&5 ld: library not found for -lX11` – sarahsweet Jan 06 '13 at 22:58