Installation of Python and openssl --- without yum - python

trying to install OpenSSL for python 3.8.3 in Linux,
make give the following error
I have added all the path required in .bashrc and .bash_profile
I have used /config comand
'''
./configure --prefix=$Home/.local/python --with-openssl=$HOME/.local/ssl
'''
Makefile:1884: warning: overriding commands for target `Modules/_ssl.o'
Makefile:1882: warning: ignoring old commands for target `Modules/_ssl.o'
Makefile:1885: warning: overriding commands for target `Modules/_ssl.cpython-38-x86_64-linux-gnu.so'
Makefile:1883: warning: ignoring old commands for target `Modules/_ssl.cpython-38-x86_64-linux-gnu.so'
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE_BUILTIN -DUSE_SSL -IOME/.local/openssl1/include -IOME/.local/openssl1/include/openssl -c ./Modules/_ssl.c -o Modules/_ssl.o
./Modules/_ssl.c: In function ‘_ssl_configure_hostname’:
./Modules/_ssl.c:891: error: implicit declaration of function ‘SSL_get0_param’
./Modules/_ssl.c:891: warning: initialization makes pointer from integer without a cast
./Modules/_ssl.c:893: error: implicit declaration of function ‘X509_VERIFY_PARAM_set1_host’
./Modules/_ssl.c:899: error: implicit declaration of function ‘X509_VERIFY_PARAM_set1_ip’
./Modules/_ssl.c: In function ‘_ssl__SSLContext_impl’:
./Modules/_ssl.c:3130: error: ‘X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS’ undeclared (first use in this function)
./Modules/_ssl.c:3130: error: (Each undeclared identifier is reported only once
./Modules/_ssl.c:3130: error: for each function it appears in.)
./Modules/_ssl.c:3240: error: implicit declaration of function ‘SSL_CTX_get0_param’
./Modules/_ssl.c:3240: warning: assignment makes pointer from integer without a cast
./Modules/_ssl.c:3246: error: implicit declaration of function ‘X509_VERIFY_PARAM_set_hostflags’
./Modules/_ssl.c: In function ‘get_verify_flags’:
./Modules/_ssl.c:3555: warning: assignment makes pointer from integer without a cast
./Modules/_ssl.c: In function ‘set_verify_flags’:
./Modules/_ssl.c:3568: warning: assignment makes pointer from integer without a cast
./Modules/_ssl.c: In function ‘set_host_flags’:
./Modules/_ssl.c:3764: warning: assignment makes pointer from integer without a cast

