Solaris 10 + Sun Studio 12 Pyrhon 2.4.4 64-bit build problem

P

plumb and tree

I've been trying for days to build 64 bit python with Solaris 10 + Sun
Studio 12.

Can anyone helpl please.

This is how I tried to do build:

# ./configure --prefix=/opt/python2.4 --without-gcc --enable-shared
checking MACHDEP... sunos5
checking EXTRAPLATDIR...
checking for --without-gcc... yes
checking for --with-cxx=<compiler>... no
checking for c++... /opt/SUNWspro/bin/CC
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... /opt/SUNWspro/bin/CC
configure: error: C preprocessor "/opt/SUNWspro/bin/CC" fails sanity
check
See `config.log' for more details.

(sorry for the long log file but I'm not sure which part are
important)
config.log:
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.4, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure --prefix=/opt/python2.4 --without-gcc --enable-shared

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

hostname = zone2
uname -m = sun4u
uname -r = 5.10
uname -s = SunOS
uname -v = Generic_118833-36

/usr/bin/uname -p = sparc
/bin/uname -X = System = SunOS
Node = zone2
Release = 5.10
KernelID = Generic_118833-36
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1

/bin/arch = sun4
/usr/bin/arch -k = sun4u
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin


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

configure:1510: checking MACHDEP
configure:1655: result: sunos5
configure:1661: checking EXTRAPLATDIR
configure:1676: result:
configure:1697: checking for --without-gcc
configure:1746: result: yes
configure:1752: checking for --with-cxx=<compiler>
configure:1773: result: no
configure:1792: checking for c++
configure:1818: result: /opt/SUNWspro/bin/CC
configure:1858: checking for C++ compiler default output file name
configure:1861: /opt/SUNWspro/bin/CC -L/opt/SUNWmlib/lib -lrt -lm
conftest.cc >&5
configure:1864: $? = 0
configure:1910: result: a.out
configure:1915: checking whether the C++ compiler works
configure:1921: ./a.out
configure:1924: $? = 0
configure:1941: result: yes
configure:1948: checking whether we are cross compiling
configure:1950: result: no
configure:1953: checking for suffix of executables
configure:1955: /opt/SUNWspro/bin/CC -o conftest -L/opt/SUNWmlib/lib
-lrt -lm conftest.cc >&5
configure:1958: $? = 0
configure:1983: result:
configure:2057: checking for gcc
configure:2083: result: cc
configure:2327: checking for C compiler version
configure:2330: cc -V </dev/null >&5
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files. Use 'cc -flags' for details
configure:2333: $? = 1
configure:2356: checking for C compiler default output file name
configure:2359: cc -O2 -L/opt/SUNWmlib/lib -lrt -lm conftest.c >&5
configure:2362: $? = 0
configure:2408: result: a.out
configure:2413: checking whether the C compiler works
configure:2419: ./a.out
configure:2422: $? = 0
configure:2439: result: yes
configure:2446: checking whether we are cross compiling
configure:2448: result: no
configure:2451: checking for suffix of executables
configure:2453: cc -o conftest -O2 -L/opt/SUNWmlib/lib -lrt -lm
conftest.c >&5
configure:2456: $? = 0
configure:2481: result:
configure:2487: checking for suffix of object files
configure:2508: cc -c -O2 conftest.c >&5
configure:2511: $? = 0
configure:2533: result: o
configure:2537: checking whether we are using the GNU C compiler
configure:2561: cc -c -O2 conftest.c >&5
"conftest.c", line 15: undefined symbol: choke
"conftest.c", line 15: syntax error before or at: me
cc: acomp failed for conftest.c
configure:2567: $? = 2
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
|
| int
| main ()
| {
| #ifndef __GNUC__
| choke me
| #endif
|
| ;
| return 0;
| }
configure:2593: result: no
configure:2599: checking whether cc accepts -g
configure:2620: cc -c -g conftest.c >&5
configure:2626: $? = 0
configure:2630: test -z
|| test ! -s conftest.err
configure:2633: $? = 0
configure:2636: test -s conftest.o
configure:2639: $? = 0
configure:2650: result: yes
configure:2667: checking for cc option to accept ANSI C
configure:2737: cc -c -O2 conftest.c >&5
"conftest.c", line 53: warning: statement not reached
configure:2743: $? = 0
configure:2747: test -z
|| test ! -s conftest.err
configure:2750: $? = 0
configure:2753: test -s conftest.o
configure:2756: $? = 0
configure:2774: result: none needed
configure:2792: cc -c -O2 conftest.c >&5
"conftest.c", line 2: warning: old-style declaration or incorrect type
for: choke
"conftest.c", line 2: syntax error before or at: me
"conftest.c", line 3: warning: old-style declaration or incorrect type
for: me
cc: acomp failed for conftest.c
configure:2798: $? = 2
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2939: checking how to run the C preprocessor
configure:3057: result: /opt/SUNWspro/bin/CC
configure:3081: /opt/SUNWspro/bin/CC conftest.c
"conftest.c", line 15: Error: Syntax is not defined.
"conftest.c", line 15: Error: "," expected instead of "end of file".
"conftest.c", line 15: Error: Use ";" to terminate declarations.
3 Error(s) detected.
configure:3087: $? = 3
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3081: /opt/SUNWspro/bin/CC conftest.c
"conftest.c", line 15: Error: Syntax is not defined.
"conftest.c", line 15: Error: "," expected instead of "end of file".
"conftest.c", line 15: Error: Use ";" to terminate declarations.
3 Error(s) detected.
configure:3087: $? = 3
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3156: error: C preprocessor "/opt/SUNWspro/bin/CC" fails
sanity check
See `config.log' for more details.

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

