Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

X11-Fortran Problems

Hello to all,


I am in the process of compiling a Fortran code on my machine. I'm running 10.7.3 and compiling using gfortran. It was originally written on a Linux box and it has been successfully compiled on Linux Mint using X11.


The code requires two separate steps to compile the program. The first step compiles the graphics and gets X11 going while the second step compiles the rest of the code. It uses two makefiles, one for each step. I'm comfortable with using makefiles. I have gotten throught the entire compilation process without erroring out. I'm able to run the codes but the graphics don't work. An X11 window pops up but there are a bunch of lines simply stretching all across the window. Hence, I think the problem lies with my graphics compilation step.


There is a line in the graphics makefile that reads:

LINKLIB = -L/usr/X11/lib -lX11


My X11 library is in /usr/X11/lib and I verified that. I'm also using the following Fortran flags (double precision)

FFLAGS = -O3 $(DP)


Are there any thoughts as to why the graphics would be bombing on my machine?


Thanks.

iMac, Mac OS X (10.7.3)

Posted on Mar 29, 2012 7:17 AM

Reply
20 replies

Jun 4, 2014 5:54 AM in response to jgibbs1

Jgibbs1,


Are you trying to compile XFoil or MSES? MSES is built out of XFoil, and they both have the same coupled inviscid/viscous boundary layer equation solution engine. I would also imagine the flags would be similar. At this point in the workflow, I had already built the Orr-Sommerfeld database.


Are you having problem with the graphics portion of the program, numerical iterations, or simply program operation? I had problems with graphics (see earlier in this string) and realized it was a precision issue.


At the end fo the day, here are the flags that I found worked for me (10.7.x).


FLG = -O -fdefault-real-8 -fdefault-double-8 -fdollar-ok


Good luck, and let us know how it goes.

Jun 10, 2014 11:25 AM in response to aerohead

Hi Aerohead,

Thanks so much for your response. I was able to make some progress but still ran into some trouble:

I am trying to build MSES. When using the new flags and trying to compile the orr-sommerfeld database I got the following error:


gfortran -o osgen osgen.o io.o spline.o getarg0.o

ld: library not found for -lcrt1.10.5.o

collect2: ld returned 1 exit status

make: *** [osgen] Error 1


I am guessing this is from the first executable line in the makefile for double precision:

osgen: osgen.o io.o spline.o getarg0.o

$(FC) -o osgen osgen.o io.o spline.o getarg0.o $(FTNLIB)


I later downloaded the source for xfoil and was able to successfully compile its plot library but had the same problem with its data base. It looks like now, I need figure out how to get the library for -lcrt1.10.5.o

Any ideas? (I am running Mac OSX 10.9.3 and have xCode installed)


-Jon

Jul 5, 2014 10:40 AM in response to jgibbs1

Hi Jon,


Sorry for the slow reply. You're stretching my memory and dusting off a lot of old shelves... That's curious that you can compile XFoil but not MSES. Are you using the most recent version of gfortran?


I've never seen the -lcrt1.10.5 error before. Indeed, it looks like you're missing part of a library. Did you upgrade to Mavericks from Mountain Lion, or is it a native machine with Mavericks installed on it when you bought it? I've had problems upgrading from OS to OS before. I'm trying to remember the details, and I can't, but I do recall that I had to obtain a library, or update a library. I probably did it via Macports, but don't quote me on that.


Have you made any more progress from when you first posted to the board?


Sorry I can't be much more help...


Aerohead

X11-Fortran Problems

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.