Opened 10 years ago

Closed 10 years ago

#45195 closed defect (fixed)

ncarg @6.2.1 +gcc49 Compile Error (includes +mpich) and also cannot find "_HE5_EHHEisHE5"

Reported by: William.Capehart@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc: tenomoto (Takeshi Enomoto), petrrr
Port: ncarg

Description

In updating NCAR Command Language (ncarg) I am not able to complete the build: The error is

:info:build mpicc-mpich-gcc49 -fPIC -ansi -D_DARWIN_C_SOURCE  -Os  -I../../.././include -I/opt/local/include/freetype2 -I/opt/local/include/udunits2 -I/opt/local/lib/hdfeos5/include -I/opt/local/include  -DDarwin -DMAJOR=13  			   			-DBuildHDFEOS  -DBuildHDF4   			-DBuildHDFEOS5  -DBuildHDF5  			-DBuildGRIB2 -D__64BIT__ -DBuildGDAL  			-DUSE_NETCDF4_FEATURES  			  			   -DSYSV -D_XOPEN_SOURCE -DByteSwapped -D__UNIXOS2__ -D__JIRA1530__ -DNeedFuncProto    -c -o Ncl.o Ncl.c
:info:build mpicc-mpich-gcc49 -fPIC -ansi -D_DARWIN_C_SOURCE  -Os     -o ncl Ncl.o io.o NclHLUObj.o NclApi.o guiFuncs.o NclDriver.o  			scanner.o parser.o MathFuncs.o NclTypedouble.o NclTypefloat.o  			NclTypeint.o NclTypelogical.o  			NclTypelong.o NclTypeobj.o  			NclTypeshort.o NclTypestring.o  			NclTypeint64.o NclTypeuint64.o  			NclTypeubyte.o  			NclTypeushort.o NclTypeuint.o NclTypeulong.o  			NclTypebyte.o NclTypechar.o TypeSupport.o  			NclMultiDValData.o AddFileFormats.o AttSupport.o DataSupport.o  			FileSupport.o Formats.o GetGrids.o  			AdvancedFileSupport.o  			NclAdvancedFile.o NclAdvancedGroup.o  			InitData.o Memory.o NclAtt.o NclCCM.o  			NclCoordVar.o NclData.o NclGroup.o NclFile.o NclFileVar.o  			NclGRIB.o NclMultiDValnclfileData.o  			NclNetCdf.o NclOneDValCoordData.o NclType.o  			NclTypelist.o NclVar.o VarSupport.o  			ctoiee.o date.o qu2reg3.o rowina3.o scm0.o ncepcode.o  			NclHDFEOS.o NclHDF.o  			NclHDFEOS5.o NclNewHDFEOS5.o NclNewHDF5.o NclHDF5.o h5reader.o h5writer.o  			  			NclNetCDF4.o  			NclGRIB2.o NclOGR.o NclAdvancedOGR.o AddBuiltIns.o AddHLUObjs.o  			AddIntrinsics.o Execute.o  			Machine.o OpsFuncs.o SrcTree.o  			Symbol.o Translate.o   			NclHLUVar.o HLUSupport.o  			NclMultiDValHLUObjData.o  			BuiltInSupport.o BuiltInFuncs.o  			javaAddProto.o javaAddFuncs.o  			userAddProto.o userAddFuncs.o  			HLUFunctions.o yywrap.o craybin.o  			complete.o editline.o sysunix.o ListSupport.o  			NclList.o NclMultiDVallistData.o  			NclProf.o NclTime.o fortranio.o  -L../../.././ni/src/lib/nfp -lnfp -L../../.././ni/src/lib/nfpfort -lnfpfort -L../../.././ni/src/lib/hlu -lhlu -L../../.././ncarg2d/src/libncarg -lncarg -L../../.././ncarg2d/src/libncarg_gks -lncarg_gks -L../../.././common/src/libncarg_c -lncarg_c -L../../.././ngmath/src/lib -lngmath -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_ncarg/ncarg/work/destroot/opt/local/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_ncarg/ncarg/work/ncl_ncarg-6.2.1 -L/opt/local/lib -L/opt/local/lib/hdfeos5/lib -L/opt/local/lib -lnetcdf -lhe5_hdfeos -lGctp -lhdf5 -lhdf5_hl -lhdf5 -lhdfeos -lGctp -lmfhdf -ldf -ljpeg -lz -lhdf5_hl -lhdf5 -lz -lgdal -lproj -ljpeg   -ludunits2 -lexpat -lv5d -lgrib2c -ljasper -lpng -lz -ljpeg -lpng -lz -lcairo -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lpthread -lXrender -lbz2 -L../../.././external/sphere3.1_dp ../../.././external/sphere3.1_dp/libsphere3.1_dp.a -L../../.././external/fftpack5_dp ../../.././external/fftpack5_dp/libfftpack5_dp.a -L../../.././external/lapack ../../.././external/lapack/liblapack_ncl.a -L../../.././external/blas ../../.././external/blas/libblas_ncl.a -lXpm -lX11 -lXext -lgfortran -lgomp -lquadmath -lm  -ldl  
:info:build ld: warning: directory not found for option '-L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_ncarg/ncarg/work/destroot/opt/local/lib'
:info:build Undefined symbols for architecture x86_64:
:info:build   "_HE5_EHHEisHE5", referenced from:
:info:build       import-atom in libhe5_hdfeos.dylib
:info:build ld: symbol(s) not found for architecture x86_64
:info:build collect2: error: ld returned 1 exit status
:info:build make[4]: *** [ncl] Error 1
:info:build make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_ncarg/ncarg/work/ncl_ncarg-6.2.1/ni/src/ncl'

