Failure to compile HDF

I have tried different versions of HDF but compilation fails for all.
Please have a look at attcched log files. Following are the commands I use
to compile

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before â/â token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: âH5_get_srcdir_filenameâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: âH5_get_srcdirâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!

config.log (288 KB)

make.out (6.45 KB)

···

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

I have tried different versions of HDF but compilation fails for all.
Please have a look at attcched log files. Following are the commands I use
to compile

Unless you have specific software that requires an older version of the
hdf5 libraries I suggest you spend less time trying
old versions and more time investigating the problems building the current
version. Otherwise you end up rediscovering bugs that have been fixed in
more recent hdf5 versions.

You appear to have installed gcc-4.9.1. Providing a complete development
environment for Red Hat systems requires
more than just installing the compiler. RH has done this work for you with
the devtoolset software collections. I have been using the devtoolset
compilers to build large systems that use hdf5 libraries with few problems
and excellent reliability in use. You can get free (unsupported) clone
packages from CERN Scientific Linux <
http://linux.web.cern.ch/linux/devtoolset/>. These rpms can be installed
in real RHEL 5+6, CentOS 5+6, and SL 5+6 , and probably Oracle Linux 5+6.

I think Cmake is more robust than GNU configure.

···

On Thu, Aug 7, 2014 at 1:33 AM, Syed Ahsan Ali Bokhari <ahsan.pmd@gmail.com> wrote:

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before â/â token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: âH5_get_srcdir_filenameâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: âH5_get_srcdirâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!
--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

Hello,

looking at your lines and your attachments
I can see /opt/gcc-4.9.1/bin which indicates
you are using Linux and a relatively current GCC version.
Further “uname -r = 2.6.32-131.0.15.el6.x86_64”
does indicate you are using the 64 bit PC version
and thus you will probably target for that in the compile.

The first failure you are showing is about “//” comments operator.
This is supported for a long time by wide spread C compilers – but it is more common to C++.
That should not be a problem unless someone set quite strict standard conformance options.

I have not checked if it’s a frequent practice in HDF5 codes to use such comments.
If it is (you can look up that yourselves) then its probably some bad in the compiler invocation.

For getting more information on that you might enable some verbosity to show up with the
detailed compiler invocation command line for the very first error message. This helps understanding.
Maybe your compile is using a bad switches setup or it is not grabbing the right GCC version.
Invoking the compiler with a “—version” query at that particular place should give more hints.

An alternate idea on the root cause is that the line of code is a rarely active line (for targets
with a certain combination of config and platform) and “//” is forbidden in general for that.

Regards, Alex.

PS: I would ignore these “not-used” warnings for now as they are benign warnings.
In a mid to long term approach an advanced project should be able to hammer out such distracting items from their builds.

···

Von: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] Im Auftrag von Syed Ahsan Ali Bokhari
Gesendet: Donnerstag, 7. August 2014 06:34
An: HDF Users Discussion List
Betreff: [Hdf-forum] Failure to compile HDF

