configure errors

Hi I trying to compile hdf-1.8.5-pathch1 with gnu-4.4.4 and openmpi-1.4.3

# set the following environment variables
setenv FC ${MPIHOME}/bin/mpif90
setenv CC ${MPIHOME}/bin/mpicc
setenv LDFLAGS "-L{MPIHOME}/lib"
setenv LIBS "-lmpi"

#configure wiht

./configure --prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5 --exec-prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5 --enable-production --enable-parallel --enable-fortran --with-default-api
-version=v16

checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
compiler '/usr/local/packages/openmpi-1.4.3/bin/mpicc' is GNU gcc-4.4.4
CC_BASENAME is mpicc.
No match to get fc_version_info for /usr/local/packages/openmpi-1.4.3/bin/mpif90
checking for config ./config/site-specific/host-paratools04.rrp.net... no
checking for config ./config/site-specific/host-rrp.net... no
checking for config ./config/site-specific/host-net... no
checking for gcc... /usr/local/packages/openmpi-1.4.3/bin/mpicc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/usr/local/packages/notransfer/acts_openmpi-1.4.3/hdf5-1.8.5-patch1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

···

###
So I am not sure what the cross compiling is about
but if remove the --enable-parallel it configures without issue

Thanks
Chris B.

Hi Chris

You will probably need to check the config.log file in the build directory
after configure fails to find more information as to the cause of failure.
Search for "cannot" and examine the lines preceding it. If you don't
specifically need to build shared libraries, it may be helpful to add
--disable-shared to your configure options.

Larry

···

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-bounces@hdfgroup.org]
On Behalf Of chris@paratools.com
Sent: Friday, January 21, 2011 6:09 PM
To: hdf-forum@hdfgroup.org
Subject: [Hdf-forum] configure errors

Hi I trying to compile hdf-1.8.5-pathch1 with gnu-4.4.4 and openmpi-1.4.3

# set the following environment variables
setenv FC ${MPIHOME}/bin/mpif90
setenv CC ${MPIHOME}/bin/mpicc
setenv LDFLAGS "-L{MPIHOME}/lib"
setenv LIBS "-lmpi"

#configure wiht

./configure
--prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5
--exec-prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5
--enable-production --enable-parallel --enable-fortran
--with-default-api
-version=v16

checking for config x86_64-unknown-linux-gnu... no
checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
compiler '/usr/local/packages/openmpi-1.4.3/bin/mpicc' is GNU gcc-4.4.4
CC_BASENAME is mpicc.
No match to get fc_version_info for
/usr/local/packages/openmpi-1.4.3/bin/mpif90
checking for config ./config/site-specific/host-paratools04.rrp.net... no
checking for config ./config/site-specific/host-rrp.net... no
checking for config ./config/site-specific/host-net... no
checking for gcc... /usr/local/packages/openmpi-1.4.3/bin/mpicc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/usr/local/packages/notransfer/acts_openmpi-1.4.3/hdf5-1.8.5-patch1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

###
So I am not sure what the cross compiling is about
but if remove the --enable-parallel it configures without issue

Thanks
Chris B.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Larry,
   Here is the relevant output of the config.log
This is using --disabled-shared but still
breaks at the same point.

   I was able to successfully build a serial and parallel version
of HDF5 with the gnu-4.4.4 and openmpi-1.4.2

but with gnu-4.4.4 and openmpi-1.4.3
I can build and run the tests for the serial but, the parallel version well this is what I am getting....

thanks
Chris

···

###########
  configure:4400: $? = 1
configure:4420: checking whether the C compiler works
configure:4442: /usr/local/packages/openmpi-1.4.3/bin/mpicc -L/usr/local/packages/openmpi-1.4.3/lib conftest.c -lmpi >&5
configure:4446: $? = 0
configure:4495: result: yes
configure:4498: checking for C compiler default output file name
configure:4500: result: a.out
configure:4506: checking for suffix of executables
configure:4513: /usr/local/packages/openmpi-1.4.3/bin/mpicc -o conftest -L/usr/local/packages/openmpi-1.4.3/lib conftest.c -lmpi >&5
configure:4517: $? = 0
configure:4539: result:
configure:4561: checking whether we are cross compiling
configure:4569: /usr/local/packages/openmpi-1.4.3/bin/mpicc -o conftest -L/usr/local/packages/openmpi-1.4.3/lib conftest.c -lmpi >&5
configure:4573: $? = 0
configure:4580: ./conftest
./conftest: error while loading shared libraries: libmpi.so.0: cannot open shared object file: No such file or directory
configure:4584: $? = 127
configure:4591: error: in `/usr/local/packages/notransfer/acts_openmpi-1.4.3/hdf5-1.8.5-patch1':
configure:4595: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

Hi Chris

You will probably need to check the config.log file in the build directory
after configure fails to find more information as to the cause of failure.
Search for "cannot" and examine the lines preceding it. If you don't
specifically need to build shared libraries, it may be helpful to add
--disable-shared to your configure options.

Larry

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-bounces@hdfgroup.org]
On Behalf Of chris@paratools.com
Sent: Friday, January 21, 2011 6:09 PM
To: hdf-forum@hdfgroup.org
Subject: [Hdf-forum] configure errors

Hi I trying to compile hdf-1.8.5-pathch1 with gnu-4.4.4 and openmpi-1.4.3

# set the following environment variables
setenv FC ${MPIHOME}/bin/mpif90
setenv CC ${MPIHOME}/bin/mpicc
setenv LDFLAGS "-L{MPIHOME}/lib"
setenv LIBS "-lmpi"

#configure wiht

./configure
--prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5
--exec-prefix=/usr/local/ACTS_TEST/gnu-4.4.4/openmpi-1.4.3/hdf5-1.8.5
--enable-production --enable-parallel --enable-fortran
--with-default-api
-version=v16

checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
compiler '/usr/local/packages/openmpi-1.4.3/bin/mpicc' is GNU gcc-4.4.4
CC_BASENAME is mpicc.
No match to get fc_version_info for
/usr/local/packages/openmpi-1.4.3/bin/mpif90
checking for config ./config/site-specific/host-paratools04.rrp.net... no
checking for config ./config/site-specific/host-rrp.net... no
checking for config ./config/site-specific/host-net... no
checking for gcc... /usr/local/packages/openmpi-1.4.3/bin/mpicc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/usr/local/packages/notransfer/acts_openmpi-1.4.3/hdf5-1.8.5-patch1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

###
So I am not sure what the cross compiling is about
but if remove the --enable-parallel it configures without issue

Thanks
Chris B.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

chris@paratools.com writes:

Hi Larry,
   Here is the relevant output of the config.log
This is using --disabled-shared but still
breaks at the same point.

[snip]

configure:4580: ./conftest
./conftest: error while loading shared libraries: libmpi.so.0: cannot
open shared object file: No such file or directory

As the log indicates, in your environment you can't just run an
mpi-compiled application. i.e. this would fail too:

  $ echo -e "#include <mpi.h>\nint main(int argc, char *argv[]) {
      MPI_Init(argc, argv); return 0; }\n" > test.c
  $ mpicc test.c
  $ ./a.out
  ./a.out: error while ....

So... fix that. The hackiest-but-sure-to-work-way is to hack your
LD_LIBRARY_PATH env var to have the path to the mpi library. Better is
to just install to standard locations, but of course if you don't have
root, that's probably not an option.

-tom