ac_cv_c_compiler_gnu=no
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/opt/SUNWspro/bin/cc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-O2
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/opt/SUNWspro/bin/CC
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/opt/SUNWmlib/lib -lrt -lm'
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_exeext=
ac_cv_objext=o
ac_cv_prog_CPP=/opt/SUNWspro/bin/CC
ac_cv_prog_CXX=/opt/SUNWspro/bin/CC
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=

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

AR=''
BASECFLAGS='-# -xc99=all,lib -m64 -H -Xc -c -errtags=yes'
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='cc'
CCSHARED=''
CFLAGS='-O2'
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=''--prefix=/opt/python2.4' '--without-gcc' '--enable-
shared' 'CC=/opt/SUNWspro/bin/cc' 'CFLAGS=-O2' 'CPPFLAGS=' 'CPP=/opt/
SUNWspro/bin/CC' 'LDFLAGS=-L/opt/SUNWmlib/lib -lrt -lm''
CPP='/opt/SUNWspro/bin/CC'
CPPFLAGS=''
CXX='/opt/SUNWspro/bin/CC'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKUNIXTOOLSPREFIX='/opt/python2.4'
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='-L/opt/SUNWmlib/lib -lrt -lm'
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LN=''
LTLIBOBJS=''
MACHDEP='sunos5'
MACHDEP_OBJS=''
MAINOBJ='python.o'
OBJEXT='o'
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.4'
PACKAGE_TARNAME='python'
PACKAGE_VERSION='2.4'
PATH_SEPARATOR=':'
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/bash'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
UNIVERSALSDK=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.4'
ac_ct_CC='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='/opt/python2.4'
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 500
#define __BSD_VISIBLE 1

configure: exit 1

-------end of
config.log------------------------------------------------------------------------


thanks,
dg
 
M

MrJean1

Maybe this helps. Using ./configure --without-gcc .... in Python
2.5.1 on Solaris 10 gives a different message. That message indicates
that C++ compiler 'c++' will be used but the Studio C++ compiler on
Solaris is 'CC'.

