Compiling Python from Sources

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

    #1

    Compiling Python from Sources

    As a newbie I am having problems/errors configuring Python after
    unpacking the Python archive:

    # ./configure
    checking MACHDEP... linux2
    checking EXTRAPLATDIR...
    checking for --without-gcc... no
    checking for --with-cxx=<compiler>. .. no
    checking for c++... no
    checking for g++... no
    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.

    Any help on my current dilemma???
    TIA,
    rwr

  • mensanator@aol.com

    #2
    Re: Compiling Python from Sources


    rwr wrote:[color=blue]
    > As a newbie I am having problems/errors configuring Python after
    > unpacking the Python archive:
    >
    > # ./configure
    > checking MACHDEP... linux2
    > checking EXTRAPLATDIR...
    > checking for --without-gcc... no
    > checking for --with-cxx=<compiler>. .. no
    > checking for c++... no
    > checking for g++... no
    > 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.
    >
    > Any help on my current dilemma???[/color]

    Did you look in config.log for more details?
    Would you like to share them?
    [color=blue]
    > TIA,
    > rwr[/color]

    Comment

    • rwr

      #3
      Re: Compiling Python from Sources

      This file contains any messages produced by compilers while
      running configure, to aid debugging if configure makes a mistake.

      It was created by python configure 2.3, which was
      generated by GNU Autoconf 2.59. Invocation command line was

      $ ./configure

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

      hostname = blackbeauty
      uname -m = i686
      uname -r = 2.6.12-10-386
      uname -s = Linux
      uname -v = #1 Fri Apr 28 13:13:44 UTC 2006

      /usr/bin/uname -p = unknown
      /bin/uname -X = unknown

      /bin/arch = i686
      /usr/bin/arch -k = unknown
      /usr/convex/getsysinfo = unknown
      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/bin/X11


      ## ----------- ##
      ## Core tests. ##
      ## ----------- ##

      configure:1443: checking MACHDEP
      configure:1552: result: linux2
      configure:1558: checking EXTRAPLATDIR
      configure:1573: result:
      configure:1592: checking for --without-gcc
      configure:1641: result: no
      configure:1647: checking for --with-cxx=<compiler>
      configure:1668: result: no
      configure:1687: checking for c++
      configure:1716: result: no
      configure:1687: checking for g++
      configure:1716: result: no
      configure:1687: checking for gcc
      configure:1703: found /usr/bin/gcc
      configure:1713: result: gcc
      configure:1753: checking for C++ compiler default output file name
      configure:1756: gcc conftest.cc >&5
      gcc: installation problem, cannot exec 'cc1plus': No such file or
      directory
      configure:1759: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      |
      | #define _GNU_SOURCE 1
      | #define _NETBSD_SOURCE 1
      | #define __BSD_VISIBLE 1
      | #define _BSD_TYPES 1
      | #define _XOPEN_SOURCE 600
      | #define _XOPEN_SOURCE_E XTENDED 1
      | #define _POSIX_C_SOURCE 200112L
      | /* end confdefs.h. */
      |
      | int
      | main ()
      | {
      |
      | ;
      | return 0;
      | }
      configure:1798: error: C++ compiler cannot create executables
      See `config.log' for more details.

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

      ac_cv_env_CC_se t=
      ac_cv_env_CC_va lue=
      ac_cv_env_CFLAG S_set=
      ac_cv_env_CFLAG S_value=
      ac_cv_env_CPPFL AGS_set=
      ac_cv_env_CPPFL AGS_value=
      ac_cv_env_CPP_s et=
      ac_cv_env_CPP_v alue=
      ac_cv_env_LDFLA GS_set=
      ac_cv_env_LDFLA GS_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_targe t_alias_set=
      ac_cv_env_targe t_alias_value=
      ac_cv_prog_CXX= gcc

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

      AR=''
      BASECFLAGS=''
      BLDLIBRARY=''
      BLDSHARED=''
      BUILDEXEEXT=''
      CC=''
      CCSHARED=''
      CFLAGS=''
      CFLAGSFORSHARED =''
      CONFIGURE_MACOS X_DEPLOYMENT_TA RGET=''
      CONFIG_ARGS=''
      CPP=''
      CPPFLAGS=''
      CXX='gcc'
      DEFS=''
      DLINCLDIR=''
      DLLLIBRARY=''
      DYNLOADFILE=''
      ECHO_C=''
      ECHO_N='-n'
      ECHO_T=''
      EGREP=''
      EXEEXT=''
      EXTRAMACHDEPPAT H=''
      EXTRAPLATDIR=''
      HAVE_GETHOSTBYN AME=''
      HAVE_GETHOSTBYN AME_R=''
      HAVE_GETHOSTBYN AME_R_3_ARG=''
      HAVE_GETHOSTBYN AME_R_5_ARG=''
      HAVE_GETHOSTBYN AME_R_6_ARG=''
      INSTALL_DATA=''
      INSTALL_PROGRAM =''
      INSTALL_SCRIPT= ''
      INSTSONAME=''
      LDFLAGS=''
      LDLAST=''
      LDLIBRARY=''
      LDLIBRARYDIR=''
      LDSHARED=''
      LIBC=''
      LIBM=''
      LIBOBJS=''
      LIBRARY=''
      LIBS=''
      LIBTOOL_CRUFT=' '
      LINKCC=''
      LINKFORSHARED=' '
      LN=''
      LTLIBOBJS=''
      MACHDEP='linux2 '
      MACHDEP_OBJS=''
      MAINOBJ='python .o'
      OBJEXT=''
      OPT=''
      PACKAGE_BUGREPO RT=''
      PACKAGE_NAME='p ython'
      PACKAGE_STRING= 'python 2.3'
      PACKAGE_TARNAME ='python'
      PACKAGE_VERSION ='2.3'
      PATH_SEPARATOR= ':'
      PYTHONFRAMEWORK =''
      PYTHONFRAMEWORK DIR='no-framework'
      PYTHONFRAMEWORK INSTALLDIR=''
      PYTHONFRAMEWORK PREFIX=''
      RANLIB=''
      RUNSHARED=''
      SGI_ABI=''
      SHELL='/bin/sh'
      SHLIBS=''
      SIGNAL_OBJS=''
      SO=''
      SOVERSION='1.0'
      SRCDIRS=''
      THREADHEADERS=' '
      THREADOBJ=''
      TRUE=''
      UNICODE_OBJS=''
      USE_SIGNAL_MODU LE=''
      USE_THREAD_MODU LE=''
      VERSION='2.3'
      ac_ct_CC=''
      ac_ct_RANLIB=''
      bindir='${exec_ prefix}/bin'
      build_alias=''
      datadir='${pref ix}/share'
      exec_prefix='NO NE'
      host_alias=''
      includedir='${p refix}/include'
      infodir='${pref ix}/info'
      libdir='${exec_ prefix}/lib'
      libexecdir='${e xec_prefix}/libexec'
      localstatedir=' ${prefix}/var'
      mandir='${prefi x}/man'
      oldincludedir='/usr/include'
      prefix='NONE'
      program_transfo rm_name='s,x,x, '
      sbindir='${exec _prefix}/sbin'
      sharedstatedir= '${prefix}/com'
      sysconfdir='${p refix}/etc'
      target_alias=''

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

      #define _BSD_TYPES 1
      #define _GNU_SOURCE 1
      #define _NETBSD_SOURCE 1
      #define _POSIX_C_SOURCE 200112L
      #define _XOPEN_SOURCE 600
      #define _XOPEN_SOURCE_E XTENDED 1
      #define __BSD_VISIBLE 1

      configure: exit 77

      Comment

      • mensanator@aol.com

        #4
        Re: Compiling Python from Sources


        rwr wrote:
        <snip>
        [color=blue]
        > configure:1687: checking for gcc
        > configure:1703: found /usr/bin/gcc
        > configure:1713: result: gcc[/color]

        At this point, configure thinks you have the gcc compiler installed.
        [color=blue]
        > configure:1753: checking for C++ compiler default output file name
        > configure:1756: gcc conftest.cc >&5[/color]

        Now it's going to invoke the compiler to see what kind of output it
        creates.
        [color=blue]
        > gcc: installation problem, cannot exec 'cc1plus': No such file or
        > directory[/color]

        The gcc compiler is complaining that it cannot find the file cc1plus.
        The problem appears to be with the installation of gcc. If gcc was
        included in your default os setup, you may need to re-install it as
        the default setup may not include all the options (such as installing
        the c compiler but not the c++ compiler).

        I ran into a similar problem with Cygwin. In the setup program you
        have to specifically tell it which compilers to install. Which it does.
        But it doesn't include the tools needed by similar configuration
        programs such as make and m4. Those are in a different section
        of the setup program and you need to know which ones to install.
        There's no option for "install everything I need to compile c/c++
        programs". In my case, I had to run configure over and over again
        each time going through the log finding a new missing file, re-install,
        and repeat until the errors stopped.
        [color=blue]
        > configure:1759: $? = 1
        > configure: failed program was:
        > | /* confdefs.h. */
        > |
        > | #define _GNU_SOURCE 1
        > | #define _NETBSD_SOURCE 1
        > | #define __BSD_VISIBLE 1
        > | #define _BSD_TYPES 1
        > | #define _XOPEN_SOURCE 600
        > | #define _XOPEN_SOURCE_E XTENDED 1
        > | #define _POSIX_C_SOURCE 200112L
        > | /* end confdefs.h. */
        > |
        > | int
        > | main ()
        > | {
        > |
        > | ;
        > | return 0;
        > | }
        > configure:1798: error: C++ compiler cannot create executables
        > See `config.log' for more details.[/color]

        <snip>

        Comment

        • rwr

          #5
          Re: Compiling Python from Sources

          Thank you ever so much mensanator!!!

          Very much appreciated!
          rwr

          Comment

          • rwr

            #6
            Re: Compiling Python from Sources

            Due to my ignorance exactly what do you mean by "In my case, I had to
            run configure over and over againeach time going through the log
            finding a new missing file, re-install,
            and repeat until the errors stopped." My

            Why I ask is that I utilized "apt-get install gcc" to install gcc. Are
            there additional options that are found by appending "--help"?

            Curiously,
            rwr

            Ps. Thank you for your help and for your time. :)))

            Comment

            • mensanator@aol.com

              #7
              Re: Compiling Python from Sources


              rwr wrote:[color=blue]
              > Due to my ignorance exactly what do you mean by "In my case, I had to
              > run configure over and over againeach time going through the log
              > finding a new missing file, re-install,
              > and repeat until the errors stopped." My[/color]

              In my case, my error log said it couldn't find the file "make".
              So I re-installed Cygwin and chose the custom rather than default
              install. I had to go through dozens of install options before finding
              the make file (it isn't with the compilers).

              The configure then got a little further and stopped, complaining that
              it couldn't find "m4". So I had to re-install Cygwin again, this time
              looking for make and m4.

              This process was repeated until the configure ran to completion.
              [color=blue]
              >
              > Why I ask is that I utilized "apt-get install gcc" to install gcc. Are
              > there additional options that are found by appending "--help"?[/color]

              I don't know, I don't actually use linux. It may be that what you
              installed was a default set of options. If so, I have no clue how you
              get it to do what you want, I'm suggesting that as a possible place
              to look.
              [color=blue]
              >
              > Curiously,
              > rwr
              >
              > Ps. Thank you for your help and for your time. :)))[/color]

              Comment

              • rwr

                #8
                Re: Compiling Python from Sources

                Thank YOU ever soooooooooooooo oooooo much as it worked my friend!!!

                Thank you.

                Sincerely,
                rwr

                Comment

                Working...