Tiny Core Extensions > TCE Talk
C compiler cannot create executables
nitram:
Noob alert, new to compiling anything more than hello world type stuff.
First attempt at creating a TC extension from source, running 6.1rc3:
rogue.rogueforge.net/rogue-5-4/
Rogue 5.4.4 Source Code
Encounter the following error:
configure: error: C compiler cannot create executables
config.log indicates:
configure: exit 77
Will google more tomorrow. All pointers and feedback appreciated. Thanks - nitram
************************************************************************************
Default .ashrc with following added: export CFLAGS CXXFLAGS LDFLAGS
tce-status -i includes:
autoconf
automake
compiletc
Program files copied to /tmp/rogue54:
--- Code: ---LICENSE.TXT config.sub init.c move.c rogue.cat.in rogue54.vcproj weapons.c
Makefile.in configure install-sh new_level.c rogue.desktop rooms.c wizard.c
Makefile.std configure.ac io.c options.c rogue.doc.in save.c xcrypt.c
armor.c configure.lineno list.c pack.c rogue.h score.h
chase.c daemon.c mach_dep.c passages.c rogue.html.in scrolls.c
command.c daemons.c main.c potions.c rogue.me.in state.c
config.guess extern.c mdport.c rings.c rogue.png sticks.c
config.h.in extern.h misc.c rip.c rogue.spec things.c
config.log fight.c monsters.c rogue.6.in rogue54.sln vers.c
--- End code ---
./configure --help:
--- Code: ---root@box:/tmp/rogue54# ./configure --help
`configure' configures Rogue 5.4.4 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/rogue]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-setgid=NAME install executable as setgid with group ownership of
NAME [default=no]]
--enable-scorefile=SCOREFILE
enable scoreboard with given filename
--enable-lockfile=LOCKFILE
enable scoreboard lockfile with given filename
--enable-wizardmode enable availability of wizard mode [default=no]
--enable-allscores enable scoreboard to show top scores, not just top
players [default=yes]
--enable-checktime enable checktime [default=no]
--enable-maxload enable maxload [default=no]
--enable-maxusers enable maxuser [default=no]
--enable-numscores number of scores to store in scoreboard [default=10]
--enable-numname word for number of scores to store in scoreboard
[default=Ten]
--enable-loadav=NAMELIST
use program's load average function (unlikely to
work) [default=no]
--enable-ucount=UTMPFILE
use program's own function to count users (unlikely
to work) [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-ncurses Force the use of ncurses over curses
--with-program-name=NAME
alternate executable name
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <yendor@rogueforge.net>.
--- End code ---
./configure --prefix=/usr/local output:
--- Code: ---root@box:/tmp/rogue54# ./configure --prefix=/usr/local
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
--- End code ---
config.log:
--- Code: ---root@box:/tmp/rogue54# cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Rogue configure 5.4.4, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --prefix=/usr/local
## --------- ##
## Platform. ##
## --------- ##
hostname = box
uname -m = i686
uname -r = 3.16.6-tinycore
uname -s = Linux
uname -v = #777 SMP Thu Oct 16 09:42:42 UTC 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/tc/.local/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /apps/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /etc/sysconfig/tcedir/ondemand
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1786: checking build system type
configure:1804: result: i686-pc-linux-gnu
configure:1826: checking host system type
configure:1841: result: i686-pc-linux-gnu
configure:1863: checking target system type
configure:1878: result: i686-pc-linux-gnu
configure:1956: checking for gcc
configure:1972: found /usr/local/bin/gcc
configure:1983: result: gcc
configure:2221: checking for C compiler version
configure:2228: gcc --version >&5
gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2231: $? = 0
configure:2238: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
Target: i486-pc-linux-gnu
Configured with: ../gcc-4.9.1/configure --prefix=/usr/local --enable-shared --libexecdir=/usr/local/lib --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --enable-frame-pointer --enable-lto --with-mpfr=/usr/local --with-gmp=/usr/local --with-cloog=/usr/local --with-isl=/usr/local --with-arch=i486 --with-tune=i686
Thread model: posix
gcc version 4.9.1 (GCC)
configure:2241: $? = 0
configure:2248: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2251: $? = 1
configure:2274: checking for C compiler default output file name
configure:2301: gcc conftest.c >&5
gcc: error trying to exec 'cc1': execvp: No such file or directory
configure:2304: $? = 1
configure:2342: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Rogue"
| #define PACKAGE_TARNAME "rogue"
| #define PACKAGE_VERSION "5.4.4"
| #define PACKAGE_STRING "Rogue 5.4.4"
| #define PACKAGE_BUGREPORT "yendor@rogueforge.net"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2348: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build='i686-pc-linux-gnu'
ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_LDFLAGS_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_host='i686-pc-linux-gnu'
ac_cv_prog_ac_ct_CC='gcc'
ac_cv_target='i686-pc-linux-gnu'
## ----------------- ##
## Output variables. ##
## ----------------- ##
CC='gcc'
CFLAGS=''
COLCRT=''
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
GROFF=''
GROUPOWNER=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LOCKFILE=''
LTLIBOBJS=''
NROFF=''
OBJEXT=''
PACKAGE_BUGREPORT='yendor@rogueforge.net'
PACKAGE_NAME='Rogue'
PACKAGE_STRING='Rogue 5.4.4'
PACKAGE_TARNAME='rogue'
PACKAGE_VERSION='5.4.4'
PATH_SEPARATOR=':'
PROGRAM=''
SCOREFILE=''
SED=''
SHELL='/bin/sh'
TARGET=''
TBL=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-pc-linux-gnu'
target_alias=''
target_cpu='i686'
target_os='linux-gnu'
target_vendor='pc'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "Rogue"
#define PACKAGE_TARNAME "rogue"
#define PACKAGE_VERSION "5.4.4"
#define PACKAGE_STRING "Rogue 5.4.4"
#define PACKAGE_BUGREPORT "yendor@rogueforge.net"
configure: exit 77
--- End code ---
Juanito:
what did you put for "export CFLAGS CXXFLAGS LDFLAGS"?
nitram:
Thanks for trying to help Juanito.
Working through 3 pages of similar error messages archived on the forum and the most useful answer was always ensure compiletz is installed, which it is.
export CFLAGS CXXFLAGS LDFLAGS is in my .ashrc:
--- Code: ---# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
if [ -n "$DISPLAY" ]
then
`which editor >/dev/null` && EDITOR=editor || EDITOR=vi
else
EDITOR=vi
fi
export EDITOR
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias d='dmenu_run &'
alias ce='cd /etc/sysconfig/tcedir'
###-- GCC compiler variables
#
### If compiling kernel:
#CFLAGS=""
#CXXFLAGS=""
#LDFLAGS=""
#
### Recommended if submitting extensions:
#CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
#CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
#LDFLAGS="-Wl,-O1"
#
### For apps that need speed (math library or so), you can use "-O2" flag instead of "-Os" flag.
#CFLAGS="-march=i486 -mtune=i686 -O2 -pipe"
#CXXFLAGS="-march=i486 -mtune=i686 -O2 -pipe"
#LDFLAGS="-Wl,-O1"
#
### Flags Not-allowed (good performance, but likely won't work on other machines): "-march=native -mtune=native".
#CFLAGS="-march=native -mtune=native -O2 -pipe"
#CXXFLAGS="-march=native -mtune=native -O2 -pipe"
#
### If you wish to try to get a lower sized C++ app, you can try adding "-fno-exceptions -fno-rtti" to CXXFLAGS. Use only on C++ applications, libraries should use the same flags as in CFLAGS above.
#CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
#
### Potential increase of performance but makes debugging impossible.
#CFLAGS="${CFLAGS} -fomit-frame-pointer"
#CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
export CFLAGS CXXFLAGS LDFLAGS
--- End code ---
Juanito:
..but everything is commented out?
If you try this:
--- Code: ---$ unset CFLAGS CXXFLAGS LDFLAGS
$ CC="gcc -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var
--- End code ---
..what do you get?
curaga:
Something seems broken in your system, tce-status should also list all the dependencies of compiletc?
Navigation
[0] Message Index
[#] Next page
Go to full version