O compilador C não pode criar executáveis

9

Estou tentando instalar o Wine no Linux Mint 17.1. Eu ./configure'd como root para instalá-lo.

Entrada:

cd Downloads/wine-1.6.2
./configure

Saída:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in '/home/(my username)/Downloads/wine-1.6.2':
configure: error: C compiler cannot create executables
See 'config.log' for more details

config.log:         Este arquivo contém todas as mensagens produzidas pelos compiladores         executando configure, para ajudar a depurar se o configure cometer um erro.

    It was created by Wine configure 1.6.2, which was
    generated by GNU Autoconf 2.69.  Invocation command line was

      $ ./configure 

    ## --------- ##
    ## Platform. ##
    ## --------- ##

    hostname = Math2
    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:2879: checking build system type
    configure:2893: result: x86_64-unknown-linux-gnu
    configure:2913: checking host system type
    configure:2926: result: x86_64-unknown-linux-gnu
    configure:2956: checking whether make sets $(MAKE)
    configure:2978: result: yes
    configure:3035: checking for gcc
    configure:3051: found /usr/bin/gcc
    configure:3062: result: gcc
    configure:3291: checking for C compiler version
    configure:3300: 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:3311: $? = 0
    configure:3300: 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:3311: $? = 0
    configure:3300: gcc -V >&5
    gcc: error: unrecognized command line option '-V'
    gcc: fatal error: no input files
    compilation terminated.
    configure:3311: $? = 4
    configure:3300: gcc -qversion >&5
    gcc: error: unrecognized command line option '-qversion'
    gcc: fatal error: no input files
    compilation terminated.
    configure:3311: $? = 4
    configure:3331: checking whether the C compiler works
    configure:3353: gcc    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:3357: $? = 1
    configure:3395: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "Wine"
    | #define PACKAGE_TARNAME "wine"
    | #define PACKAGE_VERSION "1.6.2"
    | #define PACKAGE_STRING "Wine 1.6.2"
    | #define PACKAGE_BUGREPORT "[email protected]"
    | #define PACKAGE_URL "http://www.winehq.org"
    | /* end confdefs.h.  */
    | 
    | int
    | main ()
    | {
    | 
    |   ;
    |   return 0;
    | }
    configure:3400: error: in '/home/(my username)/Desktop/Other_Games/wine-1.6.2':
    configure:3402: error: C compiler cannot create executables
    See 'config.log' for more details

    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##

    ac_cv_build=x86_64-unknown-linux-gnu
    ac_cv_env_CCC_set=
    ac_cv_env_CCC_value=
    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_CXXFLAGS_set=
    ac_cv_env_CXXFLAGS_value=
    ac_cv_env_CXX_set=
    ac_cv_env_CXX_value=
    ac_cv_env_DBUS_CFLAGS_set=
    ac_cv_env_DBUS_CFLAGS_value=
    ac_cv_env_DBUS_LIBS_set=
    ac_cv_env_DBUS_LIBS_value=
    ac_cv_env_FREETYPE_CFLAGS_set=
    ac_cv_env_FREETYPE_CFLAGS_value=
    ac_cv_env_FREETYPE_LIBS_set=
    ac_cv_env_FREETYPE_LIBS_value=
    ac_cv_env_GNUTLS_CFLAGS_set=
    ac_cv_env_GNUTLS_LIBS_value=
    ac_cv_env_GPHOTO2_CFLAGS_set=
    ac_cv_env_GPHOTO2_CFLAGS_value=
    ac_cv_env_GPHOTO2_LIBS_set=
    ac_cv_env_GPHOTO2_LIBS_value=
    ac_cv_env_GPHOTO2_PORT_CFLAGS_set=
    ac_cv_env_GPHOTO2_PORT_CFLAGS_value=
    ac_cv_env_GPHOTO2_PORT_LIBS_set=
    ac_cv_env_GPHOTO2_PORT_LIBS_value=
    ac_cv_env_GSTREAMER_CFLAGS_set=
    ac_cv_env_GSTREAMER_CFLAGS_value=
    ac_cv_env_GSTREAMER_LIBS_set=
    ac_cv_env_GSTREAMER_LIBS_value=
    ac_cv_env_HAL_CFLAGS_set=
    ac_cv_env_HAL_CFLAGS_value=
    ac_cv_env_HAL_LIBS_set=
    ac_cv_env_HAL_LIBS_value=
    ac_cv_env_LCMS2_CFLAGS_set=
    ac_cv_env_LCMS2_CFLAGS_value=
    ac_cv_env_LCMS2_LIBS_set=
    ac_cv_env_LCMS2_LIBS_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PNG_CFLAGS_set=
    ac_cv_env_PNG_CFLAGS_value=
    ac_cv_env_PNG_LIBS_set=
    ac_cv_env_PNG_LIBS_value=
    ac_cv_env_SANE_CFLAGS_set=
    ac_cv_env_SANE_CFLAGS_value=
    ac_cv_env_SANE_LIBS_set=
    ac_cv_env_SANE_LIBS_value=
    ac_cv_env_XMKMF_set=
    ac_cv_env_XMKMF_value=
    ac_cv_env_XML2_CFLAGS_set=
    ac_cv_env_XML2_CFLAGS_value=
    ac_cv_env_XML2_LIBS_set=
    ac_cv_env_XML2_LIBS_value=
    ac_cv_env_XSLT_CFLAGS_set=
    ac_cv_env_XSLT_CFLAGS_value=
    ac_cv_env_XSLT_LIBS_set=
    ac_cv_env_XSLT_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=x86_64-unknown-linux-gnu
    ac_cv_prog_ac_ct_CC=gcc
    ac_cv_prog_make_make_set=yes

    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##

    ALL_TEST_RESOURCES=''
    ALSALIBS=''
    APPKITLIB=''
    APPLICATIONSERVICESLIB=''
    AR=''
    ARFLAGS=''
    BISON=''
    BUILTINFLAG=''
    CARBONLIB=''
    CC='gcc'
    CFLAGS=''
    CONVERT=''
    COREAUDIO=''
    COREFOUNDATIONLIB=''
    CORESERVICESLIB=''
    CPP=''
    CPPBIN=''
    CPPFLAGS=''
    CROSSCC=''
    CROSSTARGET=''
    CROSSTEST_DISABLE=''
    CUPSINCL=''
    CXX=''
    CXXFLAGS=''
    DBUS_CFLAGS=''
    DBUS_LIBS=''
    DEFS=''
    DISKARBITRATIONLIB=''
    DLLEXT=''
    DLLFLAGS=''
    DLLTOOL=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    EXTRACFLAGS=''
    EXTRA_BINARIES=''
    FLEX=''
    FONTCONFIGINCL=''
    FONTFORGE=''
    FORCEFEEDBACKLIB=''
    FRAMEWORK_OPENAL=''
    FREETYPE_CFLAGS=''
    FREETYPE_LIBS=''
    GNUTLS_CFLAGS=''
    GNUTLS_LIBS=''
    GPHOTO2_CFLAGS=''
    GPHOTO2_LIBS=''
    GPHOTO2_PORT_CFLAGS=''
    GPHOTO2_PORT_LIBS=''
    GREP=''
    GSTREAMER_CFLAGS=''
    GSTREAMER_LIBS=''
    HAL_CFLAGS=''
    HAL_LIBS=''
    ICOTOOL=''
    IMPLIBEXT=''
    INSTALL_DATA=''
    INSTALL_PROGRAM=''
    INSTALL_SCRIPT=''
    IOKITLIB=''
    LCMS2_CFLAGS=''
    LCMS2_LIBS=''
    LDAPLIBS=''
    LDCONFIG=''
    LDD=''
    LDDLLFLAGS=''
    LDEXECFLAGS=''
    LDFLAGS=''
    LDPATH=''
    LDRPATH_INSTALL=''
    LDRPATH_LOCAL=''
    LIBDL=''
    LIBGETTEXTPO=''
    LIBKSTAT=''
    LIBMPG123=''
    LIBOBJS=''
    LIBOPENAL=''
    LIBOPENCL=''
    LIBPOLL=''
    LIBPTHREAD=''
    LIBRT=''
    LIBS=''
    LIBWINE_RULES=''
    LINGUAS=''
    LINT=''
    LINTFLAGS=''
    LN_S=''
    LTLIBOBJS=''
    MAINTAINER_MODE=''
    MAIN_BINARY=''
    MSGFMT=''
    OBJEXT=''
    OPENGL_LIBS=''
    OSS4INCL=''
    PACKAGE_BUGREPORT='[email protected]'
    PACKAGE_NAME='Wine'
    PACKAGE_STRING='Wine 1.6.2'
    PACKAGE_TARNAME='wine'
    PACKAGE_URL='http://www.winehq.org'
    PACKAGE_VERSION='1.6.2'
    PATH_SEPARATOR=':'
    PKG_CONFIG=''
    PNG_CFLAGS=''
    PNG_LIBS=''
    PORCFLAGS=''
    PRELINK=''
    QUICKTIMELIB=''
    RANLIB=''
    READELF=''
    RESOLVLIBS=''
    RSVG=''
    SANE_CFLAGS=''
    SANE_LIBS=''
    SECURITYLIB=''
    SET_MAKE=''
    SHELL='/bin/bash'
    SOCKETLIBS=''
    TARGETFLAGS=''
    TOOLSDIR=''
    TOOLSEXT=''
    UNWINDFLAGS=''
    WOW64_DISABLE=''
    XLIB=''
    XMKMF=''
    XML2_CFLAGS=''
    XML2_LIBS=''
    XSLT_CFLAGS=''
    XSLT_LIBS=''
    X_CFLAGS=''
    X_EXTRA_LIBS=''
    X_LIBS=''
    X_PRE_LIBS=''
    ZLIB=''
    ac_ct_AR=''
    ac_ct_CC='gcc'
    ac_ct_CXX=''
    bindir='${exec_prefix}/bin'
    build='x86_64-unknown-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='unknown'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='x86_64-unknown-linux-gnu'
    host_alias=''
    host_cpu='x86_64'
    host_os='linux-gnu'
    host_vendor='unknown'
    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='NONE'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''

    ## ------------------- ##
    ## File substitutions. ##
    ## ------------------- ##

    MAKE_DLL_RULES=''
    MAKE_IMPLIB_RULES=''
    MAKE_PROG_RULES=''
    MAKE_RULES=''
    MAKE_TEST_RULES=''

    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##

    /* confdefs.h */
    #define PACKAGE_NAME "Wine"
    #define PACKAGE_TARNAME "wine"
    #define PACKAGE_VERSION "1.6.2"
    #define PACKAGE_STRING "Wine 1.6.2"
    #define PACKAGE_BUGREPORT "[email protected]"
    #define PACKAGE_URL "http://www.winehq.org"

    configure: exit 77

    (END)