Using ./configure --without-gcc --with-cxx-main=CC .... made that
message go away. Python did build after that and the tests are
running.

But it is a 32-bit binary, not 64-bit. Another ./configure option will
be needed to build that.

/Jean Brouwers
 
M

MrJean1

Building 64-bit Python is still elusive. I tried various ways to add -
xtarget=opteron -xarch-amd64 to the C/C++ flags but that still fails
to produce a 64-bit build. Changing the Makefile is not sufficient
since that causes compilation errors.

It looks like the ./configure command must run with those additional
flags. Passing the flags in environment variables defining CC and CXX
only works for CXX. The additional flags do not appear on the C
compiler command lines.

/Jean Brouwers



I've been trying for days to build 64 bit python with Solaris 10 + Sun
Studio 12.

Can anyone helpl please.

This is how I tried to do build:

# ./configure --prefix=/opt/python2.4 --without-gcc --enable-shared
checking MACHDEP... sunos5
checking EXTRAPLATDIR...
checking for --without-gcc... yes
checking for --with-cxx=<compiler>... no
checking for c++... /opt/SUNWspro/bin/CC
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... /opt/SUNWspro/bin/CC
configure: error: C preprocessor "/opt/SUNWspro/bin/CC" fails sanity
check
See `config.log' for more details.

(sorry for the long log file but I'm not sure which part are
important)
config.log:
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.4, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure --prefix=/opt/python2.4 --without-gcc --enable-shared

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

hostname = zone2
uname -m = sun4u
uname -r = 5.10
uname -s = SunOS
uname -v = Generic_118833-36

/usr/bin/uname -p = sparc
/bin/uname -X = System = SunOS
Node = zone2
Release = 5.10
KernelID = Generic_118833-36
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1

/bin/arch = sun4
/usr/bin/arch -k = sun4u
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/local/bin
PATH: /usr/xpg4/bin
PATH: /usr/sfw/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/local/mysql/bin
PATH: /usr/ccs/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin
PATH: /usr/openwin/bin
PATH: /usr/sfw/bin

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

configure:1510: checking MACHDEP
configure:1655: result: sunos5
configure:1661: checking EXTRAPLATDIR
configure:1676: result:
configure:1697: checking for --without-gcc
configure:1746: result: yes
configure:1752: checking for --with-cxx=<compiler>
configure:1773: result: no
configure:1792: checking for c++
configure:1818: result: /opt/SUNWspro/bin/CC
configure:1858: checking for C++ compiler default output file name
configure:1861: /opt/SUNWspro/bin/CC -L/opt/SUNWmlib/lib -lrt -lm
conftest.cc >&5
configure:1864: $? = 0
configure:1910: result: a.out
configure:1915: checking whether the C++ compiler works
configure:1921: ./a.out
configure:1924: $? = 0
configure:1941: result: yes
configure:1948: checking whether we are cross compiling
configure:1950: result: no
configure:1953: checking for suffix of executables
configure:1955: /opt/SUNWspro/bin/CC -o conftest -L/opt/SUNWmlib/lib
-lrt -lm conftest.cc >&5
configure:1958: $? = 0
configure:1983: result:
configure:2057: checking for gcc
configure:2083: result: cc
configure:2327: checking for C compiler version
configure:2330: cc -V </dev/null >&5
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files. Use 'cc -flags' for details
configure:2333: $? = 1
configure:2356: checking for C compiler default output file name
configure:2359: cc -O2 -L/opt/SUNWmlib/lib -lrt -lm conftest.c >&5
configure:2362: $? = 0
configure:2408: result: a.out
configure:2413: checking whether the C compiler works
configure:2419: ./a.out
configure:2422: $? = 0
configure:2439: result: yes
configure:2446: checking whether we are cross compiling
configure:2448: result: no
configure:2451: checking for suffix of executables
configure:2453: cc -o conftest -O2 -L/opt/SUNWmlib/lib -lrt -lm
conftest.c >&5
configure:2456: $? = 0
configure:2481: result:
configure:2487: checking for suffix of object files
configure:2508: cc -c -O2 conftest.c >&5
configure:2511: $? = 0
configure:2533: result: o
configure:2537: checking whether we are using the GNU C compiler
configure:2561: cc -c -O2 conftest.c >&5
"conftest.c", line 15: undefined symbol: choke
"conftest.c", line 15: syntax error before or at: me
cc: acomp failed for conftest.c
configure:2567: $? = 2
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
|
| int
| main ()
| {
| #ifndef __GNUC__
| choke me
| #endif
|
| ;
| return 0;
| }
configure:2593: result: no
configure:2599: checking whether cc accepts -g
configure:2620: cc -c -g conftest.c >&5
configure:2626: $? = 0
configure:2630: test -z
|| test ! -s conftest.err
configure:2633: $? = 0
configure:2636: test -s conftest.o
configure:2639: $? = 0
configure:2650: result: yes
configure:2667: checking for cc option to accept ANSI C
configure:2737: cc -c -O2 conftest.c >&5
"conftest.c", line 53: warning: statement not reached
configure:2743: $? = 0
configure:2747: test -z
|| test ! -s conftest.err
configure:2750: $? = 0
configure:2753: test -s conftest.o
configure:2756: $? = 0
configure:2774: result: none needed
configure:2792: cc -c -O2 conftest.c >&5
"conftest.c", line 2: warning: old-style declaration or incorrect type
for: choke
"conftest.c", line 2: syntax error before or at: me
"conftest.c", line 3: warning: old-style declaration or incorrect type
for: me
cc: acomp failed for conftest.c
configure:2798: $? = 2
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2939: checking how to run the C preprocessor
configure:3057: result: /opt/SUNWspro/bin/CC
configure:3081: /opt/SUNWspro/bin/CC conftest.c
"conftest.c", line 15: Error: Syntax is not defined.
"conftest.c", line 15: Error: "," expected instead of "end of file".
"conftest.c", line 15: Error: Use ";" to terminate declarations.
3 Error(s) detected.
configure:3087: $? = 3
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3081: /opt/SUNWspro/bin/CC conftest.c
"conftest.c", line 15: Error: Syntax is not defined.
"conftest.c", line 15: Error: "," expected instead of "end of file".
"conftest.c", line 15: Error: Use ";" to terminate declarations.
3 Error(s) detected.
configure:3087: $? = 3
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 500
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3156: error: C preprocessor "/opt/SUNWspro/bin/CC" fails
sanity check
See `config.log' for more details.

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

