Opened 17 years ago
Closed 15 years ago
#118 closed enhancement (fixed)
Overhaul of configure.ac
Reported by: | Jari Häkkinen | Owned by: | Jari Häkkinen |
---|---|---|---|
Priority: | major | Milestone: | yat 0.4 |
Component: | build | Version: | trunk |
Keywords: | Cc: |
Description
A couple of checks in configure.ac are not behaving properly (an example is the check for atlas API). The compiler flags setting should be controlled with an --enable-debug. Some environment flags are not properly used.
Change History (38)
comment:1 Changed 16 years ago by
comment:3 follow-up: 12 Changed 16 years ago by
-lm and -lgslcblas is added twice at linking (in test directory).
comment:4 follow-up: 13 Changed 16 years ago by
A libtool command with -g appears when making the project with non-debug options, why?
/bin/sh ../libtool --mode=link gcc -g -O2 -o libyat.la -rpath /usr/local/lib classifier/libclassifier.la microarray/libmicroarray.la random/librandom.la regression/libregression.la statistics/libstatistics.la utility/libutility.la -lgslcblas -lm
comment:5 Changed 16 years ago by
Can we use this to speed up configure? Also check-out GSL configure.ac for nice things to use dnl Disable unnecessary libtool tests for c++,fortran,java define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl AC_PROG_LIBTOOL
comment:6 Changed 16 years ago by
Would it be possible to give warnings for missing programs needed in doc/ such as doxygen, latex, latex2html, and dvipdfm.
These are not stricly needed for using yat, but a warning could be appropriate to let the user know that all documetation can not be generated.
comment:7 Changed 16 years ago by
Status: | new → assigned |
---|
comment:8 Changed 16 years ago by
Milestone: | 0.3 (Public release) → 0.4 |
---|
comment:9 Changed 16 years ago by
Owner: | Jari Häkkinen deleted |
---|---|
Status: | assigned → new |
comment:10 follow-up: 16 Changed 16 years ago by
Removed reference telling developers to look for FIXME in configure.ac. FIXME is replaced with this nice facility. One FIXME was moved here:
...or maybe one should use autoreconf! FIXME: Can the 'bootstrap' script be replaced with autoreconf?
comment:11 Changed 16 years ago by
comment:12 Changed 16 years ago by
Replying to jari:
-lm and -lgslcblas is added twice at linking (in test directory).
I can't see this in my environment. Has it been fixed or is it depending on the environment?
comment:13 follow-ups: 15 20 Changed 16 years ago by
Replying to jari:
A libtool command with -g appears when making the project with non-debug options, why?
/bin/sh ../libtool --mode=link gcc -g -O2 -o libyat.la -rpath /usr/local/lib classifier/libclassifier.la microarray/libmicroarray.la random/librandom.la regression/libregression.la statistics/libstatistics.la utility/libutility.la -lgslcblas -lm
I looked into how automake works (well simply looked into the Maqkefile). The -g -O2
comes from variable CFLAGS
, which is set to -g -O2
whereas variable
CXXFLAGS is set to
-Wall -pedantic -O3`.
Why is CFLAGS (not CXXFLAGS) used when bundling together libs? Should we set CFLAGS to follow CXXFLAGS?
comment:14 follow-up: 19 Changed 16 years ago by
(In [944]) added test for presence for doxygen, latex, dvipdfm, and latex2html. If not found and configure is run in --enable-debug mode a warning is given. On default mode (non-debug) no warnings are given because if running configure in a distribution the documentation should already be there and a warning seems odd.
comment:15 follow-up: 21 Changed 16 years ago by
Replying to peter:
Replying to jari:
A libtool command with -g appears when making the project with non-debug options, why?
/bin/sh ../libtool --mode=link gcc -g -O2 -o libyat.la -rpath /usr/local/lib classifier/libclassifier.la microarray/libmicroarray.la random/librandom.la regression/libregression.la statistics/libstatistics.la utility/libutility.la -lgslcblas -lm
I looked into how automake works (well simply looked into the Maqkefile). The
-g -O2
comes from variableCFLAGS
, which is set to-g -O2
whereasvariable
CXXFLAGSis set to
-Wall -pedantic -O3`.Why is CFLAGS (not CXXFLAGS) used when bundling together libs? Should we set CFLAGS to follow CXXFLAGS?
In [946] CFLAGS is set to CXXFLAGS
comment:16 follow-up: 18 Changed 16 years ago by
Replying to jari:
Removed reference telling developers to look for FIXME in configure.ac. FIXME is replaced with this nice facility. One FIXME was moved here:
...or maybe one should use autoreconf! FIXME: Can the 'bootstrap' script be replaced with autoreconf?
No. I checked out a yat, and issued autoreconf
in this pristine yat. I got the following warning/eror message:
configure.ac:68: required file `autotools/config.sub' not found configure.ac:68: `automake --add-missing' can install `config.sub' configure.ac:37: required file `autotools/missing' not found configure.ac:37: `automake --add-missing' can install `missing' configure.ac:37: required file `autotools/install-sh' not found configure.ac:37: `automake --add-missing' can install `install-sh' configure.ac:68: required file `autotools/config.guess' not found configure.ac:68: `automake --add-missing' can install `config.guess' test/Makefile.am: required file `autotools/depcomp' not found test/Makefile.am: `automake --add-missing' can install `depcomp' Makefile.am: required file `./INSTALL' not found Makefile.am: `automake --add-missing' can install `INSTALL' Makefile.am: required file `./COPYING' not found Makefile.am: `automake --add-missing' can install `COPYING' configure.ac:68: required file `autotools/ltmain.sh' not found autoreconf: automake failed with exit status: 1
comment:17 Changed 16 years ago by
Everything is fixed except comment:5 and comment:2. comment:2 has been forked to another ticket ticket:217
When comment:5 is fixed, we can close this ticket.
comment:18 Changed 16 years ago by
Replying to peter:
No. I checked out a yat, and issued
autoreconf
in this pristine yat. I got the following warning/eror message:configure.ac:68: required file `autotools/config.sub' not found configure.ac:68: `automake --add-missing' can install `config.sub' configure.ac:37: required file `autotools/missing' not found configure.ac:37: `automake --add-missing' can install `missing' configure.ac:37: required file `autotools/install-sh' not found configure.ac:37: `automake --add-missing' can install `install-sh' configure.ac:68: required file `autotools/config.guess' not found configure.ac:68: `automake --add-missing' can install `config.guess' test/Makefile.am: required file `autotools/depcomp' not found test/Makefile.am: `automake --add-missing' can install `depcomp' Makefile.am: required file `./INSTALL' not found Makefile.am: `automake --add-missing' can install `INSTALL' Makefile.am: required file `./COPYING' not found Makefile.am: `automake --add-missing' can install `COPYING' configure.ac:68: required file `autotools/ltmain.sh' not found autoreconf: automake failed with exit status: 1
I was somewhat unclear. A first time repository checkout will need to run bootstrap since we do not distribute all needed file for autotools. However, after doing the first bootstrap I think that autoreconf is enough.
comment:19 follow-up: 24 Changed 16 years ago by
Replying to peter:
(In [944]) added test for presence for doxygen, latex, dvipdfm, and latex2html. If not found and configure is run in --enable-debug mode a warning is given. On default mode (non-debug) no warnings are given because if running configure in a distribution the documentation should already be there and a warning seems odd.
Should these test turn off appropriate parts of 'make doc'?
comment:20 Changed 16 years ago by
Replying to peter:
Why is CFLAGS (not CXXFLAGS) used when bundling together libs? Should we set CFLAGS to follow CXXFLAGS?
No!
comment:21 Changed 16 years ago by
comment:22 Changed 16 years ago by
Now the linker inherits the CXXFLAGS setting. Is this the default behaviour? This is not as serious as previos FLAGS conflicts since it does not add debug info to the code (unless requested). Can we close this ticket without resolving this?
comment:23 follow-up: 26 Changed 16 years ago by
Ok, I thought it was better to implement (and risking to get spanked) than waiting for the congress to approve my suggestion. I buy your comment: "No!" without understanding the underlying reasons.
comment:24 Changed 16 years ago by
Owner: | set to Peter |
---|---|
Status: | new → assigned |
Replying to jari:
Replying to peter:
(In [944]) added test for presence for doxygen, latex, dvipdfm, and latex2html. If not found and configure is run in --enable-debug mode a warning is given. On default mode (non-debug) no warnings are given because if running configure in a distribution the documentation should already be there and a warning seems odd.
Should these test turn off appropriate parts of 'make doc'?
Yes, that is a great idea. I'll fix that and after that I think we can close this ticket.
comment:25 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [957]) Generation of documentation is disabled if software is missing. For example if doxygen is missing doxygen is not issued, but for example Statistics.pdf is generated and so on and so forth.
Also, I added variables dvi-local, pdf-local, and html-local. This means that one now can issue ,e.g., 'make pdf' and hopefully get what one was hoping for.
I divided clean-local into clean-local and mostlyclean-local. The latter is included in a 'make mostlyclean' call and both are included in a 'make clean' call.
comment:26 Changed 16 years ago by
Replying to peter:
Ok, I thought it was better to implement (and risking to get spanked) than waiting for the congress to approve my suggestion. I buy your comment: "No!" without understanding the underlying reasons.
Well, setting the flags to the same is valid if that is what we want to achieve. Here we want to resolve an issue with linker flags and the suggested solution was bad (even though it resolved the problem). We should not set CFLAGS since we do not compile any C code, at least we believe that we create C++ code. Simply but, it is a question of style.
comment:27 Changed 16 years ago by
I'd like to review the configure.ac before we close it. Does anyone have more outstanding issues with autoconf? Ah, come to think of it, I have one: The current check for atlas does not work with the latest beta release 3.7.79. So, I have two things i) revieww and ii) atlas check.
comment:28 Changed 16 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Oups, I didn't noticed that the ticket was closed. I suppose you are happy with configure.ac but see my previous comment.
comment:29 Changed 16 years ago by
Owner: | changed from Peter to Jari Häkkinen |
---|---|
Status: | reopened → new |
comment:30 Changed 16 years ago by
Status: | new → assigned |
---|
comment:31 Changed 16 years ago by
Yes, I was happy. But if you are not happy I am not happy. Everything in the discussion was resolved and the initial discussion was very unspecific, so I found it good to close. Fortunately as Trac is a good software, it allows reopening of tickets.
comment:32 Changed 16 years ago by
How about 32-bit and 64-bit detection/support? Working on ATLAS detection I realize that ATLAS wants to tune the ATLAS provided libraries as 64-bit libraries. So, using ATLAS will force me to make yat in 64-bit mode, and GSL in 64-bit mode ... Why isn't everything in 64-bits automatically on my 64-bit Mac? Examining some of the Apple provided C libraries it turnes out that they are universal binaries. No surprise there, but the surprise was that the libraries contain support for 32 and 64 bits architectures
$ file libBLAS.dylib libBLAS.dylib: Mach-O universal binary with 4 architectures libBLAS.dylib (for architecture i386): Mach-O dynamically linked shared library i386 libBLAS.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc libBLAS.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 libBLAS.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Ok, it should really be a surprise. Lets learn how to create semi-universal binaries; one with intel/AMD 32/64 bit support. ticket:275 was created for the semi-universal quest.
comment:33 follow-up: 34 Changed 16 years ago by
In my opinion two things remains to be fixed:
1) ATLAS detection works somewhat as of changeset:969, but requires a correct mix of 32/64 bit libraries. The problem is the -m64 flag required for my machine, but it may hurt on 32-bit machines where ATLAS is installed. This must be tested.
2) Figure out why CXXFLAGS defaults to "-g -O2", probably something trivial but it is very late now. Anyhow, there is one line simply setting CXXFLAGS to an empty string for now.
comment:34 Changed 16 years ago by
Replying to jari:
2) Figure out why CXXFLAGS defaults to "-g -O2", probably something trivial but it is very late now. Anyhow, there is one line simply setting CXXFLAGS to an empty string for now.
From the autoconf manual:
Describing macro AC_PROG_CXX:
If using the GNU C++ compiler, set shell variable GXX to ‘yes’. If output variable CXXFLAGS was not already set, set it to ‘-g -O2’ for the GNU C++ compiler (‘-O2’ on systems where G++ does not accept ‘-g’), or ‘-g’ for other compilers.
comment:35 Changed 16 years ago by
The current CXXFLAGS=""
probably destoys the behaviour of ./configure CXXFLAGS="-g -O2"
and need to be tested/fixed. Is it possible to do Makefile style CXXFLAGS?=""
?
comment:36 Changed 16 years ago by
Component: | classifier → build |
---|
comment:38 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
--enable-debug is fixed.