When I try to "./configure" V.2.7, I have following error reported:
------------
...
checking printf length modifier for the longest integer... (cached) j
./configure: line 22097: syntax error near unexpected token `('
./configure: line 22097: ` for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do'
------------
This happens on Slackware Linux 12.0 machine, with both gcc 4.1.2 and gcc 4.2.3. I tried to re-generate autoconf/automake files with "autoreconf -i", and then to re-run configure script, but to the same result...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The configure of mcpp V.2.7 does not have such a line as cited near 22097. The last revision of SVN (i.e. 97) does not have the line too.
1. Which version or revision did you try? V.2.7, revision 97, or any other revision?
2. Maybe you cited a re-generated script. Would you retry the original configure?
The configure was generated by autoconf 2.59 and automake 1.9.6 upto mcpp V.2.7, which is SVN revision 95, and revision 96. The last revision 97 was generated by autoconf 2.61 and automake 1.10.
I tested the configures on three distributions of Linux, as well as FreeBSD and Mac OS X. Fedora 8, Debian 4.0, and Vine 4.2 (a Japanese distribution). GCC 4.1.* on each distribution and 4.3.0 on Fedora 8.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-04-18
Sorry, that message was indeed from the re-generated script. I've tried with both original, and re-generated script, and both are reporting errors. Original script is reporting following:
------------
...
./configure: line 21297: syntax error near unexpected token `('
./configure: line 21297: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in'
------------
The cited line is in an autoconf generated part to make config.cache. That part is commonly generated by autoconf 2.59 for any configure.ac. For example, the configure of glibc 2.4 has the same part with line 21274 through 21363 of mcpp V.2.7 configure, and the configure of gcc 4.3.0 has the same part with line 21274 through 21347.
It is impossible that the part causes an error. Maybe the problem occurs at somewhere before that part. After configuring printf modifier for long long, test of __GNUC__ follows. Some scripts around it may be hard to some Slackware tool. But, I can't guess any more. Sorry.
Note that execution of the configure does not need autoconf or automake, and mixture of autotools related scripts of different versions may cause trouble.
Are there anyone using Slackware 12?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-04-21
I think that I've found what is causing the problem: in lines 299, 321 and 327 of your configure.ac file (I'm talking about V.2.7 tarball, as downloaded from SF), you have tr command used as folows:
tr '\\\', '/'
When that changed to (which I think would be right anyway):
tr '\\', '/'
then "autorecof -fi && ./configure" is passing fine (on machine with above mentioned versions of autoconf and automake).
Any comment?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-04-21
Sorry, without these commas in tr command invocations - don't know how I've put these there when I was copy-pasting what appears in mentioned lines of configure.ac... BTW, same change could be made directly in configure script, and again it works fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the debugging!
I see... But, this is not so easy problem to cope with.
1. I know the sequence "tr '\\\' '/'" has a redundant backslash. But, it is to work around a problem of CygWIN and MinGW.
2. On Fedora, Debian and Mac OS X, bash skips the block for CygWIN or MinGW. Also sh (ash?) on FreeBSD behaves the same way.
3. On Slackware, however, the sh (bash?) seems to parse the lines in the blocks-to-be-skipped, parses '\\\' to ', \\, \', and loses closing '. It is one of the reasonable implementations, I suppose.
4. It is hard to cope with both of CygWIN/MinGW and Slackware in configure.ac text. On the next revision, I will provide a separate file for CygWIN/MinGW and include it in configure.ac.
5. The redundant comma in "tr '\\\', '/'" was written by me. I can't remember why I inserted it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-04-22
Yes, seems that shell version is what is important after all. It's bash on Slackware 12.0, version 3.1.017.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I committed SVN revision 99, and separated the three lines with "tr '\\\' '/'" sequence from configure.ac to config/cygwin_root and config/mingw_root.
I can't yet find any regularity of behavior of various shells (bash).
The version of bash:
Mingw 3.4.5: 2.04
Vine Linux 4.2: 2.05
Cygwin 3.4.4: 3.00
(Slackware 12.0: 3.1.017)
Debian 4.0: 3.1.17
Mac OS X 10.5: 3.2.17
Fedora 8: 3.2.33
1. MinGW 3.4.5 (bash 2.04) doesn't work well with "tr '\\' '/'", and works with an extra backslash as "tr '\\\' '/'".
2. Other bashes all work well with "tr '\\' '/'".
3. Slackware 12.0 (bash 3.1.017) gets an error on an extra backslash even in a block for MinGW, other bashes do not.
4. In addition, the separated line (config/mingw_root) works well without the extra backslash even on MinGW!
Anyway, if we separate the delicate lines from configure.ac, no problem occurs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I try to "./configure" V.2.7, I have following error reported:
------------
...
checking printf length modifier for the longest integer... (cached) j
./configure: line 22097: syntax error near unexpected token `('
./configure: line 22097: ` for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do'
------------
This happens on Slackware Linux 12.0 machine, with both gcc 4.1.2 and gcc 4.2.3. I tried to re-generate autoconf/automake files with "autoreconf -i", and then to re-run configure script, but to the same result...
The configure of mcpp V.2.7 does not have such a line as cited near 22097. The last revision of SVN (i.e. 97) does not have the line too.
1. Which version or revision did you try? V.2.7, revision 97, or any other revision?
2. Maybe you cited a re-generated script. Would you retry the original configure?
The configure was generated by autoconf 2.59 and automake 1.9.6 upto mcpp V.2.7, which is SVN revision 95, and revision 96. The last revision 97 was generated by autoconf 2.61 and automake 1.10.
I tested the configures on three distributions of Linux, as well as FreeBSD and Mac OS X. Fedora 8, Debian 4.0, and Vine 4.2 (a Japanese distribution). GCC 4.1.* on each distribution and 4.3.0 on Fedora 8.
Sorry, that message was indeed from the re-generated script. I've tried with both original, and re-generated script, and both are reporting errors. Original script is reporting following:
------------
...
./configure: line 21297: syntax error near unexpected token `('
./configure: line 21297: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in'
------------
I tried both MCPP 2.7 source tarball available for download from http://sourceforge.net/project/showfiles.php?group_id=165953, as well as SVN checkout (r97).
My autoconf and automake versions are 2.61 and 1.9.6, respectively.
The cited line is in an autoconf generated part to make config.cache. That part is commonly generated by autoconf 2.59 for any configure.ac. For example, the configure of glibc 2.4 has the same part with line 21274 through 21363 of mcpp V.2.7 configure, and the configure of gcc 4.3.0 has the same part with line 21274 through 21347.
It is impossible that the part causes an error. Maybe the problem occurs at somewhere before that part. After configuring printf modifier for long long, test of __GNUC__ follows. Some scripts around it may be hard to some Slackware tool. But, I can't guess any more. Sorry.
Note that execution of the configure does not need autoconf or automake, and mixture of autotools related scripts of different versions may cause trouble.
Are there anyone using Slackware 12?
I think that I've found what is causing the problem: in lines 299, 321 and 327 of your configure.ac file (I'm talking about V.2.7 tarball, as downloaded from SF), you have tr command used as folows:
tr '\\\', '/'
When that changed to (which I think would be right anyway):
tr '\\', '/'
then "autorecof -fi && ./configure" is passing fine (on machine with above mentioned versions of autoconf and automake).
Any comment?
Sorry, without these commas in tr command invocations - don't know how I've put these there when I was copy-pasting what appears in mentioned lines of configure.ac... BTW, same change could be made directly in configure script, and again it works fine.
Thanks for the debugging!
I see... But, this is not so easy problem to cope with.
1. I know the sequence "tr '\\\' '/'" has a redundant backslash. But, it is to work around a problem of CygWIN and MinGW.
2. On Fedora, Debian and Mac OS X, bash skips the block for CygWIN or MinGW. Also sh (ash?) on FreeBSD behaves the same way.
3. On Slackware, however, the sh (bash?) seems to parse the lines in the blocks-to-be-skipped, parses '\\\' to ', \\, \', and loses closing '. It is one of the reasonable implementations, I suppose.
4. It is hard to cope with both of CygWIN/MinGW and Slackware in configure.ac text. On the next revision, I will provide a separate file for CygWIN/MinGW and include it in configure.ac.
5. The redundant comma in "tr '\\\', '/'" was written by me. I can't remember why I inserted it.
Yes, seems that shell version is what is important after all. It's bash on Slackware 12.0, version 3.1.017.
I committed SVN revision 99, and separated the three lines with "tr '\\\' '/'" sequence from configure.ac to config/cygwin_root and config/mingw_root.
I can't yet find any regularity of behavior of various shells (bash).
The version of bash:
Mingw 3.4.5: 2.04
Vine Linux 4.2: 2.05
Cygwin 3.4.4: 3.00
(Slackware 12.0: 3.1.017)
Debian 4.0: 3.1.17
Mac OS X 10.5: 3.2.17
Fedora 8: 3.2.33
1. MinGW 3.4.5 (bash 2.04) doesn't work well with "tr '\\' '/'", and works with an extra backslash as "tr '\\\' '/'".
2. Other bashes all work well with "tr '\\' '/'".
3. Slackware 12.0 (bash 3.1.017) gets an error on an extra backslash even in a block for MinGW, other bashes do not.
4. In addition, the separated line (config/mingw_root) works well without the extra backslash even on MinGW!
Anyway, if we separate the delicate lines from configure.ac, no problem occurs.