[HDF-forum]Unable to build HDF5 wutg pgi compilers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[HDF-forum]Unable to build HDF5 wutg pgi compilers

ashwin .D
n 26 June 2017 at 03:42, ashwin .D <winash12 at gmail.com> 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.
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


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

config.log (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [HDF-forum]Unable to build HDF5 wutg pgi compilers

Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]
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.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: [HDF-forum]Unable to build HDF5 wutg pgi compilers

George N. White III
In reply to this post by ashwin .D

On 26 June 2017 at 13:52, ashwin .D <[hidden email]> wrote:
n 26 June 2017 at 03:42, ashwin .D <winash12 at gmail.com> 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 <[hidden email]>
Head of St. Margarets Bay, Nova Scotia

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5