Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dump conftest.c?

Tags:

dump

autoconf

I have problems linking to a lot of libraries with a cross-compiler. Is it possible to dump the file conftest.c to a safe location each time it's being generated?

I tried to uncomment the lines

rm -f conftest

from the configure script, but it continues like it means nothing.

like image 245
John Smith Avatar asked Jun 04 '13 18:06

John Smith


2 Answers

For me it prints the code on failure but to force it I created a wrapper script:

#!/bin/sh

for i in "$@"; do
  if echo "$i" | grep -q '\.c$'; then
     echo printing $i
     cat "$i"
  fi
done

exec cc "$@"

Then run with

$ CC=$PWD/cc.sh ./configure
like image 189
Tristan Hill Avatar answered Nov 18 '22 12:11

Tristan Hill


Check the config.log, it includes the failed program Something like:

...
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libogg"
| #define VERSION "1.2.2"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
...
like image 10
Alessandro Russo Avatar answered Nov 18 '22 12:11

Alessandro Russo