I have tried different versions of HDF but compilation fails for all. Please have a look at attcched log files. Following are the commands I use to compile

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before â/â token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: âH5_get_srcdir_filenameâ defined but not used [-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: âH5_get_srcdirâ defined but not used [-Wunused-function]
static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!
--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361<tel:%2B92519250361>
Cell # +923155145014<tel:%2B923155145014>
Fax # +92519250368<tel:%2B92519250368>
www.pmd.gov.pk<http://www.pmd.gov.pk/>

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk<http://www.pmd.gov.pk/>

Dear George
Thank you for your reply. I didn't have red hat subscription that is why I
switched to CentOS6.5 and this time I upgraded gcc using devtoolset
gcc-4.8.2. The issue is that I want to install netcdf with netcdf4 support
which needs zlib and hdf to be compiled first. I installed zlib first and
then I tried to compile hdf specifying the zlib directory
./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.13
(config.log) is attached.
the make process again crashes at the end during tests. Please see attached
make.out.

Thank you for your help.
Ahsan

config.log (1.59 MB)

make.out (514 KB)

···

On Thu, Aug 7, 2014 at 3:47 PM, George N. White III <gnwiii@gmail.com> wrote:

On Thu, Aug 7, 2014 at 1:33 AM, Syed Ahsan Ali Bokhari < > ahsan.pmd@gmail.com> wrote:

I have tried different versions of HDF but compilation fails for all.
Please have a look at attcched log files. Following are the commands I use
to compile

Unless you have specific software that requires an older version of the
hdf5 libraries I suggest you spend less time trying
old versions and more time investigating the problems building the current
version. Otherwise you end up rediscovering bugs that have been fixed in
more recent hdf5 versions.

You appear to have installed gcc-4.9.1. Providing a complete development
environment for Red Hat systems requires
more than just installing the compiler. RH has done this work for you
with the devtoolset software collections. I have been using the devtoolset
compilers to build large systems that use hdf5 libraries with few problems
and excellent reliability in use. You can get free (unsupported) clone
packages from CERN Scientific Linux <
http://linux.web.cern.ch/linux/devtoolset/&gt;\. These rpms can be installed
in real RHEL 5+6, CentOS 5+6, and SL 5+6 , and probably Oracle Linux 5+6.

I think Cmake is more robust than GNU configure.

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before â/â token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: âH5_get_srcdir_filenameâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: âH5_get_srcdirâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!
--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

Hello Ahsan,

We can reproduce the issue and will enter a bug report for this.

The problem is that h5import has not been built yet when the tests are
being run.

If you run 'make check' and then 'make install', then the tests should
complete properly.

-Barbara
help@hdfgroup.org

···

On Tue, 12 Aug 2014, Syed Ahsan Ali Bokhari wrote:

Dear George
Thank you for your reply. I didn't have red hat subscription that is why I
switched to CentOS6.5 and this time I upgraded gcc using devtoolset
gcc-4.8.2. The issue is that I want to install netcdf with netcdf4 support
which needs zlib and hdf to be compiled first. I installed zlib first and
then I tried to compile hdf specifying the zlib directory
./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.13
(config.log) is attached.
the make process again crashes at the end during tests. Please see attached
make.out.

Thank you for your help.
Ahsan

On Thu, Aug 7, 2014 at 3:47 PM, George N. White III <gnwiii@gmail.com> > wrote:

On Thu, Aug 7, 2014 at 1:33 AM, Syed Ahsan Ali Bokhari < >> ahsan.pmd@gmail.com> wrote:

I have tried different versions of HDF but compilation fails for all.
Please have a look at attcched log files. Following are the commands I use
to compile

Unless you have specific software that requires an older version of the
hdf5 libraries I suggest you spend less time trying
old versions and more time investigating the problems building the current
version. Otherwise you end up rediscovering bugs that have been fixed in
more recent hdf5 versions.

You appear to have installed gcc-4.9.1. Providing a complete development
environment for Red Hat systems requires
more than just installing the compiler. RH has done this work for you
with the devtoolset software collections. I have been using the devtoolset
compilers to build large systems that use hdf5 libraries with few problems
and excellent reliability in use. You can get free (unsupported) clone
packages from CERN Scientific Linux <
http://linux.web.cern.ch/linux/devtoolset/>. These rpms can be installed
in real RHEL 5+6, CentOS 5+6, and SL 5+6 , and probably Oracle Linux 5+6.

I think Cmake is more robust than GNU configure.

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before â/â token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: âH5_get_srcdir_filenameâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: âH5_get_srcdirâ defined but not used
[-Wunused-function]
static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!
--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--

Actually you need to run "make" before "make check". If you still have the build, running "make" will finish building the tools includeing h5import, then "make check install" should complete without failures. If you start again from scratch, run "make; make check install" to work around the problem.

Larry

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of help@hdfgroup.org
Sent: Tuesday, August 12, 2014 9:22 AM
To: Syed Ahsan Ali Bokhari
Cc: HDF Helpdesk; HDF Users Discussion List
Subject: Re: [Hdf-forum] Failure to compile HDF

Hello Ahsan,

We can reproduce the issue and will enter a bug report for this.

The problem is that h5import has not been built yet when the tests are being run.

If you run 'make check' and then 'make install', then the tests should complete properly.

-Barbara
help@hdfgroup.org

On Tue, 12 Aug 2014, Syed Ahsan Ali Bokhari wrote:

Dear George
Thank you for your reply. I didn't have red hat subscription that is
why I switched to CentOS6.5 and this time I upgraded gcc using
devtoolset gcc-4.8.2. The issue is that I want to install netcdf with
netcdf4 support which needs zlib and hdf to be compiled first. I
installed zlib first and then I tried to compile hdf specifying the
zlib directory ./configure --with-zlib=/opt/zlib-1.2.8/
--prefix=/opt/hdf5-1.8.13
(config.log) is attached.
the make process again crashes at the end during tests. Please see
attached make.out.

Thank you for your help.
Ahsan

On Thu, Aug 7, 2014 at 3:47 PM, George N. White III <gnwiii@gmail.com> > wrote:

On Thu, Aug 7, 2014 at 1:33 AM, Syed Ahsan Ali Bokhari < >> ahsan.pmd@gmail.com> wrote:

I have tried different versions of HDF but compilation fails for all.
Please have a look at attcched log files. Following are the commands
I use to compile

Unless you have specific software that requires an older version of
the
hdf5 libraries I suggest you spend less time trying old versions and
more time investigating the problems building the current version.
Otherwise you end up rediscovering bugs that have been fixed in more
recent hdf5 versions.

You appear to have installed gcc-4.9.1. Providing a complete development
environment for Red Hat systems requires more than just installing
the compiler. RH has done this work for you with the devtoolset
software collections. I have been using the devtoolset compilers to
build large systems that use hdf5 libraries with few problems and
excellent reliability in use. You can get free (unsupported) clone
packages from CERN Scientific Linux <
http://linux.web.cern.ch/linux/devtoolset/>. These rpms can be
installed in real RHEL 5+6, CentOS 5+6, and SL 5+6 , and probably Oracle Linux 5+6.

I think Cmake is more robust than GNU configure.

./configure --with-zlib=/opt/zlib-1.2.8/ --prefix=/opt/hdf5-1.8.9

make check install

th5s.c:734:9: error: expected expression before ?/? token
         // CHECK(ret, FAIL, "H5Pset_alloc_time");
         ^
In file included from th5s.c:25:0:
th5s.c: At top level:
H5srcdir.h:38:20: warning: ?H5_get_srcdir_filename? defined but not
used [-Wunused-function] static const char
*H5_get_srcdir_filename(const char *filename)
                    ^
H5srcdir.h:68:20: warning: ?H5_get_srcdir? defined but not used
[-Wunused-function] static const char *H5_get_srcdir(void)
                    ^
make[1]: *** [th5s.o] Error 1
make: *** [check-recursive] Error 1

Thank you for your help!
--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfg
roup.org
Twitter: https://twitter.com/hdf5

--
George N. White III <aa056@chebucto.ns.ca> Head of St. Margarets Bay,
Nova Scotia

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgr
oup.org
Twitter: https://twitter.com/hdf5

--

On command lines that support the if-succeeded-then operator '&&' rather use this one:

  make && make check install

just my 2-euro-cents for adding it in best known fashion to the readme and to other docs.

regards, Alex.

I am really thankful to all of you. It worked now. Thank you for
identifying the issue. Success :slight_smile:

···

On Tue, Aug 12, 2014 at 8:08 PM, Stohr, Alexander <Alexander.Stohr@hdle.com> wrote:

On command lines that support the if-succeeded-then operator '&&' rather
use this one:

        make && make check install

just my 2-euro-cents for adding it in best known fashion to the readme and
to other docs.

regards, Alex.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
Syed Ahsan Ali Bokhari
Electronic Engineer
Research & Development Division
Pakistan Meteorological Department H-8/2, Islamabad.
Phone # off +92519250361
Cell # +923155145014
Fax # +92519250368
www.pmd.gov.pk