Error compiling hdf5 with gfortran 6.3.1

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

Error compiling hdf5 with gfortran 6.3.1

naomi

I am getting errors in the “make” of hdf5 with gfortran 6.3.1 (HDF5 version 1.8.15-patch1) such as below:

(.text+0x20): undefined reference to `main'

fortranlib_test-tH5F.o: In function `th5f_mp_mountingtest_':

tH5F.f90:(.text+0x1e5): undefined reference to `h5f_mp_h5fcreate_f_'

tH5F.f90:(.text+0x244): undefined reference to `h5g_mp_h5gcreate_f_'

tH5F.f90:(.text+0x277): undefined reference to `h5g_mp_h5gclose_f_'

tH5F.f90:(.text+0x2a6): undefined reference to `h5f_mp_h5fclose_f_' ….

collect2: error: ld returned 1 exit status

Makefile:880: recipe for target 'fortranlib_test' failed

make[2]: *** [fortranlib_test] Error 1

make[2]: Leaving directory '/root/Downloads/hdf5-1.8.15-patch1/fortran/test'

Makefile:736: recipe for target 'all-recursive' failed

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory '/root/Downloads/hdf5-1.8.15-patch1/fortran'

Makefile:576: recipe for target 'all-recursive' failed

 

I used ./configure --prefix=/opt/hdf5-1.8.15-patch1.gfortran_6.3.1 --enable fortran.  Any ideas? I was able to build it using the Intel compiler (2016).

 

Naomi Greenberg

Principal Member of the Research Staff

Electromagnetics Lab

www.riversideresearch.org

T: 212.502.1718 | F: 212.502.1729 |

line

Riverside Research | 156 William Street | New York, N.Y. 10038

 

 

cid:image010.png@01D05BEF.9ED90B00cid:image011.png@01D05BEF.9ED90B00cid:image012.png@01D05BEF.9ED90B00linkedin-new 

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain proprietary, confidential or privileged information or otherwise be protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender and destroy all copies and the original message.

 

 


_______________________________________________
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

smime.p7s (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error compiling hdf5 with gfortran 6.3.1

Pierre de Buyl-2
Hi,

On Wed, Jun 07, 2017 at 02:28:56PM +0000, Greenberg, Naomi wrote:
> I used ./configure --prefix=/opt/hdf5-1.8.15-patch1.gfortran_6.3.1 --enable
> fortran.  Any ideas? I was able to build it using the Intel compiler (2016).

Is it a typo that I read "--enable fortran" (with a space) instead of
"--enable-fortran" ?

Else, if you have built already hdf5 in the same directory, you might need to
clean remaining files (from the intel compiler) that could conflict with the
compiled files needed by gfortran.

My general recipe for building hdf5, using here the gcc/gfortran compiler
setting. You might need to adjust (replace gcc by gcc-6 and gfortran by
gfortran-6, for instance).

In a fresh unpack of the source file:

export CC=gcc
export FC=gfortran
./configure --enable-fortran --enable-fortran2003 --prefix /opt/hdf5-1.8.15-patch1.gfortran_6.3.1
make

If there are further problems, can you include the full details of your build
process (all steps since unpacking the source archive, OS, compiler versions).

Regards,

Pierre


_______________________________________________
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: Error compiling hdf5 with gfortran 6.3.1

naomi
Thank you. That worked.

Naomi Greenberg
Principal Member of the Research Staff
Electromagnetics Lab
www.riversideresearch.org
T: 212.502.1718 | F: 212.502.1729 |

Riverside Research | 156 William Street | New York, N.Y. 10038


 
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain proprietary, confidential or
privileged information or otherwise be protected by law. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please notify the sender and destroy all copies and the
original message.



-----Original Message-----
From: Hdf-forum [mailto:[hidden email]] On Behalf Of
Pierre de Buyl
Sent: Wednesday, June 07, 2017 3:04 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] Error compiling hdf5 with gfortran 6.3.1

Hi,

On Wed, Jun 07, 2017 at 02:28:56PM +0000, Greenberg, Naomi wrote:
> I used ./configure --prefix=/opt/hdf5-1.8.15-patch1.gfortran_6.3.1
> --enable fortran.  Any ideas? I was able to build it using the Intel
compiler (2016).

Is it a typo that I read "--enable fortran" (with a space) instead of
"--enable-fortran" ?

Else, if you have built already hdf5 in the same directory, you might need
to clean remaining files (from the intel compiler) that could conflict with
the compiled files needed by gfortran.

My general recipe for building hdf5, using here the gcc/gfortran compiler
setting. You might need to adjust (replace gcc by gcc-6 and gfortran by
gfortran-6, for instance).

In a fresh unpack of the source file:

export CC=gcc
export FC=gfortran
./configure --enable-fortran --enable-fortran2003 --prefix
/opt/hdf5-1.8.15-patch1.gfortran_6.3.1
make

If there are further problems, can you include the full details of your
build process (all steps since unpacking the source archive, OS, compiler
versions).

Regards,

Pierre


_______________________________________________
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

_______________________________________________
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

smime.p7s (9K) Download Attachment