Also since my netcdf, hdf4, hdf5 and hdfeos5 are enabled for mpich, it is also building with mpich. I am not sure that that is the problem.

Attachments (4)

ncarg_build.log (2.9 MB) - added by William.Capehart@… 10 years ago.
Macports Log File
hdfeos.log (56.0 KB) - added by William.Capehart@… 10 years ago.
hdfeos5 file log
hdfeos.2.log (56.0 KB) - added by William.Capehart@… 10 years ago.
hdfeos5_config.log (37.4 KB) - added by William.Capehart@… 10 years ago.

Change History (19)

Changed 10 years ago by William.Capehart@…

Attachment: ncarg_build.log added

Macports Log File

comment:1 Changed 10 years ago by William.Capehart@…

(Error: hdf4 is not built with mpich). netcdf, hdf5 and hdfeos5, however are built with +gcc49+mpich)

comment:2 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

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

It appears to be due to the missing symbol in your libhe5_hdfeos.dylib. I have that symbol. Could you try the following? If it is missing you get no result or U for undefined instead of T.

nm /opt/local/lib/hdfeos5/lib/libhe5_hdfeos.dylib | grep _HE5_EHHEisHE5
00000000000151a6 T _HE5_EHHEisHE5

comment:4 in reply to:  3 Changed 10 years ago by William.Capehart@…

Replying to takeshi@…:

It appears to be due to the missing symbol in your libhe5_hdfeos.dylib. I have that symbol. Could you try the following? If it is missing you get no result or U for undefined instead of T.

nm /opt/local/lib/hdfeos5/lib/libhe5_hdfeos.dylib | grep _HE5_EHHEisHE5
00000000000151a6 T _HE5_EHHEisHE5

Takeshi,

I get the following:

% nm /opt/local/lib/hdfeos5/lib/libhe5_hdfeos.dylib | grep _HE5_EHHEisHE5
                 U _HE5_EHHEisHE5

I do not get the

00000000000151a6 T _HE5_EHHEisHE5

That you get. Also if this helps I have the following hdf libraries

% sudo port -v installed | grep hdf
  hdf4 @4.2.10_0+gcc49 (active) platform='darwin 13' archs='x86_64'
  hdf5 @1.8.13_0+cxx+gcc49+mpich (active) platform='darwin 13' archs='x86_64'
  hdfeos @2.19_0 (active) platform='darwin 13' archs='x86_64'
  hdfeos5 @1.15_2+mpich (active) platform='darwin 13' archs='x86_64'

Bill

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

Could you try reinstall hdfeos5?

$ sudo port -df uninstall hdfeos5
$ sudo port -dk install hdfeos5 +mpich

if HE5_EHHEisHE5 exists you can clean the build. If not send me main.log of hdfeos5.

comment:6 Changed 10 years ago by William.Capehart@…

Takeshi: I'm afraid that I got a fail on the configuration of hdfeos5: See attached.

Changed 10 years ago by William.Capehart@…

Attachment: hdfeos.log added

hdfeos5 file log

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

Could you attach config.log?

comment:8 Changed 10 years ago by William.Capehart@…

Attached as hdfeos5_config.log

Changed 10 years ago by William.Capehart@…

