New submission from fluyy:

I Compile the Python interpreter statically.

$ uname -a
Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 
x86_64 x86_64 GNU/Linux

fluyy@ubuntu:~/tmp/Python-3.5.1$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-22ubuntu2' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch
 -32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib 
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)


 ./configure LDFLAGS="-Wl,-no-export-dynamic -Wl,--no-as-needed -static-libgcc 
-static" CPPFLAGS="-static -fPIC" -disable-shared 
-prefix="/home/fluyy/python3.5"

and I change -O3 to -O2 in Makefile

I had change some complie options. because make is error

the options I changed is :

1.gcc -pthread -Wl,-no-export-dynamic -Wl,--no-as-needed -static-libgcc -static 
 -o Programs/_freeze_importlib Programs/_freeze_importlib.o 
Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o 
Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o 
Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o 
Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o 
Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o 
Objects/bytesobject.o Objects/cellobject.o Objects/classobject.o 
Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o 
Objects/enumobject.o Objects/exceptions.o Objects/genobject.o 
Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o 
Objects/funcobject.o Objects/iterobject.o Objects/listobject.o 
Objects/longobject.o Objects/dictobject.o Objects/odictobject.o 
Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o 
Objects/namespaceobject.o Objects/object.o Objec
 ts/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o 
Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o 
Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o 
Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o 
Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o 
Python/codecs.o Python/dynamic_annotations.o Python/errors.o 
Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o 
Python/getcopyright.o Python/getplatform.o Python/getversion.o 
Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o 
Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o 
Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o 
Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o 
Python/pytime.o Python/random.o Python/structmember.o Python/symtable.o 
Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o 
Python/pystrtod.o Pyth
 on/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o 
Python/dynload_shlib.o   Python/thread.o Modules/config.o Modules/getpath.o 
Modules/main.o Modules/gcmodule.o  Modules/_threadmodule.o  
Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  
Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  
Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  
Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o 
 Modules/_stat.o  Modules/timemodule.o  Modules/_localemodule.o  
Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o 
Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  
Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  
Modules/symtablemodule.o  Modules/readline.o  Modules/arraymodule.o  
Modules/mathmodule.o Modules/_math.o  Modules/_struct.o  
Modules/_randommodule.o  Modules/_elementtree.o  Modules/_pickle.o  
Modules/_datetimemodule.o  M
 odules/_bisectmodule.o  Modules/_heapqmodule.o  Modules/unicodedata.o  
Modules/fcntlmodule.o  Modules/spwdmodule.o  Modules/grpmodule.o  
Modules/selectmodule.o  Modules/mmapmodule.o  Modules/_csv.o  
Modules/socketmodule.o  Modules/_ssl.o  Modules/_cryptmodule.o  
Modules/_posixsubprocess.o  Modules/md5module.o  Modules/sha1module.o  
Modules/sha256module.o  Modules/sha512module.o  Modules/syslogmodule.o  
Modules/binascii.o  Modules/parsermodule.o  Modules/zlibmodule.o  
Modules/xmlparse.o Modules/xmlrole.o Modules/xmltok.o Modules/pyexpat.o  
Modules/multibytecodec.o  Modules/_codecs_cn.o  Modules/_codecs_hk.o  
Modules/_codecs_iso2022.o  Modules/_codecs_jp.o  Modules/_codecs_kr.o  
Modules/_codecs_tw.o  Modules/xxsubtype.o  /usr/lib/x86_64-linux-gnu/libssl.a 
/usr/lib/x86_64-linux-gnu/libcrypto.a -lpthread -ldl  -lutil -lreadline 
-ltermcap                   -L/lib -lssl -lcrypto  -lcrypt          
-L/home/fluyy/python3.5/lib -lz                              -lreadline 
-ltermcap            
        -L/lib -lssl -lcrypto  -lcrypt          -L/home/fluyy/python3.5/lib -lz 
   -lm

