On 26 June 2017 at 13:52, ashwin .D <[email protected]> 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. > * > > Seeing (below) that you are using linux, you probably don't want to set CPPFLAGS, CXXFLAGS, or LDFLAGS at all. You should not need *--with-zlib=/opt/local *either, but you will need to install the libz development package. An exception would be if your site policy doesn't allow you to install developer versions of system libriaries but did allow you to install the libraries in /opt/local/.
> >* 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. > * > > Like Matt said, but be sure these are the correct settings for your system. > The compiler version is > > pgcc 17.4-0 64-bit target on x86-64 Linux -tp haswell > PGI Compilers and Tools > Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. > > OS version as given by uname Ubuntu 16.04 LTS > > Linux a-Vostro-3800 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 > UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > > Your config.log file has errors like "/usr/bin/ld: cannot find /opt/local/include: File format not recognized". This is what I would expect to see with missing "-I". -- George N. White III <[email protected]> Head of St. Margarets Bay, Nova Scotia
_______________________________________________ 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
