[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #SFP-169619]: netcdf fortran 4.1.3 make error



> Hi Russ,
> 
> Sorry to bother you again, I still got some problems.
> 
> If I try this configure,
> lt_cv_ld_force_load=no CC=cc CFLAGS='-g -m64' CXX=g++ CXXFLAGS='-g -m64' 
> FC='gfortran -m64' FCFLAGS='-g' F77='gfortran -m64' FFLAGS='-g -O2' 
> CPPFLAGS='-DNDEBUG -DgFortran' LDFLAGS=-m64 LIBS=FLIBS=F90LIBS=   ./configure 
> --disable-netcdf-4
> 
> then I got this error,
> checking whether the C compiler works... no
> configure: error: in `/Users/cat/Desktop/netcdf-4.1.3':
> configure: error: C compiler cannot create executables

Oops, sorry, that's probably due to the "LIBS=FLIBS=F90LIBS=", which 
was supposed to be "LIBS='' FLIBS='' F90LIBS=''" and could instead
just be deleted.  Maybe my pasting it into the email omitted the
blank strings, which were just there to make sure that those 
environment variables hadn't been set to other values and exported.
> 
> But if I did this configure without LIBS=FLIBS=F90LIBS=
> lt_cv_ld_force_load=no CC=cc CFLAGS='-g -m64' CXX=g++ CXXFLAGS='-g -m64' 
> FC='gfortran -m64' FCFLAGS='-g' F77='gfortran -m64' FFLAGS='-g -O2' 
> CPPFLAGS='-DNDEBUG -DgFortran' LDFLAGS=-m64  ./configure --disable-netcdf-4
> 
> then ./configure is successful, however, when I did 'make check install', a 
> test failed,
> 
> PASS: test_varm3
> syntax error, unexpected SCAN_WORD, expecting SCAN_ATTR or SCAN_DATASET or 
> SCAN_ERROR
> context: <html^><head><title>Apache Tomcat/6.0.29 - Error 
> report</title><style><!--H1 
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>  H2 
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>  H3 
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>  BODY 
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B 
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P 
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>  {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> 
> </head><body><h1>HTTP Status 404 - /dods/dts/test.06.dds</h1><HR size="1" 
> noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> 
> <u>/dods/dts/test.06.dds</u></p><p><b>description</b> <u>The requested 
> resource (/dods/dts/test.06.dds) is not available.</u></p><HR size="1" 
> noshade="noshade"><h3>Ap
 ache Tomcat/6.0.29</h3></body></html>
> Error: NetCDF: Malformed or inaccessible DAP DDS
> FAIL: test_vara
> *** Test: var conversions on URL: 
> file:///Users/cat/Desktop/netcdf-4.1.3/ncdap_test/testdata3/test.02
> *** testing: string3
> *** testing: ch_data
> *** testing: int8_data
> *** testing: uint8_data
> *** testing: int8toint32_data
> *** testing: int82float32_data
> *** testing: int16_data
> *** testing: int16toint32_data
> *** testing: int162float32_data
> *** testing: int32_data
> *** testing: int32tofloat32_data
> *** testing: int32toilong_data
> *** testing: float32_data
> *** testing: float64_data
> PASS: t_dap3a
> ================================================
> 1 of 7 tests failed
> Please report to address@hidden
> ================================================
> make[4]: *** [check-TESTS] Error 1
> make[3]: *** [check-am] Error 2
> make[2]: *** [check-recursive] Error 1
> make[1]: *** [check] Error 2
> make: *** [check-recursive] Error 1

OK, that was just a problem with our test server for remote access to
data via OPeNDAP protocols.  You could get around the problem by
either specifying --disable-dap-remote-tests as a configure argument,
or by using version 4.2.0 or later that accessed the data through a
test server instead of the operational server.  But if you use a later
version of netCDF, the C library is a separate distribution from the 
Fortran library, so you'll have to build and install the C library first,
then tell the Fortran library where the C library was installed, as
explained here:

  http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html

If you don't want to go to that trouble, just disable the remote tests to
complete the build and install it.  It should still work for remote access.

--Russ


> Chih-Ping
> 
> On Sep 28, 2012, at 10:28 AM, Unidata netCDF Support wrote:
> 
> > Chih-Ping,
> >
> >> Thanks for your help!  I installed the latest Xcode 4.5 and redo netcdf 
> >> installation, however, I still got the same error, /usr/bin/libtool: 
> >> unknown option character `f' in: -force_load
> >
> > Hmm, I guess the OS-X libtool is not keeping up with the gnu libtool, which 
> > supports
> > the -force_load option.  But it can be tricky, using Gnu versions of tools 
> > with Apple's
> > gcc, for example, which has Apple additions not supported by Gnu tools.  It 
> > looks like
> > setting lt_cv_ld_force_load=no got you past that problem.
> >
> > I think we can solve this without needing to use a different libtool, 
> > because the error
> > below just looks like an attempt to mix 32-bit and 64-bit objects in the 
> > same library.
> > You need to either use all 32-bit ("-m32" flag on gcc and gfortran) or all 
> > 64-bit ("-m64"
> > flag on gcc and gfortran).  Depending on where you got them, the default 
> > for your gfortran
> > may be 32-bit, while the default for your gcc may be 64-bit.
> >
> > I think you can also use -arch i386 or -arch x86_64 to specify
> > the target machine architecture for 32-bit or 64-bit when using
> > Apple compilers.
> >
> > So set CFLAGS and FCFLAGS to include matching target architecture options.
> > For example, this worked for me:
> >
> >  make clean && CC=cc CFLAGS='-g -m32' CXX=g++ CXXFLAGS='-g -m32' 
> > FC='gfortran -m32' FCFLAGS='-g' F77='gfortran -m32' FFLAGS='-g -O2' 
> > CPPFLAGS='-DNDEBUG -DgFortran' LDFLAGS=-m32 LIBS= FLIBS= F90LIBS= 
> > ./configure --enable-netcdf-4 --with-hdf5=/share/ed/local/mort && make 
> > check install
> >
> > --Russ
> >
> >> If I set lt_cv_ld_force_load=no, then I got a new error, can you please 
> >> help me again,
> >>
> >> libtool: link: gfortran -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o 
> >> .libs/libnetcdff.5.dylib  .libs/fort-attio.o .libs/fort-control.o 
> >> .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o 
> >> .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o 
> >> .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o 
> >> .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o   
> >> .libs/libnetcdff.lax/libnetcdff90.a/netcdf.o 
> >> .libs/libnetcdff.lax/libnetcdff90.a/typeSizes.o   -L/usr/local/lib 
> >> ../liblib/.libs/libnetcdf.dylib -lm -lz -lcurl  -O2   -install_name  
> >> /usr/local/lib/libnetcdff.5.dylib -compatibility_version 7 
> >> -current_version 7.0 -Wl,-single_module
> >> libtool: link: dsymutil .libs/libnetcdff.5.dylib || :
> >> warning: no debug symbols in executable (-arch i386)
> >> libtool: link: (cd ".libs" && rm -f "libnetcdff.dylib" && ln -s 
> >> "libnetcdff.5.dylib" "libnetcdff.dylib")
> >> libtool: link: (cd .libs/libnetcdff.lax/lt1-libnetcdff90.a && ar x 
> >> "/Users/cat/Desktop/netcdf-4.1.3/fortran/../f90/.libs/libnetcdff90.a")
> >> libtool: link: ar cru .libs/libnetcdff.a  fort-attio.o fort-control.o 
> >> fort-dim.o fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o 
> >> fort-misc.o fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o 
> >> fort-varmio.o fort-varsio.o  
> >> .libs/libnetcdff.lax/lt1-libnetcdff90.a/netcdf.o 
> >> .libs/libnetcdff.lax/lt1-libnetcdff90.a/typeSizes.o
> >> /usr/bin/ranlib: archive member: .libs/libnetcdff.a(netcdf.o) cputype (7) 
> >> does not match previous archive members cputype (16777223) (all members 
> >> must match)
> >> /usr/bin/ranlib: archive member: .libs/libnetcdff.a(typeSizes.o) cputype 
> >> (7) does not match previous archive members cputype (16777223) (all 
> >> members must match)
> >> libtool: link: ranlib .libs/libnetcdff.a
> >> ranlib: archive member: .libs/libnetcdff.a(netcdf.o) cputype (7) does not 
> >> match previous archive members cputype (16777223) (all members must match)
> >> ranlib: archive member: .libs/libnetcdff.a(typeSizes.o) cputype (7) does 
> >> not match previous archive members cputype (16777223) (all members must 
> >> match)
> >> make[3]: *** [libnetcdff.la] Error 1
> >> make[2]: *** [all] Error 2
> >> make[1]: *** [all-recursive] Error 1
> >> make: *** [all] Error 2
> >
> > --Russ
> >
> >> On Sep 27, 2012, at 8:34 PM, Unidata netCDF Support wrote:
> >>
> >>> Hi,
> >>>
> >>>> I am trying to install netcdf-4.1.3 on my mac pro (OS 10.7.4, gfortran, 
> >>>> gcc).  I got an error (see below) when I was doing 'make'. I attached 
> >>>> config.log and Makefile. Can you please help me solve the problem.
> >>>>
> >>>> Thank you very much!
> >>>>
> >>>> Chih-Ping
> >>>>
> >>>> /usr/bin/libtool: unknown option character `f' in: -force_load
> >>>> Usage: /usr/bin/libtool -static [-] file [...] [-filelist 
> >>>> listfile[,dirname]] [-arch_only arch] [-sacLT]
> >>>> Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist 
> >>>> listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] 
> >>>> [-compatibility_version #] [-current_version #] [-seg1addr 0x#] 
> >>>> [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table 
> >>>> <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] 
> >>>> [-noall_load]
> >>>> make[3]: *** [libnetcdff.la] Error 1
> >>>> make[2]: *** [all] Error 2
> >>>> make[1]: *** [all-recursive] Error 1
> >>>> make: *** [all] Error 2
> >>>
> >>> It looks like the /usr/bin/libtool is too old to understand the 
> >>> "-force_load" option,
> >>> available on recent versions of libtool.  One workaround is to set the 
> >>> environment
> >>> variable
> >>>
> >>> lt_cv_ld_force_load=no
> >>>
> >>> before invoking the configure script.  Another is to update your version 
> >>> of the Xcode tools to get
> >>> a more recent version of libtool.
> >>>
> >>> Here's a previous note about this problem and the solution of setting 
> >>> lt_cv_ld_force_load=no:
> >>>
> >>> http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg10648.html
> >>>
> >>> --Russ
> >>>
> >>>
> >>>>
> >>>>
> >>>>
> >>>> Chih-Ping Wang
> >>>> Associate Researcher
> >>>> Dept. of Atmospheric and Oceanic Sciences
> >>>> MS 7115
> >>>> UCLA
> >>>> 405 Hilgard Ave.
> >>>> Los Angeles, CA 90095
> >>>> (O)310-825-1659
> >>>> http://www.atmos.ucla.edu/~cat
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>> Russ Rew                                         UCAR Unidata Program
> >>> address@hidden                      http://www.unidata.ucar.edu
> >>>
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: SFP-169619
> >>> Department: Support netCDF
> >>> Priority: Normal
> >>> Status: Closed
> >>>
> >>
> >> Chih-Ping Wang
> >> Associate Researcher
> >> Dept. of Atmospheric and Oceanic Sciences
> >> MS 7115
> >> UCLA
> >> 405 Hilgard Ave.
> >> Los Angeles, CA 90095
> >> (O)310-825-1659
> >> http://www.atmos.ucla.edu/~cat
> >>
> >>
> >>
> >>
> >>
> >>
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: SFP-169619
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> Chih-Ping Wang
> Associate Researcher
> Dept. of Atmospheric and Oceanic Sciences
> MS 7115
> UCLA
> 405 Hilgard Ave.
> Los Angeles, CA 90095
> (O)310-825-1659
> http://www.atmos.ucla.edu/~cat
> 
> 
> 
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: SFP-169619
Department: Support netCDF
Priority: Normal
Status: Closed