473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Compiling Python from Sources

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

May 24 '06 #1
7 2365

rwr wrote:
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?
TIA,
rwr


May 24 '06 #2
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

May 24 '06 #3

rwr wrote:
<snip>
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>

May 24 '06 #4
rwr
Thank you ever so much mensanator!!!

Very much appreciated!
rwr

May 25 '06 #5
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. :)))

May 25 '06 #6

rwr wrote:
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.

Curiously,
rwr

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


May 25 '06 #7
rwr
Thank YOU ever soooooooooooooooooooo much as it worked my friend!!!

Thank you.

Sincerely,
rwr

May 25 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: RosalieM | last post by:
I would like to understand what python needs to work on unix. And to understand how i can make it smalest possible? I dont understand at all setup. I searched in python.org and in sources but it...
3
by: Paul Sheer | last post by:
I have managed to build Python 2.3.3 with the aCC HP-UX C++ compiler by making a number of one-line changes. (For reasons beyond my control, I am forced to use this compiler and it has no C mode...
1
by: A. B., Khalid | last post by:
Hello all. After a search on Google it would seem that the users of Mingw have not had good results in compiling the python sources natively. See at least: ...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
4
by: davidstummer | last post by:
I was wondering if anyone could point me to an example. Currently i have a c++ program which calls and c++ dll (i created both). The dll uses SendMessage to pass messages back to the calling .exe,...
0
by: the.frapster | last post by:
HI, I hope you all can help me, or at least point me in the right direction. I am not a programmer, I am just trying to help some students in a programming class with this issue, I am the lab...
6
by: howa | last post by:
I have compiled python 2.5 from source i.e. ../configure make make install but when i try to install another package require python, seems it
6
by: Oliver Graeser | last post by:
Ok, stupid question.... I used to write programs all into one text files and compile them. Works, fine. Then I discovered XCode (or IDEs in general) which appear to be really increasing my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.