[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #YTW-845739]: NetCDF 3.6.3 Failed to make
- Subject: [netCDF #YTW-845739]: NetCDF 3.6.3 Failed to make
- Date: Mon, 30 Jan 2012 14:35:29 -0700
Hi Chris,
> I'm having trouble with my installation of NetCDF 3.6.3 on my Mac OS X
> 10.7.2.
>
> The version is -n 3.6.3, I'm using gfortran 4.2.3 and GNU make 3.82. My
> code is as follows when I'm in the extracted netcdf-3.6.3 directory:
>
> export FC=gfortran
> export FFLAGS='-O3'
> ./configure --prefix/opt/gfortran/serial/netcdf3
>
> It goes through the configuration and then may next step is to command
> make, but then it gives me:
>
> make: *** No targets specified and no makefile found. Stop.
>
> I've included the config.log file.
The config.log shows the error (but it's not at the end of the config.log file,
unfortunately), that the C compiler and Fortran compiler are making objects of
different types. It looks like the C compiler is making 32-bit objects but
gfortran is making 64-bit objects:
configure:23876: gfortran -o conftest -O3 conftestf.o conftest.o
ld: warning: ignoring file conftest.o, file was built for unsupported file
format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_sub_", referenced from:
_MAIN__ in conftestf.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
configure:23879: $? = 1
configure:23902: error: Could not link conftestf.o and conftest.o
To get gfortran to make 32-bit i386 objects instead of 64-bit x86_64 objects,
you need to have it use the flag "-arch i386" or "-m32". Try using either of
the following two solutions, to see if one works:
1. Use
export FC="gfortran -arch i386"
or
2. Add the following before running configure:
export CFLAGS="-m32"
One of those ought to work. If not, you could do something similar to
get your C compiler to make 64-bit objects to match gfortran.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: YTW-845739
Department: Support netCDF
Priority: Normal
Status: Closed