libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AM_FCFLAGS not working as I expect...


From: Alan W. Irwin
Subject: Re: AM_FCFLAGS not working as I expect...
Date: Sun, 14 May 2006 12:47:16 -0700 (PDT)

On 2006-05-14 05:42+0200 Ralf Wildenhues wrote:

Hi Alan,

* Alan W. Irwin wrote on Sun, May 14, 2006 at 01:07:37AM CEST:

Here is the original problem report.
********
I have ifort 9.1 installed. With a clean plplot checkout and the latest
autotools (as recommended) plplot now fails to build. The fortran
compiler is detected and f95 bindings enabled. Unfortunately they don't
build. When it gets to the f95 bindings at the command

/bin/sh ../../libtool --mode=compile ifc -I../../../bindings/f95 -g -c
-o strutil.lo ../../../bindings/f95/strutil.f95

I get an error message

libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with --tag'

[ with both F77 and FC in use, that is ]

With branch-1-5 libtool, that won't work.  I guess as a hack you can try
to override the LTFCCOMPILE variable in the Makefile.am as a workaround
(add --tag=F77).  But even then, it'll only work reliably if the Fortran
77 and the Fortran 9x compiler are sufficiently similar from a Libtool
POV.

From my own successful experiments on a gfortran-only
platform (with g77 deliberately not installed), gfortran builds both our f77
and f95 interfaces without a problem.  So to emulate that on other platforms
with the mixture of g77 and gfortran installed, I am advising our testers to
ignore g77 by setting F77 and FFLAGS to the FC and FCFLAGS values.
Also, I suggested they try --tag=F77 as well, so I am glad to see that
speculation supported (with limitations) by your comment above.

Here is the message I got from our bootstrap script.
*snip*

Please post a link to the code that you got this error with, so I can
see what's going on here.  Thanks.

We just had a release (without the f95 interface), and we are now preparing
for the next one with the f95 interface.  We don't have a tarball for you to
play with yet, but CVS HEAD is close to final shape except for this libtool
issue, and it is what all the PLplot core developers use for for their f95
interface tests. So would you be willing to try our CVS version?  If so,
please follow the anonymous cvs directions at
http://sourceforge.net/cvs/?group_id=2915. Note the module name is plplot.

