Compiling Python from Sources

R

rwr

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
 
M

mensanator

rwr said:
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???

Did you look in config.log for more details?
Would you like to share them?
 
R

rwr

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_EXTENDED 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_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_LDFLAGS_set=
ac_cv_env_LDFLAGS_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_prog_CXX=gcc

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

AR=''
BASECFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC=''
CCSHARED=''
CFLAGS=''
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=''
CPP=''
CPPFLAGS=''
CXX='gcc'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_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_BUGREPORT=''
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.3'
PACKAGE_TARNAME='python'
PACKAGE_VERSION='2.3'
PATH_SEPARATOR=':'
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.3'
ac_ct_CC=''
ac_ct_RANLIB=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${prefix}/share'
exec_prefix='NONE'
host_alias=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/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_EXTENDED 1
#define __BSD_VISIBLE 1

configure: exit 77
 
M

mensanator

rwr wrote:
configure:1687: checking for gcc
configure:1703: found /usr/bin/gcc
configure:1713: result: gcc

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

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

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.
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_EXTENDED 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.

<snip>
 
R

rwr

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. :)))
 
M

mensanator

rwr said:
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

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.
Why I ask is that I utilized "apt-get install gcc" to install gcc. Are
there additional options that are found by appending "--help"?

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.
 
R

rwr

Thank YOU ever soooooooooooooooooooo much as it worked my friend!!!

Thank you.

Sincerely,
rwr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top