dschanoeh / socketcand

A deprecated fork of socketcand. Please got to linux-can for the latest version.
https://github.com/linux-can/socketcand
131 stars 40 forks source link

configure: error: C compiler cannot create executables #23

Closed ovwok closed 6 years ago

ovwok commented 6 years ago

I'm have trouble with ./configure I'm geting Error checking for gcc... gcc checking whether the C compiler works... no configure: error: in /home/rory/Desktop/socketcand-master': configure: error: C compiler cannot create executables Seeconfig.log' for more details

steps takin before error rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install autoconf rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install make rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install gcc rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install libconfig-dev rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo autoconf rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ ./configure

(here is a copy of 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 socketcand configure 0.4.2, which was generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = rory-Aspire-4810T uname -m = x86_64 uname -r = 3.13.0-37-generic uname -s = Linux uname -v = #64-Ubuntu SMP Mon Sep 22 21:28:38 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: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games PATH: /usr/local/games

-----------

Core tests.

-----------

configure:2259: checking for gcc configure:2275: found /usr/bin/gcc configure:2286: result: gcc configure:2515: checking for C compiler version configure:2524: gcc --version >&5 gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 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:2535: $? = 0 configure:2524: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) configure:2535: $? = 0 configure:2524: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:2535: $? = 4 configure:2524: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:2535: $? = 4 configure:2555: checking whether the C compiler works configure:2577: gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN conftest.c >&5 /usr/bin/ld: cannot find crt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status configure:2581: $? = 1 configure:2619: result: no configure: failed program was: / confdefs.h / #define PACKAGE_NAME "socketcand" #define PACKAGE_TARNAME "socketcand" #define PACKAGE_VERSION "0.4.2" #define PACKAGE_STRING "socketcand 0.4.2" #define PACKAGE_BUGREPORT "https://github.com/dschanoeh/socketcand/issues" #define PACKAGE_URL "" / end confdefs.h. /
int
main ()
{
;
return 0;
}

configure:2624: error: in /home/rory/Desktop/socketcand-master': configure:2626: error: C compiler cannot create executables Seeconfig.log' for more details

----------------

Cache variables.

----------------

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_prog_ac_ct_CC=gcc

-----------------

Output variables.

-----------------

CC='gcc' CFLAGS=' -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN' CPP='' CPPFLAGS='' DEFS='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' GREP='' LDFLAGS='' LIBOBJS='' LIBS='' LTLIBOBJS='' OBJEXT='' PACKAGE_BUGREPORT='https://github.com/dschanoeh/socketcand/issues' PACKAGE_NAME='socketcand' PACKAGE_STRING='socketcand 0.4.2' PACKAGE_TARNAME='socketcand' PACKAGE_URL='' PACKAGE_VERSION='0.4.2' PATH_SEPARATOR=':' SHELL='/bin/bash' ac_ct_CC='gcc' bindir='${exec_prefix}/bin' build_alias='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host_alias='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' init_script='yes' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' rc_script='no' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' sysroot='' target_alias=''

-----------

confdefs.h.

-----------

/ confdefs.h /

define PACKAGE_NAME "socketcand"

define PACKAGE_TARNAME "socketcand"

define PACKAGE_VERSION "0.4.2"

define PACKAGE_STRING "socketcand 0.4.2"

define PACKAGE_BUGREPORT "https://github.com/dschanoeh/socketcand/issues"

define PACKAGE_URL ""

configure: exit 77

thanks

yegorich commented 6 years ago

Can you compile other projects? Have you performed:

apt-get install build-essential

See this answer for more information.

ovwok commented 6 years ago

i input atp-get install build-essential and sudo apt install libc6-dev and then repeted oother steps of configure and make.. seems to be working now thx for the help yegorich