jasonmorganson / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

newlib python sometimes fails to link #161

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The python build sometimes fails to link with undefined references:

/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-gcc 
-L/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/lib/newlib_x86_32
/Release 
-L/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86
_newlib/i686-nacl/usr/lib 
-Wl,-rpath-link=/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/too
lchain/mac_x86_newlib/i686-nacl/usr/lib -Xlinker -export-dynamic -o python.nexe 
\
            Modules/python.o \
            libpython2.7.a -lpthread -ltermcap -lglibc-compat -lpthread   -lm  
libpython2.7.a(config.o):(.data+0x14): undefined reference to `initreadline'
libpython2.7.a(config.o):(.data+0x1c): undefined reference to `initarray'
libpython2.7.a(config.o):(.data+0x24): undefined reference to `initcmath'
libpython2.7.a(config.o):(.data+0x2c): undefined reference to `initmath'
libpython2.7.a(config.o):(.data+0x34): undefined reference to `init_struct'
libpython2.7.a(config.o):(.data+0x3c): undefined reference to `inittime'
libpython2.7.a(config.o):(.data+0x44): undefined reference to `initoperator'
libpython2.7.a(config.o):(.data+0x4c): undefined reference to `init_testcapi'
libpython2.7.a(config.o):(.data+0x54): undefined reference to `init_random'
libpython2.7.a(config.o):(.data+0x5c): undefined reference to `init_collections'
libpython2.7.a(config.o):(.data+0x64): undefined reference to `init_heapq'
libpython2.7.a(config.o):(.data+0x6c): undefined reference to `inititertools'
libpython2.7.a(config.o):(.data+0x74): undefined reference to `initstrop'
libpython2.7.a(config.o):(.data+0x7c): undefined reference to `init_functools'
libpython2.7.a(config.o):(.data+0x84): undefined reference to `init_elementtree'
libpython2.7.a(config.o):(.data+0x8c): undefined reference to `initdatetime'
libpython2.7.a(config.o):(.data+0x94): undefined reference to `init_bisect'
libpython2.7.a(config.o):(.data+0x9c): undefined reference to `initunicodedata'
libpython2.7.a(config.o):(.data+0xa4): undefined reference to `init_io'
libpython2.7.a(config.o):(.data+0xac): undefined reference to `initfcntl'
libpython2.7.a(config.o):(.data+0xb4): undefined reference to `initselect'
libpython2.7.a(config.o):(.data+0xbc): undefined reference to `init_csv'
libpython2.7.a(config.o):(.data+0xc4): undefined reference to `init_socket'
libpython2.7.a(config.o):(.data+0xcc): undefined reference to `init_ssl'
libpython2.7.a(config.o):(.data+0xd4): undefined reference to `init_md5'
libpython2.7.a(config.o):(.data+0xdc): undefined reference to `init_sha'
libpython2.7.a(config.o):(.data+0xe4): undefined reference to `init_sha256'
libpython2.7.a(config.o):(.data+0xec): undefined reference to `init_sha512'
libpython2.7.a(config.o):(.data+0xf4): undefined reference to `initbinascii'
libpython2.7.a(config.o):(.data+0xfc): undefined reference to 
`initfuture_builtins'
libpython2.7.a(config.o):(.data+0x104): undefined reference to `initparser'
libpython2.7.a(config.o):(.data+0x10c): undefined reference to `initcStringIO'
libpython2.7.a(config.o):(.data+0x114): undefined reference to `initcPickle'
libpython2.7.a(config.o):(.data+0x11c): undefined reference to `initzlib'
libpython2.7.a(config.o):(.data+0x124): undefined reference to `initbz2'
collect2: ld returned 1 exit status

This usually (always?) happens on Mac.
I believe the 'initfoo' functions are static initializers.

Original issue reported on code.google.com by dschuff@chromium.org on 10 Nov 2014 at 6:11

GoogleCodeExporter commented 9 years ago
This happened again recently:
rm -f libpython2.7.a
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a Modules/getbuildinfo.o
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a Parser/acceler.o Parser/grammar1.o 
Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o 
Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o 
Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a Objects/abstract.o 
Objects/boolobject.o Objects/bufferobject.o Objects/bytes_methods.o 
Objects/bytearrayobject.o Objects/capsule.o Objects/cellobject.o 
Objects/classobject.o Objects/cobject.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/intobject.o Objects/iterobject.o Objects/listobject.o 
Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o 
Objects/methodobject.o Objects/moduleobject.o Objects/object.o 
Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o 
Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o 
Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o 
Objects/unicodeobject.o Objects/unicodectype.o
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a 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/errors.o Python/frozen.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/pymath.o Python/pystate.o Python/pythonrun.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 
Python/dtoa.o Python/formatter_unicode.o Python/formatter_string.o 
Python/dynload_stub.o   Python/thread.o
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a Modules/config.o Modules/getpath.o 
Modules/main.o Modules/gcmodule.o 
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ar cr libpython2.7.a 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/zipimport.o  Modules/symtablemodule.o  
Modules/xxsubtype.o
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-ranlib libpython2.7.a
/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86_n
ewlib/bin/i686-nacl-gcc 
-L/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/lib/newlib_x86_32
/Release 
-L/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/toolchain/mac_x86
_newlib/i686-nacl/usr/lib 
-Wl,-rpath-link=/Volumes/data/b/build/slave/naclports/build/src/out/nacl_sdk/too
lchain/mac_x86_newlib/i686-nacl/usr/lib -Xlinker -export-dynamic -o python.nexe 
\
            Modules/python.o \
            libpython2.7.a -lpthread -ltermcap -lglibc-compat -lpthread   -lm  
libpython2.7.a(config.o):(.data+0x14): undefined reference to `initreadline'
libpython2.7.a(config.o):(.data+0x1c): undefined reference to `initarray'
libpython2.7.a(config.o):(.data+0x24): undefined reference to `initcmath'
libpython2.7.a(config.o):(.data+0x2c): undefined reference to `initmath'
libpython2.7.a(config.o):(.data+0x34): undefined reference to `init_struct'
libpython2.7.a(config.o):(.data+0x3c): undefined reference to `inittime'
libpython2.7.a(config.o):(.data+0x44): undefined reference to `initoperator'
libpython2.7.a(config.o):(.data+0x4c): undefined reference to `init_testcapi'
libpython2.7.a(config.o):(.data+0x54): undefined reference to `init_random'
libpython2.7.a(config.o):(.data+0x5c): undefined reference to `init_collections'
libpython2.7.a(config.o):(.data+0x64): undefined reference to `init_heapq'
libpython2.7.a(config.o):(.data+0x6c): undefined reference to `inititertools'
libpython2.7.a(config.o):(.data+0x74): undefined reference to `initstrop'
libpython2.7.a(config.o):(.data+0x7c): undefined reference to `init_functools'
libpython2.7.a(config.o):(.data+0x84): undefined reference to `init_elementtree'
libpython2.7.a(config.o):(.data+0x8c): undefined reference to `initdatetime'
libpython2.7.a(config.o):(.data+0x94): undefined reference to `init_bisect'
libpython2.7.a(config.o):(.data+0x9c): undefined reference to `initunicodedata'
libpython2.7.a(config.o):(.data+0xa4): undefined reference to `init_io'
libpython2.7.a(config.o):(.data+0xac): undefined reference to `initfcntl'
libpython2.7.a(config.o):(.data+0xb4): undefined reference to `initselect'
libpython2.7.a(config.o):(.data+0xbc): undefined reference to `init_csv'
libpython2.7.a(config.o):(.data+0xc4): undefined reference to `init_socket'
libpython2.7.a(config.o):(.data+0xcc): undefined reference to `init_ssl'
libpython2.7.a(config.o):(.data+0xd4): undefined reference to `init_md5'
libpython2.7.a(config.o):(.data+0xdc): undefined reference to `init_sha'
libpython2.7.a(config.o):(.data+0xe4): undefined reference to `init_sha256'
libpython2.7.a(config.o):(.data+0xec): undefined reference to `init_sha512'
libpython2.7.a(config.o):(.data+0xf4): undefined reference to `initbinascii'
libpython2.7.a(config.o):(.data+0xfc): undefined reference to 
`initfuture_builtins'
libpython2.7.a(config.o):(.data+0x104): undefined reference to `initparser'
libpython2.7.a(config.o):(.data+0x10c): undefined reference to `initcStringIO'
libpython2.7.a(config.o):(.data+0x114): undefined reference to `initcPickle'
libpython2.7.a(config.o):(.data+0x11c): undefined reference to `initzlib'
libpython2.7.a(config.o):(.data+0x124): undefined reference to `initbz2'
libpython2.7.a(config.o):(.data+0x12c): undefined reference to 
`init_multiprocessing'
collect2: ld returned 1 exit status
make: *** [python.nexe] Error 1
naclports: Building python: failed.
naclports: Build FAILED for python (i686/newlib)
@@@STEP_FAILURE@@@

Original comment by sbc@google.com on 20 Feb 2015 at 6:55