This make output ...
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE_BUILTIN -DUSE_SSL -IOME/.local/openssl1/include -IOME/.local/openssl1/include/openssl -c ./Modules/_ssl.c -o Modules/_ssl.o
... suggests that your configure command was not ...
./configure --prefix=$Home/.local/python --with-openssl=$HOME/.local/ssl
In particular, I am looking at these bits of the output:
-IOME/.local/openssl1/include -IOME/.local/openssl1/include/openssl
. That's showing the effect of the text $HOME/.local/openssl1 being expanded by make to OME/.local/openssl1 (because no variable H is defined). That, in turn, indicates that $HOME was not expanded by the shell when you ran configure, so it must have been quoted in the actual command you ran. Something like this, maybe:
(wrong:)
./configure --prefix='$Home/.local/python' --with-openssl='$HOME/.local/openssl1'
Additionally, $Home is not the same as $HOME, so probably what you really want is:
(better:)
./configure --prefix=$HOME/.local/python --with-openssl=$HOME/.local/openssl1
If you do quote then do it with double quotes ("), not single-quotes ('), because the latter suppress shell parameter expansion. If there's anything in your home directory name that requires quoting, however, such as spaces, then you can expect other issues to arise, whether you quote in the configure command or not.

Related

Installing Scrapy with pip, but come across an error of Cryptography, indicating compiling fails

My OS is Suse 11 Enterprise SP3.
I try to install scrapy by pip.
But when compiling Cryptography, it indicates somthing wrong with the compiling of _openssl.c
I have never edited anything of _openssl.c.
Dont know why this happened.
Very eager to know how to solve it .
Part of the log :
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
*gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/python2.7/include/python2.7 -c*** build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o*
build/temp.linux-x86_64-2.7/_openssl.c:680: error: function definition declared ‘typedef’
build/temp.linux-x86_64-2.7/_openssl.c:680: warning: return type defaults to ‘int’
build/temp.linux-x86_64-2.7/_openssl.c: In function ‘LHASH_OF’:
build/temp.linux-x86_64-2.7/_openssl.c:680: error: expected declaration specifiers before ‘Cryptography_LHASH_OF_CONF_VALUE’
build/temp.linux-x86_64-2.7/_openssl.c:682: error: storage class specified for parameter ‘Cryptography_STACK_OF_ACCESS_DESCRIPTION’
build/temp.linux-x86_64-2.7/_openssl.c:683: error: storage class specified for parameter ‘Cryptography_STACK_OF_DIST_POINT’
build/temp.linux-x86_64-2.7/_openssl.c:684: error: storage class specified for parameter ‘Cryptography_STACK_OF_POLICYQUALINFO’
build/temp.linux-x86_64-2.7/_openssl.c:685: error: storage class specified for parameter ‘Cryptography_STACK_OF_POLICYINFO’
build/temp.linux-x86_64-2.7/_openssl.c:686: error: storage class specified for parameter ‘Cryptography_STACK_OF_ASN1_INTEGER’
build/temp.linux-x86_64-2.7/_openssl.c:687: error: storage class specified for parameter ‘Cryptography_STACK_OF_GENERAL_SUBTREE’
build/temp.linux-x86_64-2.7/_openssl.c:699: error: storage class specified for parameter ‘Cryptography_STACK_OF_ASN1_OBJECT’
build/temp.linux-x86_64-2.7/_openssl.c:700: error: storage class specified for parameter ‘Cryptography_STACK_OF_X509_OBJECT’
In file included from build/temp.linux-x86_64-2.7/_openssl.c:711:

Error: format not a string literal and no format arguments [-Werror=format-security]

I am having this error during installation of 4suite.xml on ubuntu. Trying to install harpia on my ubuntu but couple packages are missing from my system so during to getting those missing dependencies I stuck on this.
username#ubuntu:~/4Suite-XML-1.0.2$ sudo python setup.py install
running install
running build
running config
running build_py
running build_ext
building 'Ft.Xml.Lib.cStreamWriter' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Ft/Xml/src/StreamWriter.c -o build/temp.linux- x86_64-2.7/Ft/Xml/src/StreamWriter.o
In file included from /usr/include/python2.7/Python.h:94:0,
from Ft/Xml/src/StreamWriter.c:14:
Ft/Xml/src/StreamWriter.c: In function ‘writer_print’:
/usr/include/python2.7/stringobject.h:91:32: error: format not a string literal and no format arguments [-Werror=format-security]
#define PyString_AS_STRING(op) (((PyStringObject *)(op))->ob_sval)
^
Ft/Xml/src/StreamWriter.c:605:15: note: in expansion of macro ‘PyString_AS_STRING’
fprintf(fp, PyString_AS_STRING(repr));
^
Ft/Xml/src/StreamWriter.c: In function ‘entitymap_print’:
/usr/include/python2.7/stringobject.h:91:32: error: format not a string literal and no format arguments [-Werror=format-security]
#define PyString_AS_STRING(op) (((PyStringObject *)(op))->ob_sval)
^
Ft/Xml/src/StreamWriter.c:815:15: note: in expansion of macro ‘PyString_AS_STRING’
fprintf(fp, PyString_AS_STRING(repr));
^
cc1: some warnings being treated as errors
Can you help me to figure that out ?
Trying to use code below might helpful:
fprintf(fp, "%s", PyString_AS_STRING(repr));
Clues are from fprintf, error: format not a string literal and no format arguments [-Werror=format-security] and How to fix this compiler error 'format not a string literal and no format arguments' and similar situation in deploying python codes
A quick and dirty workaround for me was to set CFLAGS to override -Werror=format-security with -Wno-error=format-security (python 2 on CenTOS):
wget https://files.pythonhosted.org/packages/0e/ae/3c5b4fffb12be7c3a80c99475853349e1cf8477f99051921ea06fbf5e3b9/4Suite-XML-1.0.2.tar.gz
tar -xvf 4Suite-XML-1.0.2.tar.gz
export CFLAGS=" -Wno-error=format-security" # no error will be generated, you know what you do
python2 ./setup.py install # 4Suite-XML compilation works without error

How Can I Fix "expected declaration specifiers before ‘initsetsc’" When Installing Guppy (Python 3)?

EDIT: https://stackoverflow.com/a/38860927/1112524 Sorry
When I try to install guppy/heapy for memory profiling,
pip3 install guppy --user
I get
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/src
creating build/temp.linux-x86_64-3.4/src/sets
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c src/sets/sets.c -o build/temp.linux-x86_64-3.4/src/sets/sets.o
src/sets/sets.c:76:1: warning: return type defaults to ‘int’ [-Wreturn-type]
DL_EXPORT (void)
^
src/sets/sets.c: In function ‘DL_EXPORT’:
src/sets/sets.c:39:18: error: expected declaration specifiers before ‘initsetsc’
#define INITFUNC initsetsc
^
src/sets/sets.c:77:1: note: in expansion of macro ‘INITFUNC’
INITFUNC (void)
^
src/sets/sets.c:108:1: error: expected ‘{’ at end of input
}
^
src/sets/sets.c: At top level:
src/sets/sets.c:45:20: warning: ‘module_methods’ defined but not used [-Wunused-variable]
static PyMethodDef module_methods[] =
^
src/sets/sets.c:67:18: warning: ‘nysets_heapdefs’ defined but not used [-Wunused-variable]
static NyHeapDef nysets_heapdefs[] = {
^
src/sets/sets.c: In function ‘DL_EXPORT’:
src/sets/sets.c:108:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
How can I fix this?
I tried installing things from this question, but it didn't work
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Also, just now I happened to try Python 2
pip install guppy --user
And it worked.

Can't install radare2-bindings due to `error: too many arguments to function 'void r_io_section_list_visual (...)`

I'm trying to install the radare2-bindings for Python (http://www.radare.org/r/down.html).
After cloning the project from github and running ./configure --prefix=/usr, everything seems ok python-wide on the output (errors are from languages I won't need bindings to).
==> Using valabind 0.9.2--1-g7281165
==> Using swig 2.0.11
Checking valabind languages support...
- python: cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
yes
- perl: yes
- ruby: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from -e:1:in `<main>'
test_wrap.c:821:18: fatal error: ruby.h: No such file or directory
#include <ruby.h>
^
compilation terminated.
no
- lua: test_wrap.c:709:17: fatal error: lua.h: No such file or directory
#include "lua.h"
^
compilation terminated.
no
- go: SWIG -go: -intgosize option required but not specified
no
- java: test_wrap.c:135:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated.
no
- guile: test_wrap.cxx:730:22: fatal error: libguile.h: No such file or directory
#include <libguile.h>
^
compilation terminated.
no
- php5: test_wrap.c:706:18: fatal error: zend.h: No such file or directory
#include "zend.h"
^
compilation terminated.
no
- node-ffi: no
- ctypes: yes
- ocaml: SWIG is buggy. Please set in ocamldec.swg the following line:
#define caml_array_length swig_caml_array_length
/usr/bin/valabind-cc: 1: /usr/bin/valabind-cc: ocamlc: not found
test_wrap.cxx:741:24: fatal error: caml/alloc.h: No such file or directory
#include <caml/alloc.h>
^
compilation terminated.
no
- cxx: yes (g++)
- valac: yes
Supported langs:
- ctypes
- cxx
- duktape
- perl
- python
- valac
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for working directories... current
using prefix '/usr'
checking for c compiler... gcc
checking for c++ compiler... g++
checking for valabind... /usr/bin/valabind
checking for swig... /usr/bin/swig
checking for g-ir-compiler... /usr/bin/g-ir-compiler
Using PKGCONFIG: pkg-config
checking pkg-config flags for r_core... yes
creating ./config.mk
cleaning temporally files... done
Final report:
- PREFIX = /usr
- HAVE_SWIG = 1
- HAVE_VALABIND = 1
- HAVE_GIRCOMPILER = 1
However, when I try to run make on the python folder, I get the following output:
Build r_core -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind-cc python r_core -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_core -I/usr/include/libr -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_core.i -m r_core ../vapi/r_core --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_core
NOTICE Adding dependency package r_cmd
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_cons
NOTICE Adding dependency package r_anal
NOTICE Adding dependency package r_reg
NOTICE Adding dependency package r_hash
NOTICE Adding dependency package r_egg
NOTICE Adding dependency package r_asm
NOTICE Adding dependency package r_syscall
NOTICE Adding dependency package r_db
NOTICE Adding dependency package r_io
NOTICE Adding dependency package r_bp
NOTICE Adding dependency package r_debug
NOTICE Adding dependency package r_search
NOTICE Adding dependency package r_flags
NOTICE Adding dependency package r_config
NOTICE Adding dependency package r_bin
NOTICE Adding dependency package r_parse
NOTICE Adding dependency package r_lang
NOTICE Adding dependency package r_print
NOTICE Adding dependency package r_fs
NOTICE Adding dependency package r_magic
WARNING Method delete renamed to _delete (don't ask where)
WARNING Method continue renamed to cont (don't ask where)
swig -small -O -o r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_core.i
r_core.i:40: Warning 302: Identifier 'RCoreAsmHitVector' redefined (ignored) (Renamed from 'vector< RCoreAsmHit >'),
r_core.i:39: Warning 302: previous definition of 'RCoreAsmHitVector' (Renamed from 'vector< RCoreAsmHit >').
r_core.i:42: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:46: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:47: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:62: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:63: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:92: Warning 314: 'print' is a python keyword, renaming to '_print'
r_core.i:322: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:327: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:584: Warning 314: 'import' is a python keyword, renaming to '_import'
r_core.i:1979: Warning 314: 'del' is a python keyword, renaming to '_del'
r_core.i:1655: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
r_core.i:1660: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
g++ -fPIC -shared r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_core.so -lr_magic -lr_fs -lr_socket -lr_syscall -lr_search -lr_reg -lr_egg -lr_bp -lr_parse -lr_anal -lr_io -lr_lang -lr_bin -lr_hash -lr_debug -lr_db -lr_asm -lr_flags -lr_util -lr_cons -lr_config -lr_core -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_core_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_core_wrap.cxx:7324:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_core_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_core_wrap.cxx:8266:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from /usr/include/libr/r_fs.h:6:0,
from r_core_wrap.cxx:3210:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_core.so
Build r_bin -lr_bin -lr_util -lr_db -lr_io
valabind-cc python r_bin -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_bin -I/usr/include/libr -lr_bin -lr_util -lr_db -lr_io
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_bin.i -m r_bin ../vapi/r_bin --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_bin
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_io
swig -small -O -o r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_bin.i
r_bin.i:110: Warning 314: 'import' is a python keyword, renaming to '_import'
g++ -fPIC -shared r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_bin.so -lr_io -lr_db -lr_util -lr_bin -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_bin_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_bin_wrap.cxx:6034:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_bin_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_bin_wrap.cxx:6271:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from r_bin_wrap.cxx:3117:0:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_bin.so
... r_asm.so
Does anyone know how to solve this? I've had a lot of problems during this installation already, and was able to solve them... but this one really got me stuck now.

install gcc4.0 on mac os x 10.8

I am trying to read and learn the pytho2.5.6 source code, and try to recompile the code everytime i make some change on it.
But it doesn't seem to work when I comile the source code via the following commands:
./configure --prefix=/path/to/somewhere/that/don't/messup/myenv/
make
After make, the console just show errors like this:
cc1: error: unrecognized command line option "-Wno-long-double"
I search the google , and it seems like the gcc(4.2.1) that i am using is not compatiable with the python2.5.6.
some info of my sys:
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Xcode 4.6.2(installed via the xcode command cline tool )
python2.5.6 source code(download from python.org)
I have try some solutions like these:
1.download diff python code version , like 2.5.4, and do the steps again.
2.after configure,modify the Makefile,and remove the --Wno-long-double,but new errors showed like below:
➜ Python-2.5.6 make
gcc -c -fno-strict-aliasing -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/mactoolboxglue.o Python/mactoolboxglue.c
In file included from Include/Python.h:57,
from Python/mactoolboxglue.c:26:
Include/pyport.h:547: warning: ‘struct winsize’ declared inside parameter list
Include/pyport.h:547: warning: its scope is only this definition or declaration, which is probably not what you want
Include/pyport.h:548: warning: ‘struct winsize’ declared inside parameter list
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:67,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:18,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:18,
from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
from Include/pymactoolbox.h:10,
from Python/mactoolboxglue.c:27:
/usr/include/AvailabilityMacros.h:109:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
In file included from Python/mactoolboxglue.c:27:
.......
Python/mactoolboxglue.c: In function ‘MediaObj_Convert’:
Python/mactoolboxglue.c:431: error: ‘cobj’ undeclared (first use in this function)
Python/mactoolboxglue.c:431: error: too many arguments to function ‘PyMacGluePtr_MediaObj_Convert’
make: *** [Python/mactoolboxglue.o] Error 1
So, i wonder if there are some way to intall gcc4.0 manually?
PS:the reason why i use python2.5.6 is because i read a book called which is written in chinese.Or maybe the best solution is to read the 2.7 source code =.=....hmmm.....

Categories

Resources