Results 1 to 3 of 3

Thread: C++ compiler cannot create executables

  1. #1
    Join Date
    Jul 2006
    Location
    Toronto
    Beans
    9
    Distro
    Ubuntu 6.10 Edgy

    C++ compiler cannot create executables

    I am using Ubuntu 9.10
    Please help with the following problem. I am trying to compile dhbailey's QD C++/Fortran-90 double-double and quad-double package with this command:
    Code:
    ~/qd-2.3.8$ ./configure CXX=g++ CXXFLAGS='-O2 -mp' FC=gfortran FCFLAGS=' -O2 -mp'
    I get the error:
    Code:
    checking for C++ compiler default output file name... 
    configure: error: C++ compiler cannot create executables
    See `config.log' for more details.
    I read old forum postings and ran the suggested commands:
    Code:
    ~/qd-2.3.8$ sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      dpkg-dev
    Suggested packages:
      debian-keyring debian-maintainers
    The following NEW packages will be installed:
      build-essential dpkg-dev
    0 upgraded, 2 newly installed, 0 to remove and 103 not upgraded.
    Need to get 580kB of archives.
    After this operation, 2,007kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://us.archive.ubuntu.com karmic/main dpkg-dev 1.15.4ubuntu2 [573kB]
    Get:2 http://us.archive.ubuntu.com karmic/main build-essential 11.4 [7,172B]
    Fetched 580kB in 2s (196kB/s)          
    Selecting previously deselected package dpkg-dev.
    (Reading database ... 118382 files and directories currently installed.)
    Unpacking dpkg-dev (from .../dpkg-dev_1.15.4ubuntu2_all.deb) ...
    Selecting previously deselected package build-essential.
    Unpacking build-essential (from .../build-essential_11.4_i386.deb) ...
    Processing triggers for man-db ...
    Setting up dpkg-dev (1.15.4ubuntu2) ...
    Setting up build-essential (11.4) ...
    Code:
    ~/qd-2.3.8$ sudo apt-get install linux-headers-$(uname -r) build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    linux-headers-2.6.31-14-generic-pae is already the newest version.
    linux-headers-2.6.31-14-generic-pae set to manually installed.
    build-essential is already the newest version.
    Code:
    ~/qd-2.3.8$ sudo apt-get install --reinstall linux-headers-$(uname -r) build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 103 not upgraded.
    Need to get 0B/677kB of archives.
    After this operation, 0B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    (Reading database ... 118573 files and directories currently installed.)
    Preparing to replace build-essential 11.4 (using .../build-essential_11.4_i386.deb) ...
    Unpacking replacement build-essential ...
    Preparing to replace linux-headers-2.6.31-14-generic-pae 2.6.31-14.48 (using .../linux-headers-2.6.31-14-generic-pae_2.6.31-14.48_i386.deb) ...
    Unpacking replacement linux-headers-2.6.31-14-generic-pae ...
    Setting up build-essential (11.4) ...
    Setting up linux-headers-2.6.31-14-generic-pae (2.6.31-14.48) ...
    Examining /etc/kernel/header_postinst.d.
    run-parts: executing /etc/kernel/header_postinst.d/dkms
     * Running DKMS auto installation service for kernel 2.6.31-14-generic-pae                                                                                      
     *  nvidia (173.14.20)...
    nvidia (173.14.20): Already installed on this kernel. [ OK ]
    run-parts: executing /etc/kernel/header_postinst.d/nvidia-common
    Again I get the error:
    Code:
    configure: error: C++ compiler cannot create executables
    See `config.log' for more details.
    config.log looks like this:
    Code:
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by qd configure 2.3.7, which was
    generated by GNU Autoconf 2.62.  Invocation command line was
    
      $ ./configure CXX=g++ CXXFLAGS=-O2 -mp FC=gfortran FCFLAGS= -O2 -mp
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = c5f8
    uname -m = i686
    uname -r = 2.6.31-14-generic-pae
    uname -s = Linux
    uname -v = #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009
    
    /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
    
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    configure:1958: checking for a BSD-compatible install
    configure:2026: result: /usr/bin/install -c
    configure:2037: checking whether build environment is sane
    configure:2080: result: yes
    configure:2105: checking for a thread-safe mkdir -p
    configure:2144: result: /bin/mkdir -p
    configure:2157: checking for gawk
    configure:2187: result: no
    configure:2157: checking for mawk
    configure:2173: found /usr/bin/mawk
    configure:2184: result: mawk
    configure:2195: checking whether make sets $(MAKE)
    configure:2217: result: yes
    configure:2416: checking build system type
    configure:2434: result: i686-pc-linux-gnu
    configure:2456: checking host system type
    configure:2471: result: i686-pc-linux-gnu
    configure:2501: checking if commonly used function is to be inlined
    configure:2511: result: yes
    configure:2520: checking if addition with IEEE-style error bound is to be used
    configure:2531: result: no
    configure:2540: checking if sloppy multiplication is to be used
    configure:2550: result: yes
    configure:2559: checking if sloppy division is to be used
    configure:2569: result: yes
    configure:2579: checking if debugging code is to be enabled
    configure:2590: result: no
    configure:2599: checking if compiler warnings is to be enabled
    configure:2604: result: no
    configure:2748: checking for C++ compiler version
    configure:2756: g++ --version >&5
    g++ (Ubuntu 4.4.1-4ubuntu8) 4.4.1
    Copyright (C) 2009 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:2760: $? = 0
    configure:2767: g++ -v >&5
    Using built-in specs.
    Target: i486-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
    Thread model: posix
    gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) 
    configure:2771: $? = 0
    configure:2778: g++ -V >&5
    g++: '-V' option must have argument
    configure:2782: $? = 1
    configure:2805: checking for C++ compiler default output file name
    configure:2827: g++ -O2 -mp   conftest.cpp  >&5
    cc1plus: error: unrecognized command line option "-mp"
    configure:2831: $? = 1
    configure:2869: result: 
    configure: failed program was:
    | /* confdefs.h.  */
    | #define PACKAGE_NAME "qd"
    | #define PACKAGE_TARNAME "qd"
    | #define PACKAGE_VERSION "2.3.7"
    | #define PACKAGE_STRING "qd 2.3.7"
    | #define PACKAGE_BUGREPORT "yozo@cs.berkeley.edu"
    | #define MAJOR_VERSION 2
    | #define MINOR_VERSION 3
    | #define PATCH_VERSION 7
    | #define PACKAGE "qd"
    | #define VERSION "2.3.7"
    | #define QD_INLINE 1
    | #define QD_SLOPPY_MUL 1
    | #define QD_SLOPPY_DIV 1
    | /* end confdefs.h.  */
    | 
    | int
    | main ()
    | {
    | 
    |   ;
    |   return 0;
    | }
    configure:2876: error: C++ compiler cannot create executables
    See `config.log' for more details.
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    ac_cv_build=i686-pc-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_CXXCPP_set=
    ac_cv_env_CXXCPP_value=
    ac_cv_env_CXXFLAGS_set=set
    ac_cv_env_CXXFLAGS_value='-O2 -mp'
    ac_cv_env_CXX_set=set
    ac_cv_env_CXX_value=g++
    ac_cv_env_FCFLAGS_set=set
    ac_cv_env_FCFLAGS_value=' -O2 -mp'
    ac_cv_env_FC_set=set
    ac_cv_env_FC_value=gfortran
    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_host=i686-pc-linux-gnu
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=mawk
    ac_cv_prog_make_make_set=yes
    
    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##
    
    ACLOCAL='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run aclocal-1.10'
    AMDEPBACKSLASH=''
    AMDEP_FALSE=''
    AMDEP_TRUE=''
    AMTAR='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run tar'
    AUTOCONF='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run autoconf'
    AUTOHEADER='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run autoheader'
    AUTOMAKE='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run automake-1.10'
    AWK='mawk'
    CC=''
    CCDEPMODE=''
    CFLAGS=''
    CONFIGURE_ARGS=''
    CPPFLAGS=''
    CXX='g++'
    CXXCPP=''
    CXXDEPMODE=''
    CXXFLAGS='-O2 -mp'
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ETIME=''
    EXEEXT=''
    F77=''
    FC='gfortran'
    FCFLAGS=' -O2 -mp'
    FCLIBS=''
    FFLAGS=''
    GREP=''
    HAVE_FORTRAN_FALSE=''
    HAVE_FORTRAN_TRUE=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LDFLAGS=''
    LIBOBJS=''
    LIBS=''
    LTLIBOBJS=''
    MAKEINFO='${SHELL} /home/c5f8/ronfileD/qd-2.3.8/config/missing --run makeinfo'
    MKDIR_P='/bin/mkdir -p'
    OBJEXT=''
    PACKAGE='qd'
    PACKAGE_BUGREPORT='yozo@cs.berkeley.edu'
    PACKAGE_NAME='qd'
    PACKAGE_STRING='qd 2.3.7'
    PACKAGE_TARNAME='qd'
    PACKAGE_VERSION='2.3.7'
    PATH_SEPARATOR=':'
    QD_DEBUG_FALSE=''
    QD_DEBUG_TRUE=''
    RANLIB=''
    REQ_CXXFLAGS=''
    REQ_FCFLAGS=''
    SET_MAKE=''
    SHELL='/bin/bash'
    STRIP=''
    UPCASE_MODULE_FALSE=''
    UPCASE_MODULE_TRUE=''
    VERSION='2.3.7'
    ac_ct_CC=''
    ac_ct_CXX=''
    ac_ct_FC=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__fastdepCXX_FALSE=''
    am__fastdepCXX_TRUE=''
    am__include=''
    am__isrc=''
    am__leading_dot='.'
    am__quote=''
    am__tar='${AMTAR} chof - "$$tardir"'
    am__untar='${AMTAR} xf -'
    ax_f90_modflag=''
    bindir='${exec_prefix}/bin'
    build='i686-pc-linux-gnu'
    build_alias=''
    build_cpu='i686'
    build_os='linux-gnu'
    build_vendor='pc'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='i686-pc-linux-gnu'
    host_alias=''
    host_cpu='i686'
    host_os='linux-gnu'
    host_vendor='pc'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='$(SHELL) /home/c5f8/ronfileD/qd-2.3.8/config/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='/bin/mkdir -p'
    module_ext=''
    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=''
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    #define PACKAGE_NAME "qd"
    #define PACKAGE_TARNAME "qd"
    #define PACKAGE_VERSION "2.3.7"
    #define PACKAGE_STRING "qd 2.3.7"
    #define PACKAGE_BUGREPORT "yozo@cs.berkeley.edu"
    #define MAJOR_VERSION 2
    #define MINOR_VERSION 3
    #define PATCH_VERSION 7
    #define PACKAGE "qd"
    #define VERSION "2.3.7"
    #define QD_INLINE 1
    #define QD_SLOPPY_MUL 1
    #define QD_SLOPPY_DIV 1
    
    configure: exit 77

  2. #2
    Join Date
    Jul 2006
    Location
    Toronto
    Beans
    9
    Distro
    Ubuntu 6.10 Edgy

    Re: C++ compiler cannot create executables

    I searched the archives and I solved the executable problem!
    From this link
    Code:
    http://ubuntuforums.org/archive/index.php/t-17033.html
    $ apt-get install libc6-dev g++ gcc
    millerb, February 25th, 2005, 03:10 PM
    no error was reported from the above command!

    The next step to install QD is:
    Code:
    Make, and then Make install
    At make install I received another error. Anyone know what this problem is:
    Code:
    ~/qd-2.3.8$ make install
    make  install-recursive
    make[1]: Entering directory `/home/qd-2.3.8'
    Making install in config
    make[2]: Entering directory `/home/qd-2.3.8/config'
    make[3]: Entering directory `/home/qd-2.3.8/config'
    make[3]: Nothing to be done for `install-exec-am'.
    make[3]: Nothing to be done for `install-data-am'.
    make[3]: Leaving directory `/home/qd-2.3.8/config'
    make[2]: Leaving directory `/home/qd-2.3.8/config'
    Making install in src
    make[2]: Entering directory `/home/qd-2.3.8/src'
    make[3]: Entering directory `/home/qd-2.3.8/src'
    test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
     /usr/bin/install -c -m 644 'libqd.a' '/usr/local/lib/libqd.a'
    /usr/bin/install: cannot create regular file `/usr/local/lib/libqd.a': Permission denied
    make[3]: *** [install-libLIBRARIES] Error 1
    make[3]: Leaving directory `/home/qd-2.3.8/src'
    make[2]: *** [install-am] Error 2
    make[2]: Leaving directory `/home/qd-2.3.8/src'
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/home/qd-2.3.8'
    make: *** [install] Error 2
    Last edited by c5f8; November 27th, 2009 at 07:34 AM. Reason: simpler

  3. #3
    Join Date
    Jul 2006
    Location
    Toronto
    Beans
    9
    Distro
    Ubuntu 6.10 Edgy

    Re: C++ compiler cannot create executables

    I solved the make install problem!
    From the link:
    Code:
    http://ubuntuforums.org/archive/index.php/t-502503.html
    use sudo make install
    More Info (https://help.ubuntu.com/community/RootSudo)
    testube_babies
    July 16th, 2007, 05:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •