Announcement

Collapse
No announcement yet.

C compiler cannot create executables

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    C compiler cannot create executables

    I am trying to install clamav. When I ran Adept to install clamav I received an error message saying something like "...failed because of dependencies..." or something like that. I could not find a definitive log file for an explanaction.

    Since I am running Kubuntu Feisty Fawn I decided to install Klamav and see if that was part of my problem. I did install it, but it said that Klamav was out of date and that I should upgrade, which meant downloading and compiling the source. I procdeded to do that but I received the following error message regarding the compiler--

    ***** Klamav
    ***** Running configure (./configure)...
    checking build system type... i686-pc-linux-gnulibc1
    checking host system type... i686-pc-linux-gnulibc1
    checking target system type... i686-pc-linux-gnulibc1
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for -p flag to install... yes
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for kde-config... /usr/bin/kde-config
    checking where to install... /usr (as returned by kde-config)
    checking for style of include used by make... 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.
    ***** Return value 77

    I looked in config.log and here is a portion of that file--
    .
    .
    .
    gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
    Copyright (C) 2006 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:3423: $? = 0
    configure:3430: gcc -v >&5
    Using built-in specs.
    Target: i486-linux-gnu
    Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
    Thread model: posix
    gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
    configure:3433: $? = 0
    configure:3440: gcc -V >&5
    gcc: '-V' option must have argument
    configure:3443: $? = 1
    configure:3466: checking for C compiler default output file name
    configure:3493: gcc conftest.c >&5
    /usr/bin/ld: crt1.o: No such file: No such file or directory
    collect2: ld returned 1 exit status
    configure:3496: $? = 1
    configure:3534: result:
    configure: failed program was:
    | /* confdefs.h. */
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | #define PACKAGE "klamav"
    | #define VERSION "0.1"
    | /* end confdefs.h. */
    .
    .
    .
    And it apparently points back to gcc. How can a compiler NOT be able to create an executable file??

    Any help will be appreciated.

    #2
    Re: C compiler cannot create executables

    Can you please check if you have the package build-essential installed? Sometimes this error message appears when you have missing development packages.
    Jucato's Data Core

    Comment


      #3
      Re: C compiler cannot create executables

      You are correct, Jucato--I had build-essential installed under Dapper Drake, but when I made a new installation of Feisty Fawn I neglected to install it. I also had to install several other applications as well.

      I have successfully compiled, configured, and installed clamav, but I am unable to compile the Klamav front-end. Here are some of the lines from config.log--

      ==============
      configure:4134: checking how to run the C preprocessor
      configure:4174: gcc -E conftest.c
      configure:4180: $? = 0
      configure:4211: gcc -E conftest.c
      conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
      configure:4217: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      | #define PACKAGE_NAME ""
      | #define PACKAGE_TARNAME ""
      | #define PACKAGE_VERSION ""
      | #define PACKAGE_STRING ""
      | #define PACKAGE_BUGREPORT ""
      | #define PACKAGE "klamav"
      | #define VERSION "0.1"
      | /* end confdefs.h. */
      | #include <ac_nonexistent.h>
      ====================
      configure:24816: checking Carbon/Carbon.h usability
      configure:24833: gcc -c -O2 conftest.c >&5
      conftest.c:62:27: error: Carbon/Carbon.h: No such file or directory
      configure:24839: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      | #define PACKAGE_NAME ""
      | #define PACKAGE_TARNAME ""
      | #define PACKAGE_VERSION ""
      | #define PACKAGE_STRING ""
      | #define PACKAGE_BUGREPORT ""
      | #define PACKAGE "klamav"
      | #define VERSION "0.1"
      | #define KDELIBSUFF ""
      | #define STDC_HEADERS 1
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_SYS_STAT_H 1
      | #define HAVE_STDLIB_H 1
      | #define HAVE_STRING_H 1
      | #define HAVE_MEMORY_H 1
      | #define HAVE_STRINGS_H 1
      | #define HAVE_INTTYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_UNISTD_H 1
      | #define HAVE_DLFCN_H 1
      | #define HAVE_SGI_STL 1
      | #define HAVE_CRYPT 1
      | #define kde_socklen_t socklen_t
      | #define ksize_t socklen_t
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_SYS_BITYPES_H 1
      | /* end confdefs.h. */
      ==================
      configure:24953: checking CoreAudio/CoreAudio.h usability
      configure:24970: gcc -c -O2 conftest.c >&5
      conftest.c:62:33: error: CoreAudio/CoreAudio.h: No such file or directory
      configure:24976: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      | #define PACKAGE_NAME ""
      | #define PACKAGE_TARNAME ""
      | #define PACKAGE_VERSION ""
      | #define PACKAGE_STRING ""
      | #define PACKAGE_BUGREPORT ""
      | #define PACKAGE "klamav"
      | #define VERSION "0.1"
      | #define KDELIBSUFF ""
      | #define STDC_HEADERS 1
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_SYS_STAT_H 1
      | #define HAVE_STDLIB_H 1
      | #define HAVE_STRING_H 1
      | #define HAVE_MEMORY_H 1
      | #define HAVE_STRINGS_H 1
      | #define HAVE_INTTYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_UNISTD_H 1
      | #define HAVE_DLFCN_H 1
      | #define HAVE_SGI_STL 1
      | #define HAVE_CRYPT 1
      | #define kde_socklen_t socklen_t
      | #define ksize_t socklen_t
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_SYS_BITYPES_H 1
      | /* end confdefs.h. */
      ===================
      configure:28263: checking crt_externs.h usability
      configure:28280: gcc -c -O2 conftest.c >&5
      conftest.c:71:25: error: crt_externs.h: No such file or directory
      configure:28286: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      | #define PACKAGE_NAME ""
      | #define PACKAGE_TARNAME ""
      | #define PACKAGE_VERSION ""
      | #define PACKAGE_STRING ""
      | #define PACKAGE_BUGREPORT ""
      | #define PACKAGE "klamav"
      | #define VERSION "0.1"
      | #define KDELIBSUFF ""
      | #define STDC_HEADERS 1
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_SYS_STAT_H 1
      | #define HAVE_STDLIB_H 1
      | #define HAVE_STRING_H 1
      | #define HAVE_MEMORY_H 1
      | #define HAVE_STRINGS_H 1
      | #define HAVE_INTTYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_UNISTD_H 1
      | #define HAVE_DLFCN_H 1
      | #define HAVE_SGI_STL 1
      | #define HAVE_CRYPT 1
      | #define kde_socklen_t socklen_t
      | #define ksize_t socklen_t
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_SYS_BITYPES_H 1
      | #define HAVE_RES_INIT 1
      | #define HAVE_RES_INIT 1
      | #define HAVE_RES_INIT_PROTO 1
      | #define SIZEOF_INT 4
      | #define SIZEOF_SHORT 2
      | #define SIZEOF_LONG 4
      | #define SIZEOF_CHAR_P 4
      | #define SIZEOF_SIZE_T 4
      | #define SIZEOF_UNSIGNED_LONG 4
      | /* end confdefs.h. */
      ====================

      and several others.

      Somewhere it mentioned that the library qt-mt was not found, and I have not found it in the distribution using Adept.

      I presume that there is a way to run clamav without using Klamav. I'll have to read up on the clamav documentation to discover how.

      Thanks for your help.

      Comment


        #4
        Re: C compiler cannot create executables

        Have you installed kde development libraries (needed to compile kde programs)?
        Try installing kdelibs4-dev package and it's dependencies.

        Of course both programs should be installable through the repositories, if you could provide the exact dependency errors reported when trying to install via the repos it might help troubleshoot the problem. (If adept doesn't show the exact errors, you can use apt-get)

        Comment


          #5
          Re: C compiler cannot create executables

          Thanks, kubicle. That did it! I have now compiled and installed Klamav and it's working fine.

          I'm a former main-frame programmer, but I'm just learning about compiling and linking on a Linux box. I didn't even think about needing KDE libraries and files in order to compile Klamav, but it makes sense.

          I guess the way to learn is to try...and fail...and then ask someone for help on the Kubuntu forum! That's worked for me so far.

          Thanks again.

          Comment


            #6
            Re: C compiler cannot create executables

            What those -dev or -devel packages install the headers of those libraries that you need in order to compile something that uses those libraries. Normally, binary distros (those that ship software as binary packages) do not install the headers by default, the reasoning being that you only need these to compile software, not run them. So in most cases, you have to install the package(s) that installs these header files.

            (It may also install libs that you need to link to during compile time)
            Jucato&#39;s Data Core

            Comment

            Working...
            X