I'm trying to build a program I've written in C using GNU autotools, but I evidently have it set up wrong because when configure
runs, it spits out:
configure: error: C compiler cannot create executables
If I look in config.log
, I see:
configure:2846: checking for C compiler default output file name
configure:2868: gcc conftest.c >&5
conftest.c:3:25: warning: missing terminating " character
conftest.c:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Jackoff"
| #define PACKAGE_TARNAME "jackoff
| http://github.com/enaeseth/jackoff"
| #define PACKAGE_VERSION "0.1"
| #define PACKAGE_STRING "Jackoff 0.1"
| #define PACKAGE_BUGREPORT "Eric Naeseth <enaeseth@gmail.com>"
| #define PACKAGE "jackoff
| http://github.com/enaeseth/jackoff"
| #define VERSION "0.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
For some reason, autoconf is generating an invalid test file: what should be on that line that is coming up as just an semicolon? The build fails in the same way on Ubuntu 9.04 and Mac OS X 10.6, so this is definitely my fault, not the environment's.
It looks like the problem is in a new-line character in "
jackoff http://github.com/enaeseth/jackoff
". Check that.The trouble is that there is a newline in the
PACKAGE_TARNAME
(andPACKAGE
), which is set in theconfigure.ac
file. You should look at what that contains - fix it, and regenerate theconfigure
script.One of my configure.ac scripts contains (near the top):
PACKAGE_TARNAME
doesn't look at all right. For one thing, it has an embedded newline, which is the direct cause of your problem.You have an extra argument for
AC_INIT
at the beginning of yourconfigure.ac
. Just remove it.