ac_cv_c_compiler_gnu=no
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/opt/SUNWspro/bin/cc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-O2
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/opt/SUNWspro/bin/CC
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/opt/SUNWmlib/lib -lrt -lm'
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_exeext=
ac_cv_objext=o
ac_cv_prog_CPP=/opt/SUNWspro/bin/CC
ac_cv_prog_CXX=/opt/SUNWspro/bin/CC
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=

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

AR=''
BASECFLAGS='-# -xc99=all,lib -m64 -H -Xc -c -errtags=yes'
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='cc'
CCSHARED=''
CFLAGS='-O2'
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=''--prefix=/opt/python2.4' '--without-gcc' '--enable-
shared' 'CC=/opt/SUNWspro/bin/cc' 'CFLAGS=-O2' 'CPPFLAGS=' 'CPP=/opt/
SUNWspro/bin/CC' 'LDFLAGS=-L/opt/SUNWmlib/lib -lrt -lm''
CPP='/opt/SUNWspro/bin/CC'
CPPFLAGS=''
CXX='/opt/SUNWspro/bin/CC'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKUNIXTOOLSPREFIX='/opt/python2.4'
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='-L/opt/SUNWmlib/lib -lrt -lm'
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LN=''
LTLIBOBJS=''
MACHDEP='sunos5'
MACHDEP_OBJS=''
MAINOBJ='python.o'
OBJEXT='o'
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.4'...

