On 3/2/12, Arne Babenhauserheide (IMK) <[email protected]> wrote: > Dear HDF community, > > When building HDF4 with icc 12.0.5 I experienced linker errors. > > I was able to track them down to configure.ac: If the compiler path in > $CC contained a dash (-) and $CC contained no flags, the full compiler > path was added to the front of the CFLAGS. As a consequence, icc could > not link anymore.
You are not the only one to encounter this problem, On MacOSX using macports, the compilers have names like gcc-mp-4.6,and can produce invalid $CFLAGS as you describe. A workaround is to provide "wrapper" scripts. e.g. gccmp46 contains "exec gcc-mp-4.6 "$@"" > The following patch should fix that (works for me): > > - - --- configure.ac 2012-03-01 15:00:28.000000000 +0100 > +++ configure.ac 2012-03-01 15:00:40.000000000 +0100 > @@ -815,7 +815,7 @@ > dnl Report anything stripped as a flag in CFLAGS and > dnl only the compiler in CC_VERSION. > CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` > - - -CFLAGS_TO_ADD=`echo $CC | grep - | sed 's/.* -/-/'` > +CFLAGS_TO_ADD=`echo $CC | grep \ - | sed 's/.* -/-/'` > if test -n $CFLAGS_TO_ADD; then > CFLAGS="$CFLAGS_TO_ADD$CFLAGS" > fi > > I hope it proves useful! I looked at hdf-4.2.6 and the same problem applies to F77 there, so probably in hdf-4.2.7 as well. > Best wishes, > Arne Babenhauserheide > > PS: Sorry for only jumping in here without introduction. I just > thought it better to send the patch to you instead of letting it rot > on my disk, and hdf-forum was the most fitting address I could find. I have been meaning to look into this problem but since there is a workaround it was low priority. Open source projects need efforts of people like you who make the effort to understand problems and suggest fixes. Thanks. -- George N. White III <[email protected]> Head of St. Margarets Bay, Nova Scotia _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