Note, this is the new anonymous CVS service at SourceForge that just started
working on Friday. SourceForge claim the anon cvs version will only have a
maximum of two-hour delay from the developer version that we use, but we
haven't tested that. If you want to read through our absolutely latest
version with no 2-hour delay on our changes, try the view CVS link
accessible at http://plplot.cvs.sourceforge.net/plplot/plplot/. The overview
of our configuration organization is configure.ac includes the cf/*.ac files
as appropriate, and uses the macros in cf/*.m4 via appropriate
m4_include statements that are automatically generated as part of aclocal.m4.


If I comment out AC_LANG_PUSH([C++]) (and the corresponding
AC_LANG_POP([C++]) from cf/c++/ac, and similarly for our fortran language
tests in cf/f77.ac and cf/f95.ac, then I can get the circular
dependency errors to go away.  The warning messages left are

***********
address@hidden> cf/bootstrap.sh
Running aclocal (GNU automake) 1.9.6... done
Running autoheader (GNU Autoconf) 2.59... done
Running libtoolize (GNU libtool 1.2286 2006/04/22 18:57:04)
2.1a...libtoolize: You should add the contents of cf/ltdl.m4' to
aclocal.m4'.
libtoolize: You should add the contents of cf/argz.m4' to aclocal.m4'.
libtoolize: You should add the contents of cf/lt~obsolete.m4' to
aclocal.m4'.
 done
Running automake (GNU automake) 1.9.6... done
Running autoconf (GNU Autoconf) 2.59... done
Regenerating libltdl/aclocal+configure... done
**********

I have no idea why those three cf/*.m4 macro files are not being included
properly in aclocal.m4.  We include the line:

Do you have AC_CONFIG_MACRO_DIR([cf])?

Yes.  See configure.ac.

 If so, try
 libtoolize --copy --install --ltdl

Currently with libtool-1.5.22 (see cf/bootstrap.sh) we use

libtoolize --force --copy --ltdl --automake

When I added the --install option to those other options, that only
partially solved the problem.  ltdl.m4 is now properly included in
aclocal.m4, but the two others (argz.m4 and lt~obsolete.m4) still generate
the error message and are not included in aclocal.m4.

There may be another issue here, so it'd be good if we could try out your source tree with [libtool] CVS HEAD.

OK.  Once you do access our CVS HEAD version of PLplot, note for my current
experiments with CVS HEAD libtool I have made the following local changes to
the PLPlot CVS version (since these changes would mess up our other
developers who are using CVS HEAD with libtool-1.5.22.)


************************
diff --exclude='*~' --exclude=CVS --exclude='*.m4' -Naur 
../plplot_working/cf/bootstrap.sh cf/bootstrap.sh
--- ../plplot_working/cf/bootstrap.sh   2005-04-26 23:43:40.000000000 -0700
+++ cf/bootstrap.sh     2006-05-14 12:15:26.000000000 -0700
@@ -125,7 +125,7 @@
 run aclocal $aclocal_incdir \
   && run autoheader \
   && rm -rf libltdl \
-  && run libtoolize --force --copy --ltdl --automake \
+  && run libtoolize --force --copy --ltdl --automake --install \
   && run automake --add-missing --copy \
   && run autoconf \
   && ( echo -n "Regenerating libltdl/aclocal+configure..."; \
diff --exclude='*~' --exclude=CVS --exclude='*.m4' -Naur 
../plplot_working/cf/c++.ac cf/c++.ac
--- ../plplot_working/cf/c++.ac 2005-11-01 15:46:18.000000000 -0800
+++ cf/c++.ac   2006-05-13 14:36:17.000000000 -0700
@@ -57,7 +57,7 @@
       ;;
     esac

-    AC_LANG_PUSH([C++])
+dnl    AC_LANG_PUSH([C++])

 dnl Check if "using namespace std;" works
     AC_MSG_CHECKING([whether $CXX accepts namespace use])
@@ -110,7 +110,7 @@
                     AC_MSG_RESULT([yes])],
                     [AC_MSG_RESULT([no])]
                     )
-    AC_LANG_POP([C++])
+dnl    AC_LANG_POP([C++])

 fi

diff --exclude='*~' --exclude=CVS --exclude='*.m4' -Naur 
../plplot_working/cf/f77.ac cf/f77.ac
--- ../plplot_working/cf/f77.ac 2006-05-07 15:29:56.000000000 -0700
+++ cf/f77.ac   2006-05-13 14:37:34.000000000 -0700
@@ -34,7 +34,7 @@
 fi
 if test "$enable_f77" = yes ; then
   HAVE_F77PARSE_CL=yes
-  AC_LANG_PUSH([Fortran 77])
+dnl  AC_LANG_PUSH([Fortran 77])
   AC_MSG_CHECKING([if fortran command-line parsing is possible])
   AC_RUN_IFELSE([
       implicit none
@@ -60,7 +60,7 @@
       end],
   AC_MSG_RESULT(yes),
   AC_MSG_RESULT(no); HAVE_F77PARSE_CL=no)
-  AC_LANG_POP([Fortran 77])
+dnl  AC_LANG_POP([Fortran 77])
   if test "$enable_shared" = "yes" -a "$F77" = "g77"; then
     case "$host_os" in
       *cygwin*)
diff --exclude='*~' --exclude=CVS --exclude='*.m4' -Naur 
../plplot_working/cf/f95.ac cf/f95.ac
--- ../plplot_working/cf/f95.ac 2006-05-12 12:13:25.000000000 -0700
+++ cf/f95.ac   2006-05-13 14:38:00.000000000 -0700
@@ -28,14 +28,14 @@
   if test "$enable_f77" != yes ; then
     AC_PROG_FC
   fi
-  AC_LANG_PUSH([Fortran])
+dnl  AC_LANG_PUSH([Fortran])
   AC_MSG_CHECKING([whether FC is a true Fortran9x compiler])
   AC_COMPILE_IFELSE([
       integer, parameter :: plf   = kind(1.0d0)
       end],
   AC_MSG_RESULT(yes),
   AC_MSG_RESULT(no); enable_f95=no)
-  AC_LANG_POP([Fortran])
+dnl  AC_LANG_POP([Fortran])
 fi
 if test "$enable_f95" = no ; then
     AC_MSG_WARN([Disabling f95 interface])
diff --exclude='*~' --exclude=CVS --exclude='*.m4' -Naur 
../plplot_working/cf/libtool.ac cf/libtool.ac
--- ../plplot_working/cf/libtool.ac     2005-09-15 10:36:58.000000000 -0700
+++ cf/libtool.ac       2006-05-13 14:33:56.000000000 -0700
@@ -77,11 +77,12 @@
 AC_SUBST(LIBLTDL)

 dnl This required for dll support under cygwin.  Must occur before
-dnl AM_PROG_LIBTOOL
+dnl AC_PROG_LIBTOOL

-AC_LIBTOOL_WIN32_DLL
+dnl AC_LIBTOOL_WIN32_DLL

-AM_PROG_LIBTOOL
+dnl AC_PROG_LIBTOOL
+LT_INIT([win32-dll])

 AM_CONDITIONAL(with_ltdlsystem, [test "$with_ltdlsystem" = yes])
************************

If you have some experiments you would like me to try with the latest CVS
snapshot version of libtool please CC me since I am not currently subscribed
to this list.

Yes, maybe after I saw your setup.


Let me know if you have any trouble accessing our CVS version.  Thanks in
advance for your help, and I will be happy to try any changes you suggest.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]