On 06/26/2017 12:52 PM, ashwin .D wrote:
n 26 June 2017 at 03:42, ashwin .D <winash12 at gmail.com <http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org>> wrote:

/Hello, />/I already have an existing installation of HDF5 1.8.17 compiled />/with gfortran. Now for another project on the 
same machine I need to />/compile with PGI compilers i.e. pgcc , pgc++and pgf90. The installation />/directory will be separate 
as well i.e. /opt/local/lib and />//opt/local/include. />//>/This is how I try to build hdf5 
/>//>/CPPFLAGS=/opt/local/include CXXFLAGS=/opt//local/include />/LDFLAGS=/opt//local/lib CC=pgcc CXX=pgc++ FC=pgf90 
F77=pgf77 ./configure />/--prefix=/opt/local --with-zlib=/opt/local --enable-fortran --enable-cxx. />//>/and when I try 
doing this I get this error message - />//>/checking for a BSD-compatible install... /usr/bin/install -c />/checking whether 
build environment is sane... yes />/[...] />//checking for gcc... pgcc
/checking whether the C compiler works... no />/configure: error: in `/home//hdf5-1.8.17': />/configure: error: C compiler cannot create executables />/See `config.log' for 
more details <<<<<<<<<<<<<<<<<<<< />//>/Any suggestions on how to build will be appreciated. />//>//>Your 
flags settings need "-I" or "-L" as appropriate.

If that does't solve your problem, it might help if you provide the OS and
version as well as the compiler version.
Someone on the list may have advice for your particular platform.

It  would also be helpful if you could post relevant "more details" from
the config.log file.

Sorry for asking the question. In this command line for configure

how would I add -I and -L

/CPPFLAGS=/opt/local/include CXXFLAGS=/opt/local/include 
//LDFLAGS=/opt/local/lib CC=pgcc CXX=pgc++ FC=pgf90 F77=pgf77 ./configure 
//--prefix=/opt/local --with-zlib=/opt/local --enable-fortran --enable-cxx. /

You need to do something like:

CPPFLAGS='-I/opt/local/include' CXXFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib'

For include directories, use -I, for library locations use -L. The flags are literal and won't add them automatically like autotools might through a --with-xxx

Matt

--
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC,    Global Modeling and Assimilation Office
Code 610.1,  8800 Greenbelt Rd,  Greenbelt,  MD 20771
Phone: 301-614-6712                 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
  • [Hdf-for... ashwin .D
    • Re:... Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]
    • Re:... George N. White III

Reply via email to