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

Re: linking netcdf on mirage0



First, see if it will compile on a RHEL4 system like gust, hail, or squall.  
Netcdf was compiled on RHEL4 using the
system curl library, so it may cause issues trying to link to it under RHEL5 
(ie. mirage).  If not, I may have to
install a version of netcdf4 compiled under RHEL5.
--Joey

On 9/28/10 10:49 AM, Ben Foster wrote:
> 
> Hi,
> 
> I'm trying to build an f90 code on mirage0. ifort successfully
> compiles all source files, but there are undefined references
> in the link step, e.g. this is beginning of long list (see
> attached gmake.out):
> 
>  -L/fs/local/lib -lnetcdf -L/fs/local/lib -lhdf5_hl -lhdf5 -lsz -L/usr/lib64 
> -lz -L/fs/local/lib -lhdf5_hl -lhdf5 -lsz
> -L/usr/lib64 -lz
> /fs/local/lib/libnetcdf.a(liboc_la-ocinternal.o): In function `ocinitialize':
> ocinternal.c:(.text+0x2f5): undefined reference to `curl_version_info'
> /fs/local/lib/libnetcdf.a(liboc_la-http.o): In function `ocfetchhttpcode':
> 
> From my Makefile:
> 
>     FC       := ifort
>     FFLAGS := $(cpp_path) $(OPTIM) -r8 -fixed -diag-disable remark
>     LIBS   += -L$(LIB_NETCDF) -lhdf5_hl -lhdf5 -lsz -L/usr/lib64 -lz
> 
> where LIB_NETCDF = /fs/local/lib and cpp_path includes -I/fs/local/include.  
> I get the same problem if I remove the hdf5
> libs.
> 
> Please see attached Makefile.new (search on ifort), and gmake.out.
> My working dir is /ptmp/foster/tiegcm1.93 (building in tiegcm_trunk-linux)
> Thanks for any ideas.
> 
> --Ben Foster
>   NCAR/HAO x1595

From address@hidden  Tue Sep 28 13:12:37 2010
Return-Path: <address@hidden>
X-Original-To: address@hidden
Delivered-To: address@hidden
Received: by abbott.unidata.ucar.edu (Postfix, from userid 99)
        id 18F4561B57; Tue, 28 Sep 2010 13:12:37 -0600 (MDT)
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on
        uni7.unidata.ucar.edu
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
        version=3.3.0
Received: from bear.hao.ucar.edu (bear.hao.ucar.edu [128.117.16.209])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by abbott.unidata.ucar.edu (Postfix) with ESMTPS id 5DBB06158E
        for <address@hidden>; Tue, 28 Sep 2010 13:12:36 -0600 (MDT)
Received: from [128.117.16.155] (iris.hao.ucar.edu [128.117.16.155])
        by bear.hao.ucar.edu (8.13.8/8.13.8) with ESMTP id o8SJCZKq027194;
        Tue, 28 Sep 2010 13:12:36 -0600
Message-ID: <address@hidden>
Date: Tue, 28 Sep 2010 13:12:35 -0600
From: Ben Foster <address@hidden>
User-Agent: Thunderbird 2.0.0.24 (X11/20100721)
MIME-Version: 1.0
To: Craig Ruff <address@hidden>, address@hidden, address@hidden
Subject: Re: linking netcdf on mirage0
References: <address@hidden> <address@hidden>
In-Reply-To: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Craig Ruff wrote:
> Try adding -lcurl to your LIBS?
> 

Yep, this worked, thanks Craig. Also thanks to Dennis Heimbigner
and Joey Mendoza. This is resolved.

--Ben