compiling code using gcc 4.0.0 and Mac OS X 10.4.5

Yolande Serra yserra@speakeasy.net
Sat Mar 4 02:01:00 GMT 2006


Hi,

Don't know if this is the right place to ask, but I've searched the  
web for several hours now and am desperate.

I recently switched from a G4 running 10.3.x to a G5 running 10.4.5  
and can now not compile FORTRAN code that compiled before. I am  
running gcc 4.0.0 and g77 3.4.3. After successfully compiling the  
code, when I try to run it I get the following error:

[cassava:~/data2/code/olr_filter_code] serra% stfilt_ncep
dyld: Library not loaded: /usr/lib/libSystem.B.dylib
   Referenced from: /Users/serra/data2/code/olr_filter_code/.// 
stfilt_ncep
   Reason: no suitable image found.  Did find:
         /usr/lib/libSystem.B.dylib: not a dylib
         /usr/lib/libSystem.B.dylib: not a dylib
         /usr/lib/libSystem.B.dylib: not a dylib
Trace/BPT trap

I've searched the web and there seems to be many reasons why the "no  
suitable image found" error comes up, as well as errors with  
libSystem.B.dylib. I just can't find a reference to my particular  
combination of errors listed here. My /usr/lib directory has this  
library:

-r-xr-xr-x   1 root  wheel   4314524 Feb 20 09:08 /usr/lib/ 
libSystem.B.dylib*
-r-xr-xr-x   1 root  wheel  22968480 May 26  2005 /usr/lib/ 
libSystem.B_debug.dylib*
-r-xr-xr-x   1 root  wheel  22932596 May 26  2005 /usr/lib/ 
libSystem.B_profile.dylib*
lrwxr-xr-x   1 root  wheel        17 Nov  3 17:43 /usr/lib/ 
libSystem.dylib@ -> libSystem.B.dylib

So what is the problem? Is it with gcc and its portability to the G5  
or is something wrong with my library setup?? Do I need to get gcc  
4.0.2?

To compile I use:

 >> make stfilt_ncep

where my make file looks something like:

F77 = g77
FFLAGS = -O3 -L.

stfilt_ncep  : stfilt_ncep.f  handle_err.f get_time.f libfilt.a ; $ 
(F77) $(FFLAGS) -I/sw/include -o stfilt_ncep stfilt_ncep.f  
handle_err.f get_time.f libfilt.a -L/sw/lib -lnetcdf -ludunits

libfilt.a : cfftb.o cfftb1.o cfftf.o cfftf1.o cffti.o cffti1.o  
cosqb.o cosqb1.o cosqf.o cosqf1.o cosqi.o cost.o costi.o ezfft1.o  
ezfftb.o ezfftf.o ezffti.o fastft.o fastftM.o passb.o passb2.o  
passb3.o passb4.o passb5.o passf.o passf2.o passf3.o passf4.o  
passf5.o pimach.o radb2.o radb3.o radb4.o radb5.o radbg.o radf2.o  
radf3.o radf4.o radf5.o radfg.o rfftb.o rfftb1.o rfftf.o rfftf1.o  
rffti.o rffti1.o sinqb.o sinqf.o sinqi.o sint.o sint1.o sinti.o ;  
libtool -static -o libfilt.a $(?)

cfftb.o  : cfftb.f cfftb1.o ; $(F77) $(FFLAGS)  -c $(?)
cfftb1.o : cfftb1.f passb4.o passb2.o passb3.o passb5.o passb.o ; $ 
(F77) $(FFLAGS)  -c $(?)
cfftf.o  : cfftf.f cfftf1.o ;  $(F77) $(FFLAGS)  -c $(?)
...etc

I've tried changing the optimization but that seems to do nothing.

Thanks for any help you can offer even if it is redirecting me to  
another help source.

-Yolande Serra

----------------------------------------------------------
Yolande Serra, Research Scientist
Department of Atmospheric Science
524 PAS Bldg
1118 E 4th St, P.O. Box 210081
University of Arizona
Tucson, AZ 85721-0081
Tel: (520) 621-6619; Fax: (520) 621-6833





More information about the Gcc-help mailing list