read more »
 
M

MrJean1

Here is one way to build a 64-bit Python binary on Solaris 10 using
SUN's compilers**. This is probably not the recommended procedure but
it does create a partial, expected result.

Here are the 4 steps I used:

1 - Run ./configure --without-gcc --with-cxx-main=CC --enable-64-
bit ....

2 - Edit the generated Makefile and change 3 lines

CC = cc -xtarget=opteron -xarch=amd64
CXX = CC -xtarget=opteron -xarch=amd64
MAINCC = CC -xtarget=opteron -xarch=amd64

The -xtarget and -xarch flags must be adjusted for UltraSparc.

3 - Edit python source file ./Include/pyport.h before line 728 (in
Python 2.5.1) as follows.

Add these 3 lines:

#ifndef __GNUC__ /* non-GNU C/C++, like SUN */
# undef LONG_BIT
#endif

such that LONG_BIT is #define'd next

#ifndef LONG_BIT
#define LONG_BIT (8 * SIZEOF_LONG)
#endif

before this error message can occur

#if LONG_BIT != 8 * SIZEOF_LONG
/* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some
recent
* 32-bit platforms using gcc. We try to catch that here at
compile-time
* rather than waiting for integer multiplication to trigger bogus
* overflows.
*/
#error "LONG_BIT definition appears wrong for platform (bad gcc/
glibc config?)."
#endif

4 - Run make and check the resulting Python binary with file ./
python.

However, make test still fails and that will require further
investigation.

/Jean Brouwers


**) Sun C/C++ 5.8 2005/10/14 on an Ultra 20 Opteron machine


Building 64-bit Python is still elusive. I tried various ways to add -
xtarget=opteron -xarch-amd64 to the C/C++ flags but that still fails
to produce a 64-bit build. Changing the Makefile is not sufficient
since that causes compilation errors.

It looks like the ./configure command must run with those additional
flags. Passing the flags in environment variables defining CC and CXX
only works for CXX. The additional flags do not appear on the C
compiler command lines.

/Jean Brouwers

On Oct 28, 11:03 pm, plumb and tree <[email protected]> wrote:
......
 
M

MrJean1

Here is a better way to build Python on Solaris, both 32- and 64-
bit.

<http://ccnuma.anu.edu.au/~wpc/blog/programming/building-python.html>

since it builds both the binary and make test on my Ultra 20 machine.
In my case 26 tests pass, 1 failed, 44 are skipped and there are 6 u
expected skips. The latter are expected and due to missing packages,
like Tcl.

Use the instructions from this site and forget mine. But it may still
be necessary to patch the ./Include/pyport.h file as shown in my
previous message.

/Jean Brouwers
 
M

MrJean1

Building 64-bit Python 2.4.4 on Solaris 10 and SUC C/C++ using the
instructions from

<http://ccnuma.anu.edu.au/~wpc/blog/programming/building-
python.html>

worked just fine on Ultra 20 Opteron machine. The test result summary
is below.

/Jean Brouwers

.....
249 tests OK.
2 tests failed:
test_cmath test_pty
40 tests skipped:
test_aepack test_al test_applesingle test_bsddb test_bsddb185
test_bsddb3 test_bz2 test_cd test_cl test_codecmaps_cn
test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
test_codecmaps_tw test_crypt test_curses test_dl test_gdbm test_gl
test_imageop test_imgfile test_linuxaudiodev test_macfs
test_macostools test_nis test_normalization test_ossaudiodev
test_pep277 test_plistlib test_rgbimg test_scriptpackages
test_socket_ssl test_socketserver test_tcl test_timeout
test_unicode_file test_urllib2net test_urllibnet test_winreg
test_winsound
5 skips unexpected on sunos5:
test_tcl test_bz2 test_crypt test_dl test_nis
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top