C 컴파일러는 실행 파일을 만들 수 없습니다.

C 컴파일러는 실행 파일을 만들 수 없습니다.

Linux Mint 17.1에 와인을 설치하려고 합니다. 나는 그것을 설치하기 위해 루트로 ./configure를 사용했습니다.

입력하다:

cd Downloads/wine-1.6.2
./configure

산출:

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: 이 파일에는 구성이 잘못된 경우 디버깅을 돕기 위해 구성을 실행할 때 컴파일러에서 생성된 모든 메시지가 포함되어 있습니다.

    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)

나는 인터넷의 여기 저기에 숨어서 답변을 찾았지만 운이 없었기 때문에 여기 있습니다.

답변1

다음 오류에 대해 걱정하지 마세요.

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

그리고

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

이는 실패한 조사였지만 configure스크립트는 이후에도 지속되었습니다.

다음 사항에 대해 걱정하십시오.

/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

이러한 파일은 libc6-dev패키지의 일부이며 모든 종류의 일반 실행 파일을 빌드하는 데 필요합니다. 이 패키지가 누락되었을 수 있습니다. 설치해 보세요(이미 설치한 경우 다시 설치하세요. 손상되었을 수 있습니다).

더 나은 방법은 build-essential패키지를 설치하는 것입니다. 이는 콘텐츠 컴파일에 필요한 모든 필수 요소가 포함된 메타패키지입니다.

답변2

첫째, 루트로 빌드하지 마십시오. 일반적으로 sudo시스템 설치의 마지막 단계에서만 루트 권한이 필요합니다.

./configure
make
sudo make install

에 따르면 config.log시스템에 libc 및 기타 라이브러리가 없기 때문에 실행 파일을 빌드할 수 없습니다. Debian 기반 시스템에서는 다음 명령을 실행하여 필요한 도구와 라이브러리를 설치할 수 있습니다.

sudo apt-get install build-essential

여기에 Win32/Win64와 관련하여 필요한 다양한 종속성과 복잡한 설정을 추가하여 Wine을 직접 구축하는 것은 상당히 어려운 접근 방식이 될 것입니다. 개발자 문서를 주의 깊게 읽어보세요.여기그리고거기. Ubuntu에 권장되는 방법을 찾을 수 있습니다.

답변3

인식할 수 없는 CFLAGS 세트가 있을 수 있습니다.

사용해 보세요

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

./configure를 실행하기 전에

답변4

구글링 좀 하다가..

이 시도:

sudo apt-get install clang

관련 정보