Attachment: hdfeos.2.log added

Changed 10 years ago by William.Capehart@…

Attachment: hdfeos5_config.log added

comment:9 Changed 10 years ago by tenomoto (Takeshi Enomoto)

I was able to reproduce the problem. +gcc49 sets configure.cc. hdfeos5 should be compiled either with h5cc or h5pcc. I removed compiler variants that sets configure.cc in r126056. Let me know if this fix enables successful builds of hdfeos5 and ncarg.

comment:10 in reply to:  9 Changed 10 years ago by seanfarley (Sean Farley)

Replying to takeshi@…:

I was able to reproduce the problem. +gcc49 sets configure.cc. hdfeos5 should be compiled either with h5cc or h5pcc. I removed compiler variants that sets configure.cc in r126056. Let me know if this fix enables successful builds of hdfeos5 and ncarg.

The problem with removing the compiler variant is now the hdfeos5 will not have a way to tell which compiler to use with hdf5. For example, consider:

$ port install hdf5 +gcc48 $ port install hdfeos5 $ port install hdf5 +gcc49

hdfeos5 has no way to tell which compiler was used for building it. If the compiler variant existed, we'd be able to say, "Ah, the variants should match up."

My suggestion would be to either set configure.cc explicitly or maybe set the HDF5_CC variable to ${configure.cc}.

comment:11 Changed 10 years ago by tenomoto (Takeshi Enomoto)

Sean, setting configure.cc directly didn't work. It appears that gcc-mp-4.9 is selected over h5pcc when built with +mpich and +gcc49. In formation which compiler was used to build with hdf5 is contained in h5cc or h5pcc. Given hdf5 and hdfeos5 be compiled with the same version of compiler consistently, what hdfeos5 needs to do is to find if hdf5 is built with one of MPI variants.

comment:12 in reply to:  11 Changed 10 years ago by seanfarley (Sean Farley)

Replying to takeshi@…:

Sean, setting configure.cc directly didn't work. It appears that gcc-mp-4.9 is selected over h5pcc when built with +mpich and +gcc49. In formation which compiler was used to build with hdf5 is contained in h5cc or h5pcc. Given hdf5 and hdfeos5 be compiled with the same version of compiler consistently, what hdfeos5 needs to do is to find if hdf5 is built with one of MPI variants.

configure.cc wasn't set because mpi.choose was told to only change the cxx compiler. As for enforcing the mpi variants, one should use 'mpi.enforce_variant' which I wrote precisely due to hdf5 :-) There might be some bugs in it (please let me know if so). Adding 'mpi.enforce_variant hdf5' to hdfeos5, I get:

$ port installed hdf5
The following ports are currently installed:
  hdf5 @1.8.13_0+cxx (active)

$ sudo port configure hdfeos5 +mpich +gcc49
--->  Computing dependencies for isl
--->  Cleaning isl
--->  Computing dependencies for hdfeos5
--->  Fetching distfiles for hdfeos5
Error: Install hdf5 +mpich
Error: Failed to fetch hdfeos5: hdf5 +mpich not installed
Error: See /opt/local/var/macports/logs/_Users_sean_projects_macports_dports_science_hdfeos5/hdfeos5/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port hdfeos5 failed

Then, if a user installs hdf5 +mpich (but forgets gcc49):

sudo port configure hdfeos5 +mpich +gcc49
--->  Computing dependencies for isl
--->  Cleaning isl
--->  Computing dependencies for hdfeos5
--->  Fetching distfiles for hdfeos5
Error: Install hdf5 +gcc49
Error: Failed to fetch hdfeos5: hdf5 +gcc49 not installed
Error: See /opt/local/var/macports/logs/_Users_sean_projects_macports_dports_science_hdfeos5/hdfeos5/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port hdfeos5 failed

comment:13 Changed 10 years ago by William.Capehart@…

FYI: My problem has been resolved through the Yosemite upgrade.

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

Bill, thanks for letting me know. The problem was fixed by r126056.

Sean, I tested mpi.enforce_variant hdf5. It does not seem to check whether the variants that are set for hdf5 are also specified on hdfeos5. Say

$ port installed hdf5

hdf5 @1.8.13_0+cxx+mpich (active)

$ sudo port -d install hdfeos5

will not cause error without mpich.

comment:15 Changed 10 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

I noticed that mpich is added to default_variants and that's why configure works without any problem. Done in r127692.

Note: See TracTickets for help on using tickets.