Eu espreitei por aqui e outros lugares pela internet para encontrar uma resposta sem sorte, então aqui estou eu.

    
por BrokenRobot 18.07.2015 / 01:31

4 respostas

17

Não se preocupe com esses erros:

 gcc: error: unrecognized command line option '-V'

e

gcc: error: unrecognized command line option '-qversion'

Esses são testes malsucedidos, mas o script configure persevera depois deles.

Não se preocupe com isso:

/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

Esses arquivos são parte do pacote libc6-dev e são necessários para criar qualquer tipo de executável normal. Você provavelmente está perdendo esse pacote. Tente instalá-lo (ou reinstalá-lo se já estiver instalado - talvez esteja quebrado).

Melhor ainda, instale o pacote build-essential . Esse é um meta-pacote que irá reunir todos os itens essenciais para compilar as coisas.

    
por 18.07.2015 / 01:42
12

Primeiramente, não o construa como root. Geralmente, você precisará do privilégio de root com sudo apenas na etapa final em que você instalá-lo no sistema.

./configure
make
sudo make install

De acordo com config.log , você não conseguiu construir executáveis porque a libc e outras bibliotecas estão faltando no seu sistema. Nos sistemas baseados em Debian, você pode instalar ferramentas e bibliotecas essenciais executando:

sudo apt-get install build-essential

Além disso, você precisa de várias dependências e configurações complicadas em relação ao Win32 / Win64 para construir o Wine para você, o que seria bastante difícil. Leia cuidadosamente os documentos do desenvolvedor aqui e . Você pode encontrar o caminho recomendado para o Ubuntu.

    
por 18.07.2015 / 02:02
0

Você pode ter um conjunto CFLAGS não reconhecido.

Tente usar

export CFLAGS="-march=native -O2 -pipe"

antes de executar ./configure

    
por 08.02.2016 / 22:59
-1

Após algumas pesquisas no Google ...

Tente isto:

sudo apt-get install clang
    
por 08.02.2016 / 21:49