Re: [netcdfgroup] 4.1.2-beta1 build fails on macos x

Roy,

I got the same thing using gcc/gfortran from hpc.sourceforge.net/.  But
then it all worked fine when I set

  CFLAGS=-m32 
  FCFLAGS=-m32
  CXXFLAGS=-m32
  export CFLAGS FCFLAGS CXXFLAGS

before running configure.  Maybe like mine, your libhdf5.a was compiled
with "-m32".

--Russ

> I am running 10.6.4, compiling static, to a local directory, using fink compi
> lers.  make ran okay. "make check" failed as follows:
> 
> ==================
> > All 2 tests passed
> > ==================
> > Making check in ncdump
> > make  check-recursive
> > Making check in cdl4
> > make[3]: Nothing to be done for `check'.
> > Making check in expected4
> > make[3]: Nothing to be done for `check'.
> > make  rewrite-scalar ctest ctest64 ncdump tst_utf8 tst_create_files tst_h_r
> dc0 tst_group_data tst_enum_data tst_opaque_data tst_string_data tst_vlen_dat
> a tst_comp tst_comp2 tst_nans tst_special_atts tst_unicode tst_fillbug
> > depbase=`echo rewrite-scalar.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> >     /sw/bin/gcc-4 -DHAVE_CONFIG_H -I. -I.. -I../fortran  -I../include -I../
> nc_test -I../liblib  -I/netcdf4Static/local/include -I/netcdf4Static/local/in
> clude -I/netcdf4Static/local/include -I/sw/include   -g -O2 -MT rewrite-scala
> r.o -MD -MP -MF $depbase.Tpo -c -o rewrite-scalar.o rewrite-scalar.c &&\
> >     mv -f $depbase.Tpo $depbase.Po
> > /bin/sh ../libtool --tag=CC   --mode=link /sw/bin/gcc-4  -g -O2   -o rewrit
> e-scalar rewrite-scalar.o -lm ../liblib/libnetcdf.la  -L/netcdf4Static/local/
> lib -lhdf5_hl -lhdf5 -L/netcdf4Static/local/lib -lz -L/netcdf4Static/local/li
> b -lsz -L/sw/lib -lcurl 
> > libtool: link: /sw/bin/gcc-4 -g -O2 -o rewrite-scalar rewrite-scalar.o  ../
> liblib/.libs/libnetcdf.a -L/netcdf4Static/local/lib -L/sw/lib /netcdf4Static/
> local/lib/libhdf5_hl.a /netcdf4Static/local/lib/libhdf5.a -lm -lz /netcdf4sta
> tic/local/lib/libsz.dylib /sw/lib/libcurl.dylib
> > depbase=`echo ctest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> >     /sw/bin/gcc-4 -DHAVE_CONFIG_H -I. -I.. -I../fortran  -I../include -I../
> nc_test -I../liblib  -I/netcdf4Static/local/include -I/netcdf4Static/local/in
> clude -I/netcdf4Static/local/include -I/sw/include   -g -O2 -MT ctest.o -MD -
> MP -MF $depbase.Tpo -c -o ctest.o ctest.c &&\
> >     mv -f $depbase.Tpo $depbase.Po
> > /bin/sh ../libtool --tag=CC   --mode=link /sw/bin/gcc-4  -g -O2   -o ctest 
> ctest.o -lm ../liblib/libnetcdf.la  -L/netcdf4Static/local/lib -lhdf5_hl -lhd
> f5 -L/netcdf4Static/local/lib -lz -L/netcdf4Static/local/lib -lsz -L/sw/lib -
> lcurl 
> > libtool: link: /sw/bin/gcc-4 -g -O2 -o ctest ctest.o  ../liblib/.libs/libne
> tcdf.a -L/netcdf4Static/local/lib -L/sw/lib /netcdf4Static/local/lib/libhdf5_
> hl.a /netcdf4Static/local/lib/libhdf5.a -lm -lz /netcdf4static/local/lib/libs
> z.dylib /sw/lib/libcurl.dylib
> > Undefined symbols:
> >   "_main", referenced from:
> >       start in crt1.10.5.o
> > ld: symbol(s) not found
> > collect2: ld returned 1 exit status
> > make[4]: *** [ctest] Error 1
> > make[3]: *** [check-am] Error 2
> > make[2]: *** [check-recursive] Error 1
> > make[1]: *** [check] Error 2
> > make: *** [check-recursive] Error 1
> > 
> 
> -Roy
> 
> On Jul 12, 2010, at 1:04 PM, Jeff Whitaker wrote:
> 
> > On 7/12/10 2:03 PM, Sean McBride wrote:
> >> On Mon, 12 Jul 2010 13:11:02 -0600, Jeff Whitaker said:
> >> 
> >>> It looks like the C lib refactoring may be a problem on OSX..
> >>> 
> >>> ld: duplicate symbol _nc_inq_att in
> >>> .libs/libnetcdf.lax/libncdap4.a/att.o and
> >>> .libs/libnetcdf.lax/libdispatch.a/att.o
> >>> 
> >>> (error when linking libnetcdf.dylib)
> >> I wonder if that's because OS X comes with something named libdispatch
> >> already:
> >> 
> >> <http://en.wikipedia.org/wiki/Libdispatch>
> >> 
> > I'm not running 10.6.
> > 
> > -Jeff
> > 
> > -- 
> > Jeffrey S. Whitaker         Phone  : (303)497-6313
> > Meteorologist               FAX    : (303)497-6449
> > NOAA/OAR/PSD  R/PSD1        Email  : Jeffrey.S.Whitaker@xxxxxxxx
> > 325 Broadway                Office : Skaggs Research Cntr 1D-113
> > Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg
> > 
> > _______________________________________________
> > netcdfgroup mailing list
> > netcdfgroup@xxxxxxxxxxxxxxxx
> > For list information or to unsubscribe,  visit: http://www.unidata.ucar.edu
> /mailing_lists/ 
> 
> **********************
> "The contents of this message do not reflect any position of the U.S. Governm
> ent or NOAA."
> **********************
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> 1352 Lighthouse Avenue
> Pacific Grove, CA 93950-2097
> 
> e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
> voice: (831)-648-9029
> fax: (831)-648-8440
> www: http://www.pfeg.noaa.gov/
> 
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected" 
> 
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: http://www.unidata.ucar.edu/m
> ailing_lists/ 



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: