conftest.cc disappearing in a misterious way

Hi there,
a user has troubles configuring a (autoconfiscated) library we have written. He is on a (fully up-to-date and not hacked in any way) Cygwin system and uses a configure script generated by Autoconf 2.59. Below is, I believe, the relevant section of config.log. To summarize:
1) tests are made for signal.h usability and presence: these are both successful; 2) immediately after, a test for sys/time.h presence failes because "g++: conftest.cc: No such file or directory". This is strange, because conftest.cc should have been created by the configure script. 3) The test for sys/time.h usability succeeds! 4) Both tests for sys/resource.h presence and usability fail for the same reason: "g++: conftest.cc: No such file or directory".
configure:29564: checking signal.h usability configure:29576: g++ -c -g -O2 conftest.cc >&5 configure:29582: $? = 0 configure:29586: test -z || test ! -s conftest.err configure:29589: $? = 0 configure:29592: test -s conftest.o configure:29595: $? = 0 configure:29605: result: yes configure:29609: checking signal.h presence configure:29619: g++ -E conftest.cc configure:29625: $? = 0 configure:29645: result: yes configure:29680: checking for signal.h configure:29687: result: yes configure:29564: checking sys/time.h usability configure:29576: g++ -c -g -O2 conftest.cc >&5 configure:29582: $? = 0 configure:29586: test -z || test ! -s conftest.err configure:29589: $? = 0 configure:29592: test -s conftest.o configure:29595: $? = 0 configure:29605: result: yes configure:29609: checking sys/time.h presence configure:29619: g++ -E conftest.cc g++: conftest.cc: No such file or directory g++: no input files configure:29625: $? = 1 configure: failed program was: configure:29645: result: no configure:29651: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor! configure:29653: WARNING: sys/time.h: proceeding with the compiler's result configure:29680: checking for sys/time.h configure:29687: result: yes configure:29564: checking sys/resource.h usability configure:29576: g++ -c -g -O2 conftest.cc >&5 g++: conftest.cc: No such file or directory g++: no input files configure:29582: $? = 1 configure: failed program was: configure:29605: result: no configure:29609: checking sys/resource.h presence configure:29619: g++ -E conftest.cc g++: conftest.cc: No such file or directory g++: no input files configure:29625: $? = 1 configure: failed program was: configure:29645: result: no configure:29680: checking for sys/resource.h configure:29687: result: no configure:29555: checking for sys/time.h configure:29560: result: yes configure:29555: checking for sys/types.h configure:29560: result: yes configure:29555: checking for unistd.h configure:29560: result: yes
I have googled for around one hour and I have seen that many people had this problem in the past (just replace "conftest.cc" with "conftest.c" in the search), but noone seems to have found the cause. Not having access to the user's machine I don't know how to proceed, since I cannot reproduce the problem on my machines. A careful inspection of the entire config.log output did not reveal anything to me. Any idea what may be wrong? All the best,
Roberto

* Roberto Bagnara wrote on Wed, Jul 06, 2005 at 11:32:23AM CEST:
- tests are made for signal.h usability and presence: these are both successful;
- immediately after, a test for sys/time.h presence failes because "g++: conftest.cc: No such file or directory". This is strange, because conftest.cc should have been created by the configure script.
- The test for sys/time.h usability succeeds!
- Both tests for sys/resource.h presence and usability fail for the same reason: "g++: conftest.cc: No such file or directory".
Please post (a reference to or contents of) lines 29550 to 29700 of the configure script.
Unless you did some copy and paste error, there is something fishy going on here:
configure:29564: checking signal.h usability
^^^^^
configure:29576: g++ -c -g -O2 conftest.cc >&5 configure:29582: $? = 0 configure:29586: test -z || test ! -s conftest.err configure:29589: $? = 0 configure:29592: test -s conftest.o configure:29595: $? = 0 configure:29605: result: yes configure:29609: checking signal.h presence configure:29619: g++ -E conftest.cc configure:29625: $? = 0 configure:29645: result: yes configure:29680: checking for signal.h configure:29687: result: yes configure:29564: checking sys/time.h usability
^^^^^
this should be larger than 29687. Somehow it jumps back?
configure:29576: g++ -c -g -O2 conftest.cc >&5 configure:29582: $? = 0 configure:29586: test -z || test ! -s conftest.err configure:29589: $? = 0 configure:29592: test -s conftest.o configure:29595: $? = 0 configure:29605: result: yes configure:29609: checking sys/time.h presence configure:29619: g++ -E conftest.cc g++: conftest.cc: No such file or directory g++: no input files configure:29625: $? = 1 configure: failed program was: configure:29645: result: no configure:29651: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor! configure:29653: WARNING: sys/time.h: proceeding with the compiler's result configure:29680: checking for sys/time.h configure:29687: result: yes configure:29564: checking sys/resource.h usability configure:29576: g++ -c -g -O2 conftest.cc >&5 g++: conftest.cc: No such file or directory g++: no input files configure:29582: $? = 1 configure: failed program was: configure:29605: result: no configure:29609: checking sys/resource.h presence configure:29619: g++ -E conftest.cc g++: conftest.cc: No such file or directory g++: no input files configure:29625: $? = 1 configure: failed program was: configure:29645: result: no configure:29680: checking for sys/resource.h configure:29687: result: no configure:29555: checking for sys/time.h configure:29560: result: yes configure:29555: checking for sys/types.h configure:29560: result: yes configure:29555: checking for unistd.h configure:29560: result: yes
I have googled for around one hour and I have seen that many people had this problem in the past (just replace "conftest.cc" with "conftest.c" in the search), but noone seems to have found the cause.
*snip*
Regards, Ralf

Ralf Wildenhues wrote:
- Roberto Bagnara wrote on Wed, Jul 06, 2005 at 11:32:23AM CEST:
- tests are made for signal.h usability and presence:
these are both successful; 2) immediately after, a test for sys/time.h presence failes because "g++: conftest.cc: No such file or directory". This is strange, because conftest.cc should have been created by the configure script. 3) The test for sys/time.h usability succeeds! 4) Both tests for sys/resource.h presence and usability fail for the same reason: "g++: conftest.cc: No such file or directory".
Please post (a reference to or contents of) lines 29550 to 29700 of the configure script.
Unless you did some copy and paste error, there is something fishy going on here:
Dear Ralph,
I have asked the user to send me the complete configure script. Meanwhile, I have uploaded the config.log the user sent me: you can fetch it from
http://www.cs.unipr.it/~bagnara/config.log
I don't think I have made any copy and paste error, but maybe you can spot the cause of the problem.
configure:29564: checking signal.h usability
^^^^^
configure:29576: g++ -c -g -O2 conftest.cc >&5 configure:29582: $? = 0 configure:29586: test -z || test ! -s conftest.err configure:29589: $? = 0 configure:29592: test -s conftest.o configure:29595: $? = 0 configure:29605: result: yes configure:29609: checking signal.h presence configure:29619: g++ -E conftest.cc configure:29625: $? = 0 configure:29645: result: yes configure:29680: checking for signal.h configure:29687: result: yes configure:29564: checking sys/time.h usability
^^^^^
this should be larger than 29687. Somehow it jumps back?
Yes, because it is in a loop: this is resulting from
AC_CHECK_HEADERS([getopt.h signal.h sys/time.h sys/resource.h sys/time.h sys/types.h unistd.h])
Cheers,
Roberto

Hi,
* Roberto Bagnara wrote on Wed, Jul 06, 2005 at 05:36:17PM CEST:
Ralf Wildenhues wrote:
- Roberto Bagnara wrote on Wed, Jul 06, 2005 at 11:32:23AM CEST:
I have asked the user to send me the complete configure script. Meanwhile, I have uploaded the config.log the user sent me: you can fetch it from
I don't think I have made any copy and paste error, but maybe you can spot the cause of the problem.
this should be larger than 29687. Somehow it jumps back?
Yes, because it is in a loop: this is resulting from
Yes, I did bang by head against some imaginary wall after I sent this. Not my day today, sorry.
You said you searched for this already: are all systems this happens on on win32? Maybe some unrelated process keeps some file open or prevents writing to some file? (just another wild guess though)
Regards, Ralf

Ralf Wildenhues wrote:
You said you searched for this already: are all systems this happens on on win32? Maybe some unrelated process keeps some file open or prevents writing to some file? (just another wild guess though)
No, these seemed to be more or less system independent: Linux, FreeBSD, Solaris, Cygwin, ... I googled for "conftest.c: No such file". Cheers,
Roberto

Hi Roberto,
* Roberto Bagnara wrote on Wed, Jul 06, 2005 at 06:46:40PM CEST:
Ralf Wildenhues wrote:
You said you searched for this already: are all systems this happens on on win32? Maybe some unrelated process keeps some file open or prevents writing to some file? (just another wild guess though)
No, these seemed to be more or less system independent: Linux, FreeBSD, Solaris, Cygwin, ... I googled for "conftest.c: No such file".
I now did that, too. First thing: I find only one reference to "conftest.cc: No such file" and while there are numerous such with conftest.c, reasons for failure are usually: - full disk - no write permission in the build tree - issuing more than one configure at the same time in the same build tree - buggy configure script and/or shell cause shell hiccups
Don't know whether any of these pertain to your case, though.
Regards, Ralf

Ralf Wildenhues Ralf.Wildenhues@gmx.de writes:
Hi Roberto,
- Roberto Bagnara wrote on Wed, Jul 06, 2005 at 06:46:40PM CEST:
Ralf Wildenhues wrote:
You said you searched for this already: are all systems this happens on on win32? Maybe some unrelated process keeps some file open or prevents writing to some file? (just another wild guess though)
No, these seemed to be more or less system independent: Linux, FreeBSD, Solaris, Cygwin, ... I googled for "conftest.c: No such file".
I now did that, too. First thing: I find only one reference to "conftest.cc: No such file" and while there are numerous such with conftest.c, reasons for failure are usually:
I don't know if this is ueful; but I came across a similar issue some months ago with a configure script for Fortran, where conftest.f was vanishing. The culprit turned out to be an errant trap which was being triggered elsewhere, which specifically deleted conftest.*, but somehow didn't stop the configure script proceeding.
The ultimate cause turned out to be a buggy compiler on the platform in question - unfortunately I can't remember precisely the details of how that resulted in the odd behaviour; but I do remember it being very difficult to find, until I discovered the trap in question.

* Toby White wrote on Thu, Jul 07, 2005 at 12:03:33PM CEST:
Ralf Wildenhues Ralf.Wildenhues@gmx.de writes:
I now did that, too. First thing: I find only one reference to "conftest.cc: No such file" and while there are numerous such with conftest.c, reasons for failure are usually:
I don't know if this is ueful; but I came across a similar issue some months ago with a configure script for Fortran, where conftest.f was vanishing. The culprit turned out to be an errant trap which was being triggered elsewhere, which specifically deleted conftest.*, but somehow didn't stop the configure script proceeding.
The ultimate cause turned out to be a buggy compiler on the platform in question - unfortunately I can't remember precisely the details of how that resulted in the odd behaviour; but I do remember it being very difficult to find, until I discovered the trap in question.
This sounds like a good culprit candidate. Do you remember which shell this was on, and the exact configure script? It'd be good to be able to reconstruct what triggered the trap and whether that is a shell bug or a configure.ac script bug or an Autoconf bug.
Regards, Ralf

Ralf Wildenhues wrote:
- Toby White wrote on Thu, Jul 07, 2005 at 12:03:33PM CEST:
Ralf Wildenhues Ralf.Wildenhues@gmx.de writes:
I now did that, too. First thing: I find only one reference to "conftest.cc: No such file" and while there are numerous such with conftest.c, reasons for failure are usually:
I don't know if this is ueful; but I came across a similar issue some months ago with a configure script for Fortran, where conftest.f was vanishing. The culprit turned out to be an errant trap which was being triggered elsewhere, which specifically deleted conftest.*, but somehow didn't stop the configure script proceeding.
The ultimate cause turned out to be a buggy compiler on the platform in question - unfortunately I can't remember precisely the details of how that resulted in the odd behaviour; but I do remember it being very difficult to find, until I discovered the trap in question.
This sounds like a good culprit candidate. Do you remember which shell this was on, and the exact configure script? It'd be good to be able to reconstruct what triggered the trap and whether that is a shell bug or a configure.ac script bug or an Autoconf bug.
It was on a machine to which I no longer have access; but it was an old-ish Digital Unix machine ... Ah-ha - I've just realised that I emailed the mailing list at the time http://lists.gnu.org/archive/html/autoconf/2004-07/msg00077.html
And it looks like I was misremembering slightly. There was also a buggy compiler on that system, but it had nothing to do with the problem, which was actually conftest.c disappearing, and as you probably saw when you searched earlier - it was all due to a buggy shell (very old bash version) So - probably irrelevant; sorry.
Still - if you do have a magically disappearing file, I would try and put some echo output into all the traps to see if it is a trap being triggered. Might lead you somewhere.

Ralf Wildenhues wrote:
- Roberto Bagnara wrote on Wed, Jul 06, 2005 at 11:32:23AM CEST:
- tests are made for signal.h usability and presence:
these are both successful; 2) immediately after, a test for sys/time.h presence failes because "g++: conftest.cc: No such file or directory". This is strange, because conftest.cc should have been created by the configure script. 3) The test for sys/time.h usability succeeds! 4) Both tests for sys/resource.h presence and usability fail for the same reason: "g++: conftest.cc: No such file or directory".
Please post (a reference to or contents of) lines 29550 to 29700 of the configure script.
I include that lines here below. The complete `configure' is at
http://www.cs.unipr.it/~bagnara/configure
Many thanks,
Roberto
for ac_header in getopt.h signal.h sys/time.h sys/resource.h sys/time.h sys/types.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test "${$as_ac_Header+set}" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test "${$as_ac_Header+set}" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: $? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: $? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: $? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: "$ac_cpp conftest.$ac_ext"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: $? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5 echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<_ASBOX ## ------------------------------------ ## ## Report this to ppl-devel@cs.unipr.it ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test "${$as_ac_Header+set}" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF
fi
done
participants (3)
-
Ralf Wildenhues
-
Roberto Bagnara
-
Toby White