Change request #623
Change deprecated INCLUDES to AM_CPPFLAGS in Makefile.am files
Status: | In Progress | Start date: | 12/06/2012 | ||
---|---|---|---|---|---|
Priority: | Low | Due date: | |||
Assigned To: | Knödlseder Jürgen | % Done: | 10% | ||
Category: | - | ||||
Target version: | - | ||||
Duration: |
Description
With an up to date automake 1.12.5
I get these deprecation warnings:
$ ./autogen.sh inst/com/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') inst/cta/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') inst/lat/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') inst/mwl/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/app/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/base/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/fits/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/linalg/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/model/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/numerics/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/obs/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/opt/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/sky/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/support/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/test/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') src/xml/Makefile.am:4: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') test/Makefile.am:56: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
http://www.delorie.com/gnu/docs/automake/automake_47.html explains:
AM_CPPFLAGS The contents of this variable are passed to every compilation which invokes the C preprocessor; it is a list of arguments to the preprocessor. For instance, `-I' and `-D' options should be listed here. Automake already provides some `-I' options automatically. In particular it generates `-I$(srcdir)', `-I.', and a `-I' pointing to the directory holding `config.h' (if you've used AC_CONFIG_HEADERS or AM_CONFIG_HEADER). You can disable the default `-I' options using the `nostdinc' option. AM_CPPFLAGS is ignored in preference to a per-executable (or per-library) _CPPFLAGS variable if it is defined. INCLUDES This does the same job as `AM_CPPFLAGS'. It is an older name for the same functionality. This variable is deprecated; we suggest using `AM_CPPFLAGS' instead.
So I updated INCLUDES
to AM_CPPFLAGS
in these files.
You can find it in the INCLUDES_to_AM_CPPFLAGS
branch and review it here:
https://cta-redmine.irap.omp.eu/projects/gammalib/repository/revisions/479e4540055cf1bb27c0ea4d9e663783a9c28a97/diff
make
runs find on my machine, but I do get this error with make check
:
Making check in test make test_GSupport test_GVector test_GMatrix test_GSymMatrix test_GSparseMatrix test_GNumerics test_GFits test_GXml test_GApplication test_GModel test_GSky test_GOptimizer test_GObservation test_MWL test_CTA test_LAT test_COM clang++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -g -O2 -c -o test_GSupport-test_GSupport.o `test -f 'test_GSupport.cpp' || echo './'`test_GSupport.cpp test_GSupport.cpp:34:10: fatal error: 'GammaLib.hpp' file not found #include "GammaLib.hpp" ^ 1 error generated.
Jürgen, do you know how to fix this?
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 11 years ago
Is this new feature backward compatible?
The are important changes as the autotools evolve, and I was wondering whether using AM_CPPFLAGS
is also working on older systems. The autotools configuration things is a nightmare.
I started a special autoconf / automake matrix test on your new branch (see https://cta-jenkins.irap.omp.eu/job/gammalib-release-tools/14/). This may tell how compatible the feature is.
#2 Updated by Deil Christoph over 11 years ago
- Assigned To changed from Deil Christoph to Knödlseder Jürgen
Jürgen Knödlseder wrote:
Is this new feature backward compatible?
No idea.
Note that with make check
an include is missing (see error above).
I could start to understand auto tools and try to fix this myself, but it would take time ...
#3 Updated by Knödlseder Jürgen over 11 years ago
- % Done changed from 0 to 10
I recognized that #include “GammaLib.hpp” was in both the .cpp and .hpp files of test_GSupport (and two other test routines).
I removed this, although this should not pose any problem in principle.
But I recognized that in
clang++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -g -O2 -c -o test_GSupport-test_GSupport.o `test -f 'test_GSupport.cpp' || echo './'`test_GSupport.cpp
I can’t see an include path towards the GammaLib header files. On my Mac I get
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../src -I../src/support -I../inst/mwl/include -I../inst/cta/include -I../inst/lat/include -I../inst/com/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/opt/local/include -g -O2 -fopenmp -c -o test_GSupport-test_GSupport.o `test -f 'test_GSupport.cpp' || echo './'`test_GSupport.cpp
and here,
-I../include
, -I../inst/mwl/include
, etc. are essential. These includes are missing in your version ...#4 Updated by Deil Christoph over 11 years ago
Hmm, I’ll try this branch on mac-ci.mooo.com
now, hopefully the issue will show up on that machine where we both have access now.
#5 Updated by Deil Christoph over 11 years ago
I see the same missing include -I
flags on mac-ci.mooo.com
:
clang++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/include -g -O2 -c -o test_GSupport-test_GSupport.o `test -f 'test_GSupport.cpp' || echo './'`test_GSupport.cpp test_GSupport.cpp:34:10: fatal error: 'GammaLib.hpp' file not found #include "GammaLib.hpp" ^ 1 error generated.
I don’t know where to look for the problem ...
#6 Updated by Knödlseder Jürgen over 11 years ago
It looks as if the includes are simply ignored.
#7 Updated by Knödlseder Jürgen over 10 years ago
Christoph, is this issue still relevant?
#8 Updated by Deil Christoph over 10 years ago
The warnings in the original issue description are still there.
The error with the missing include is not there any more on my current machine, which runs Mac OS X 10.9 with Xcode 5.
#9 Updated by Knödlseder Jürgen over 10 years ago
Indeed, warning are still there. But when I change things I break the package for older autoconf/automake versions.
Since these are still warnings only, we probably have to live with them.