Thank you Elena,

I had a doubt that this is because of mixing up of compiler libraries.
I found that somehow LDFLAGS and CPPFLAGS were not set in the *Makefile*,
even though I set them as mentioned in the INSTALL readme file:

LDFLAGS=-L<GCCLIB>
CPPFLAGS=-I<GCCINCLUDE>

So I added LDFLAGS and CPPFLAGS in the Makefile post configure and HDF5 is
compiling with both versions of gcc.


Thanks again.


Bharat Ravi Iyengar
____________________________________

Department of Chemical Engineering
Indian Institute of Technology Bombay

Functional Genomics Unit
Institute of Genomics & Integrative Biology, Delhi

Chemical Engineering & Process Development Division
National Chemical Laboratory, Pune

Tel: +91-9711091770, +91-7030464363



On Wed, May 27, 2015 at 6:18 PM, Elena Pourmal <[email protected]>
wrote:

>  Hello,
>
>  Information you sent is not enough to troubleshoot the error. Could you
> please run
>
>  ./configure —enable-fortran —disable-silent-rules —prefix=/….
>
>  and post the output of the configure command (above) and the output of
> make?
>
>  Thank you!
>
>  Elena
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Elena Pourmal  The HDF Group  http://hdfgroup.org
> 1800 So. Oak St., Suite 203, Champaign IL 61820
> 217.531.6112
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
>  On May 26, 2015, at 1:11 PM, Bharat Ravi Iyengar <
> [email protected]> wrote:
>
>      Hi,
>
>  I have some fortran programs that would not compile in old versions of
> gfortran. I have to run multiple instances of this program and am using
> another system (a cluster system) which has centos5 with gcc-4.1 !!
>
>  Therefore I had to build new version of gcc; I built both gcc-4.8.3 and
> gcc-4.9.2 in my home folder. Before compiling hdf5 libraries I set these
> parameters:
>
>  PATH=<GCCPATH>:$PATH
>  LD_LIBRARY_PATH=<GCCLIB>
>  LD_RUN_PATH=<GCCLIB>
>  LDFLAGS=<GCCLIB>
>  CPPFLAGS=<GCCINCLUDE>
>
>  then configured as:
>
>  ./configure --prefix=$HOME/HDF5 --enable-fortran
>
> During make I get this error:
>
> /usr/lib/../lib64/crt1.o: In function `_start':
> (.text+0x20): undefined reference to `main'
> collect2: error: ld returned 1 exit status
>
> This happens with both versions of gcc but not with the versions installed
> in the standard location. General searching let me know that this error is
> associated with the absence of a main() and in such cases -c flag has to be
> passed (all examples of this error were people's personal scripts and not
> libraries). Please let me know if I am missing something.
>
>  Upgrading the system OS is not a choice as of now.
>
>
> Bharat Ravi Iyengar
> ____________________________________
>
> Department of Chemical Engineering
> Indian Institute of Technology Bombay
>
> Functional Genomics Unit
> Institute of Genomics & Integrative Biology, Delhi
>
> Chemical Engineering & Process Development Division
> National Chemical Laboratory, Pune
>
> Tel: +91-9711091770, +91-7030464363
>
>
>    _______________________________________________
> 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-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-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

Reply via email to