Wow,  good catch.

I will try this tomorrow morning (I am in Zurich time zone) and report
my results.

Thanks,

Jason

On 02/26/2014 04:20 PM, Scot Breitenfeld wrote:
> We believe libtool is getting generated with several blank '-l''s in its 
> postdeps variable  due to mvapich's mpif90 wrapper. If you compare the output 
> from mvapich's mpif90:
>
> mvapich2-2.0b/mvapich2/bin/mpif90 -shared -v
>
> it lists the gfortran library as  "-l gfortran", with a space.
>
> However, if you do the same for mpich:
>
> mpif90 -shared -v
>
> it lists the gfortran library as "-lgfortran", no space, so libtool is  
> processing this extra space and generating the blank "-l".
>
> One solution is to edit "libtool" in the hdf5 library after you've run 
> configure and remove the blank "-l"s from postdeps=
>
> This maybe related to:
> http://lists.gnu.org/archive/html/bug-libtool/2012-03/msg00004.html
> and the comments thread here:
> https://github.com/libMesh/libmesh/issues/107
>
>
> ________________________________________
> From: Hdf-forum <[email protected]> on behalf of Jason 
> Temple <[email protected]>
> Sent: Tuesday, February 25, 2014 4:14 AM
> To: HDF Users Discussion List
> Subject: [Hdf-forum] compiling hdf5 gcc 4.8.1 fortran error
>
> Hello,
>
> I am unable to compile the fortran bindings for parallel hdf5 with gcc
> 4.8.1 (works fine with gcc 4.7.3) and mvapich2.
>
> Here is my compile configuration:
>
> ./configure --prefix=/apps/monch/hdf5/1.8.12-parallel/gcc/4.8.1/mvapich2
> --enable-unsupported --enable-fortran --enable-cxx --enable-shared
> --enable-production --enable-threadsafe --enable-clear-file-buffers
> --enable-filters=all --enable-direct-vfd --enable-dconv-exception
> --enable-dconv-accuracy --enable-hl --enable-deprecated-symbols
> --enable-embedded-libinfo --with-pthread=/usr/include --enable-parallel
> --with-szlib=/apps/monch/szip/intel CFLAGS=-fPIC CC=mpicc FC=mpif90
> F90=mpif90 F77=mpif77 CXX=mpicxx
>
> I am using mvapich2-1.9.
>
>             SUMMARY OF THE HDF5 CONFIGURATION
>             =================================
>
> General Information:
> -------------------
>                    HDF5 Version: 1.8.12
>                   Configured on: Tue Feb 25 10:45:12 CET 2014
>                   Configured by: jtemple@monch03
>                  Configure mode: production
>                     Host system: x86_64-unknown-linux-gnu
>               Uname information: Linux monch03
> 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12 03:34:52 UTC 2013 x86_64
> x86_64 x86_64 GNU/Linux
>                        Byte sex: little-endian
>                       Libraries: static, shared
>              Installation point:
> /apps/monch/hdf5/1.8.12-parallel/gcc/4.8.1/mvapich2
>
> Compiling Options:
> ------------------
>                Compilation Mode: production
>                      C Compiler:
> /apps/monch/mvapich2/1.9/gcc/4.8.1/bin/mpicc
>                          CFLAGS: -fPIC
>                       H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra
> -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
> -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> -Wredundant-decls -Wnested-externs -Winline -Wfloat-equal
> -Wmissing-format-attribute -Wmissing-noreturn -Wpacked
> -Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels
> -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch
> -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default
> -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations -Wc++-compat
> -Wstrict-overflow -Wlogical-op -Wlarger-than=2048 -Wvla -Wsync-nand
> -Wframe-larger-than=16384 -Wpacked-bitfield-compat -Wstrict-overflow=5
> -Wjump-misses-init -Wunsuffixed-float-constants -Wdouble-promotion
> -Wsuggest-attribute=const -Wtrampolines -Wstack-usage=8192
> -Wvector-operation-performance -Wsuggest-attribute=pure
> -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -O3
> -fomit-frame-pointer -finline-functions
>                       AM_CFLAGS:
>                        CPPFLAGS:
>                     H5_CPPFLAGS: -D_POSIX_C_SOURCE=199506L   -DNDEBUG
> -UH5_DEBUG_API
>                     AM_CPPFLAGS: -I/usr/include/include
> -I/apps/monch/szip/intel/include -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_BSD_SOURCE
>                Shared C Library: yes
>                Static C Library: yes
>   Statically Linked Executables: no
>                         LDFLAGS:
>                      H5_LDFLAGS:
>                      AM_LDFLAGS:  -L/apps/monch/szip/intel/lib
> -L/usr/include/lib
>                 Extra libraries:  -lpthread -lsz -lz -ldl -lm
>                        Archiver: ar
>                          Ranlib: ranlib
>               Debugged Packages:
>                     API Tracing: no
>
> Languages:
> ----------
>                         Fortran: yes
>                Fortran Compiler:
> /apps/monch/mvapich2/1.9/gcc/4.8.1/bin/mpif90
>           Fortran 2003 Compiler: no
>                   Fortran Flags:
>                H5 Fortran Flags:
>                AM Fortran Flags:
>          Shared Fortran Library: yes
>          Static Fortran Library: yes
>
>                             C++: yes
>                    C++ Compiler:
> /apps/monch/mvapich2/1.9/gcc/4.8.1/bin/mpicxx
>                       C++ Flags:
>                    H5 C++ Flags:
>                    AM C++ Flags:
>              Shared C++ Library: yes
>              Static C++ Library: yes
>
> Features:
> ---------
>                   Parallel HDF5: yes
>              High Level library: yes
>                    Threadsafety: yes
>             Default API Mapping: v18
>  With Deprecated Public Symbols: yes
>          I/O filters (external): deflate(zlib),szip(encoder)
>          I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
>                             MPE:
>                      Direct VFD: no
>                         dmalloc: no
> Clear file buffers before write: yes
>            Using memory checker: no
>          Function Stack Tracing: no
>                            GPFS: no
>       Strict File Format Checks: no
>    Optimization Instrumentation: no
>        Large File Support (LFS): yes
>
> After successfully compiling the c bindings, the build moves onto the
> fortran side of things, and bombs out with this error:
>
> Making all in fortran
> make[1]: Entering directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran'
> Making all in src
> make[2]: Entering directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran/src'
> make  all-am
> make[3]: Entering directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran/src'
>   FCLD     libhdf5_fortran.la
> /usr/bin/ld: cannot find
> -l-L/apps/monch/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1
> collect2: error: ld returned 1 exit status
> make[3]: *** [libhdf5_fortran.la] Error 1
> make[3]: Leaving directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/apps/monch/src/hdf5/hdf5-1.8.12-parallel-gcc-4.8.1/fortran'
> make: *** [all-recursive] Error 1
>
> The key problem lying here:
>
> cannot find -l-L/apps/monch/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1
>
> It looks like something in the configure is passing a variable to
> reference a gnu library, and it is returning the library path instead.
>
> With the exact same configuration and flags, compiling with gcc-4.7.3
> poses no problem and compiles successfully.
>
> Thanks in advance for your help.
>
> -Jason
>
>
>
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to