10

I'm trying to install wine on Linux Mint 17.1. I ./configure'd as root to install it.

Input:

cd Downloads/wine-1.6.2
./configure

Output:

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: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

    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)

I've lurked through here and other places around the internet to find an answer with no luck, so here I am.

2
  • 2
    What happens if you create a trivial C program foo.c and say gcc foo.c?  If that fails, that's your problem, and you should focus your question on that (and never mind the fact that you're trying to install wine).  If the gcc succeeds, you should mention that in your question. Jul 17, 2015 at 23:43
  • 2
    Compiling stuff onself is sooo rewarding... Especially when it becomes group-compiling because the OP has not a clue of what he is doing (having one, would require actual reding and understanding)... But well, there are always people available to answer questions. It's a shame though when the question is actually not the real problem...
    – user123418
    Jul 18, 2015 at 1:39

4 Answers 4

18

Don't worry about these errors:

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

and

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

Those are unsuccessful probes but the configure script perseveres after them.

Do worry about these:

/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

Those files are part of the libc6-dev package and are required in order to built any type of normal executable. You are probably missing that package. Try installing it (or reinstalling it if it is already installed — perhaps it is broken).

Better yet, install the build-essential package. That's a meta-package that will pull in all of the bare essentials for compiling things.

3
  • 1
    build-essential is the right way to go
    – abligh
    Jul 18, 2015 at 8:16
  • 4
    @eyoung100 the question is why is compiling the source failing. The answer can't be 'don't do that, use the binary'. Maybe he wants to set different build options. Maybe he wants to patch the source. Maybe he just wants to learn how to build it.
    – abligh
    Jul 18, 2015 at 8:20
  • 1 up for build-essential
    – ZZ9
    Apr 5, 2016 at 13:18
13

Firstly, do not build it as root. Generally you will need root privilege with sudo only at the final step you install it in the system.

./configure
make
sudo make install

According to config.log, you failed to build executables because libc and other libraries are missing on your system. On Debian based systems you can install essential tools and libraries by running:

sudo apt-get install build-essential

In addition to that, you need various dependencies and complicated set up regarding Win32/Win64 to build Wine for yourself, which would be rather hard way. Read developer's documents carefully here and there. You can find the recommended way for Ubuntu.

0
0

You could have unrecognized CFLAGS set.

Try using

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

before you run ./configure

-1

After some googling...

Try this:

sudo apt-get install clang

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .