[MITgcm-support] Building error on Macbook Pro
Ben Warfield
warfield at jhu.edu
Thu Aug 18 12:17:41 EDT 2011
Hi Martin,
Thank you for your response. I was able to fix the problem and it comes
from using 32bit g-fortran with 64bit gcc compilers. I had to set
CFLAGS='-arch i386' in the darwin_ia32_gfortran opt file after finding a
thread on this same issue here:
http://forge.csail.mit.edu/pipermail/mitgcm-support/2009-November/006348.html
Thanks again for your help!
Ben
On Thu, Aug 18, 2011 at 3:36 AM, Martin Losch <Martin.Losch at awi.de> wrote:
> Hi Ben,
>
> did you resolve your problem? If not, you seem to have a mismatch of the
> trailing underscores between your cc and fortran compilers:
> > "_csystemtime_", referenced from:
> > _timer_get_time__ in timers.o
> timers.o is generated by fortran and it's subroutines have 2 trailing
> underscores, while csystime has only one. Check your compilers (and flags).
> I am using (on a MacBookPro with 2.8GHz IntelCore 2 Duo and OSX 10.6.8)
>
> /usr/local/bin/gfortran -v
> Using built-in specs.
> COLLECT_GCC=/usr/local/bin/gfortran
>
> COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
> Target: x86_64-apple-darwin10.4.0
> Configured with: ../gcc-4.6-20101106/configure
> --enable-languages=c++,fortran
> Thread model: posix
> gcc version 4.6.0 20101106 (experimental) (GCC)
>
> and
>
> /usr/local/bin/gcc -v
> Using built-in specs.
> COLLECT_GCC=/usr/local/bin/gcc
>
> COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
> Target: x86_64-apple-darwin10.4.0
> Configured with: ../gcc-4.6-20101106/configure
> --enable-languages=c++,fortran
> Thread model: posix
> gcc version 4.6.0 20101106 (experimental) (GCC)
>
> and I also modified the default build options file, see attached. I
> downloaded the compilers from hpc.sourceforge.net (although not the
> recently updated version which should make the NOOPTFILES-line obsolete).
>
> Martin
>
>
> On Jul 28, 2011, at 10:17 PM, Ben Warfield wrote:
>
> > Hi,
> >
> > I am trying to run the basic example given in the documentation
> (../verification/exp2) however I continue to receive the following error
> messages when compiling (after 'make' command):
> >
> > ld: warning: in gsl_ieee_env.o, file was built for unsupported file
> format which is not the architecture being linked (i386)
> > ld: warning: in ptwrapper.o, file was built for unsupported file format
> which is not the architecture being linked (i386)
> > ld: warning: in setrlstk.o, file was built for unsupported file format
> which is not the architecture being linked (i386)
> > ld: warning: in sigreg.o, file was built for unsupported file format
> which is not the architecture being linked (i386)
> > ld: warning: in tim.o, file was built for unsupported file format which
> is not the architecture being linked (i386)
> > ld: warning: in timer_stats.o, file was built for unsupported file format
> which is not the architecture being linked (i386)
> > ld: warning: duplicate dylib /usr/local/lib/libgcc_s.1.dylib
> > Undefined symbols:
> > "_cusertime_", referenced from:
> > _timer_get_time__ in timers.o
> > "_timenow_", referenced from:
> > _timer_get_time__ in timers.o
> > "_csystemtime_", referenced from:
> > _timer_get_time__ in timers.o
> > ld: symbol(s) not found
> > collect2: ld returned 1 exit status
> > make: *** [mitgcmuv] Error 1
> >
> > The default genmake2 optfile that is used is darwin_ia32_gfortran, which
> I believe is correct. I did try forcing other suitable genmake2 optfiles
> while building the makefile but I continue to get this same error during
> compilation. I've also tried booting the computer in both 32 and 64 bit
> modes but no difference there either. This same error occurs when I tried
> another tutorial simulation as well (baroclinic gyre tutorial).
> >
> > I am on a Macbook Pro with a 2.4GHz Intel Core i5 running Mac OS X Snow
> Leopard. Any help would be greatly appreciated, thank you,
> >
> > Ben Warfield
> > Johns Hopkins University
> > Dept of Earth and Planetary Sciences
> > _______________________________________________
> > MITgcm-support mailing list
> > MITgcm-support at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-support
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20110818/dc0a6f3f/attachment.htm>
More information about the MITgcm-support
mailing list