2.gcc -pthread -Wl,-no-export-dynamic -Wl,--no-as-needed -static-libgcc -static 
-export-dynamic -o python Programs/python.o libpython3.5m.a 
/usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a 
-lpthread -ldl  -lutil -lreadline -ltermcap                   -L/lib -lssl 
-lcrypto  -lcrypt          -L/home/fluyy/python3.5/lib -lz                      
        -lreadline -ltermcap                   -L/lib -lssl -lcrypto  -lcrypt   
       -L/home/fluyy/python3.5/lib -lz          -lm

3.gcc -pthread -Wl,-no-export-dynamic -Wl,--no-as-needed -static-libgcc -static 
-export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.5m.a 
/usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a 
-lpthread -ldl  -lutil -lreadline -ltermcap                   -L/lib -lssl 
-lcrypto  -lcrypt          -L/home/fluyy/python3.5/lib -lz                      
        -lreadline -ltermcap                   -L/lib -lssl -lcrypto  -lcrypt   
       -L/home/fluyy/python3.5/lib -lz          -lm


when I make test , the python is Crash!

[ 92/397/11] test_uu
[ 93/397/11] test_html
[ 94/397/11] test_sched
[ 95/397/11] test_bigmem
[ 96/397/11] test_pkgutil
[ 97/397/12] test_csv
test test_csv failed -- Traceback (most recent call last):
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/test_csv.py", line 213, in 
test_writerows_legacy_strings
    import _testcapi
ImportError: No module named '_testcapi'
[ 98/397/12] test_augassign
[ 99/397/12] test_httpservers
Fatal Python error: Segmentation fault

Current thread 0x00007f0f647d5700 (most recent call first):
  File "/home/fluyy/tmp/Python-3.5.1/Lib/socketserver.py", line 457 in 
server_bind
  File "/home/fluyy/tmp/Python-3.5.1/Lib/http/server.py", line 138 in 
server_bind
  File "/home/fluyy/tmp/Python-3.5.1/Lib/socketserver.py", line 443 in __init__
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/test_httpservers.py", line 42 in 
run
  File "/home/fluyy/tmp/Python-3.5.1/Lib/threading.py", line 914 in 
_bootstrap_inner
  File "/home/fluyy/tmp/Python-3.5.1/Lib/threading.py", line 882 in _bootstrap

Thread 0x0000000001b188c0 (most recent call first):
  File "/home/fluyy/tmp/Python-3.5.1/Lib/threading.py", line 293 in wait
  File "/home/fluyy/tmp/Python-3.5.1/Lib/threading.py", line 549 in wait
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/test_httpservers.py", line 62 in 
setUp
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/case.py", line 596 in run
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/case.py", line 648 in __call__
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/suite.py", line 122 in run
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/suite.py", line 84 in __call__
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/suite.py", line 122 in run
  File "/home/fluyy/tmp/Python-3.5.1/Lib/unittest/suite.py", line 84 in __call__
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/support/__init__.py", line 1677 
in run
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/support/__init__.py", line 1778 
in _run_suite
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/support/__init__.py", line 1812 
in run_unittest
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/test_httpservers.py", line 921 in 
test_main
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 1305 in 
runtest_inner
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 1002 in runtest
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 545 in main
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 1591 in 
main_in_temp_cwd
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 1616 in 
<module>
  File "/home/fluyy/tmp/Python-3.5.1/Lib/runpy.py", line 85 in _run_code
  File "/home/fluyy/tmp/Python-3.5.1/Lib/runpy.py", line 170 in 
_run_module_as_main
Traceback (most recent call last):
  File "/home/fluyy/tmp/Python-3.5.1/Lib/runpy.py", line 170, in 
_run_module_as_main
    "__main__", mod_spec)
  File "/home/fluyy/tmp/Python-3.5.1/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/__main__.py", line 3, in <module>
    regrtest.main_in_temp_cwd()
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 1591, in 
main_in_temp_cwd
    main()
  File "/home/fluyy/tmp/Python-3.5.1/Lib/test/regrtest.py", line 756, in main
    raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_httpservers: Exit code -11

----------
components: Tests
messages: 256661
nosy: fluyy
priority: normal
severity: normal
status: open
title: make test crash
type: crash
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25901>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to