configure:错误:Mountain Lion中找不到X11库

时间:2013-01-03 22:37:24

标签: x11 osx-mountain-lion configure

我正在尝试安装http://www.ucm.es/info/Astrof/software/rmodel/rmodel.html

中描述的FORTRAN程序rmodel

./ configure失败,出现以下错误:

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

我尝试使用export CPPFLAGS=-I/opt/X11/includeexport CPPFLAGS=-I/opt/X11/include LDFLAGS=-L/opt/X11/lib将./configure指向库但无济于事。 (来自Mountain Lion X11 libraries can't ./configureMountain Lion rvm install 1.8.7 x11 error

的这些建议

任何建议都将不胜感激。

2 个答案:

答案 0 :(得分:1)

这有效:./configure F77=gfortran LDFLAGS=-L/opt/X11/lib。 似乎关键是不要编辑CPPFLAGS。

答案 1 :(得分:0)

查看config.log,您应该能够看到用于测试X11(conftest.c)的程序的编译/链接行以及失败的原因。