Opened 14 years ago

Closed 14 years ago

#23645 closed defect (fixed)

nco +netcdf4 fails to install

Reported by: basmac Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc:
Port: nco

Description (last modified by mf2k (Frank Schima))

I am trying to get nco +netcdf4 built after hdf5-18 and netcdf4 +dap +netcdf4 build OK. The port info says the variant is availabe -

% port info nco nco @4.0.0 (science)
Variants: mpich2, netcdf4, openmpi, udunits2, universal

I have attached the debug of the build.

The macport build for nco fails the same way on clean install of MacPorts and builds, on Mac 10.5 and 10.6 versions.

Attachments (1)

install.log (48.3 KB) - added by basmac 14 years ago.
port -d nco +netcdf4 output

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by basmac

Attachment: install.log added

port -d nco +netcdf4 output

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Cc: takeshi@… removed
Description: modified (diff)
Keywords: nco netcdf4 removed
Owner: changed from macports-tickets@… to takeshi@…

comment:2 Changed 14 years ago by tenomoto (Takeshi Enomoto)

I cannot reproduce the problem. Does config.h have a line below?

#define ENABLE_NETCDF4 1

May I take a look at config.log?

comment:3 Changed 14 years ago by tenomoto (Takeshi Enomoto)

Updated netcdf to 4.1 in r63794. I am not sure if this helps.

comment:4 Changed 14 years ago by tenomoto (Takeshi Enomoto)

Sorry for slow response. This is caused by referring the old version in ${prefix}/lib. Try deactivating nco before install. I am asking for a help with libtool in macports-dev mailing list.

comment:5 Changed 14 years ago by tenomoto (Takeshi Enomoto)

My guess that replacement of libnco.la by ${prefix}/lib ./.libs/libnco.a is a cause of duplicate name with the old library ${prefix}/lib seems to be wrong.

Since ./.libs/libnco.a is specified in the full path and nothing else like -lnco, the former should be used. Thus it does not seem to be related with libtool.

I still can't reproduce your problem (Leopard on PPC and Snow Leopard on Intel). I don't have the duplicate symbol between netcdf +netcdf4 and nco +netcdf4.

$ nm work/nco-4.0.0/src/nco/.libs/libnco.a | grep _nc_put_vara_ulonglong
                 U _nc_put_vara_ulonglong
$ nm /opt/local/lib/libnetcdf.a | grep _nc_put_vara_ulonglong
00000000000006e0 T _nc_put_vara_ulonglong
nm: no name list
0000000000005ae8 S _nc_put_vara_ulonglong.eh
nm: no name list
nm: no name list

Can I see the result of these commands?

comment:6 Changed 14 years ago by tenomoto (Takeshi Enomoto)

bash-3.2# port installed|grep netcdf

netcdf @4.0.1_7 (active)

It seems that you have netcdf-4 features are not enabled in your netcdf installation. nco +netcdf4 requires netcdf +netcdf4. There is no explicit way to specify variant dependency at the moment but I added a trick to stop building in such a case in the modified Portfile in r64316. I would like you to try the following.

# deactivate netcdf
sudo port -d deactivate netcdf
# update the port tree
sudo port -d sync
# upgrade those outdated
sudo port -du upgrade outdated
# install netcdf and nco
sudo port -d install netcdf +netcdf4
sudo port -d install nco +netcdf4

comment:7 Changed 14 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

The reporter contacted that r64440 fixed the problem.

Note: See TracTickets for help on using tickets.