Skip to content

Instantly share code, notes, and snippets.

@etrepum
Created March 15, 2011 21:20
Show Gist options
  • Save etrepum/871510 to your computer and use it in GitHub Desktop.
Save etrepum/871510 to your computer and use it in GitHub Desktop.
(py27-ticket16883)[bob@ba pypy]$ python pytest.py pypy/translator/c/gcc/test/
============================= test session starts ==============================
platform darwin -- Python 2.7.1 -- pytest-2.0.3.dev1
pytest-2.0.3.dev1 from /Users/bob/src/pypy/pytest.pyc
collected 253 items
pypy/translator/c/gcc/test/test_asmgcroot.py ....................................................ssssssssssssssssssssssssssssssssssssssssssssssssssssEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE................................................s.
pypy/translator/c/gcc/test/test_thread.py ...
pypy/translator/c/gcc/test/test_trackgcroot.py ............................................
==================================== ERRORS ====================================
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_finalizer_order __
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'item': <IntTestFunction 'test_finalizer_order'>}>
item = <IntTestFunction 'test_finalizer_order'>
def pytest_runtest_setup(__multicall__, item):
if isinstance(item, py.test.collect.Function):
appclass = item.getparent(PyPyClassCollector)
if appclass is not None:
spaceconfig = getattr(appclass.obj, 'spaceconfig', None)
if spaceconfig:
appclass.obj.space = gettestobjspace(**spaceconfig)
> __multicall__.execute()
pypy/conftest.py:323:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MultiCall 0 results, 0 meths, kwargs={'item': <IntTestFunction 'test_finalizer_order'>}>
def execute(self):
while self.methods:
method = self.methods.pop()
kwargs = self.getkwargs(method)
> res = method(**kwargs)
_pytest/core.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <IntTestFunction 'test_finalizer_order'>
def pytest_runtest_setup(item):
> item.config._setupstate.prepare(item)
_pytest/runner.py:49:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.runner.SetupState object at 0x1016ffad0>
colitem = <IntTestFunction 'test_finalizer_order'>
def prepare(self, colitem):
""" setup objects along the collector chain to the test-method
and teardown previously setup objects."""
needed_collectors = colitem.listchain()
while self.stack:
if self.stack == needed_collectors[:len(self.stack)]:
break
self._pop_and_teardown()
# check if the last collection node has raised an error
for col in self.stack:
if hasattr(col, '_prepare_exc'):
py.builtin._reraise(*col._prepare_exc)
for col in needed_collectors[len(self.stack):]:
self.stack.append(col)
try:
> col.setup()
_pytest/runner.py:303:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IntClassCollector 'TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup(self):
cls = self.obj
if not hasattr(cls, 'spaceconfig'):
cls.space = LazyObjSpaceGetter()
else:
assert hasattr(cls, 'space') # set by pytest_runtest_setup
> super(PyPyClassCollector, self).setup()
pypy/conftest.py:454:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IntClassCollector 'TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup(self):
setup_class = getattr(self.obj, 'setup_class', None)
if setup_class is not None:
setup_class = getattr(setup_class, 'im_func', setup_class)
> setup_class(self.obj)
_pytest/python.py:284:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
------------------------------- Captured stderr --------------------------------
[rtyper] specializing: 100 / 1073 blocks (9%)
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.test.snippet.State instance at 0x10495fd40> has no attribute 'progress'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.test.snippet.State instance at 0x10495fd40> has no attribute 'age'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.test.snippet.State instance at 0x10495fd40> has no attribute 'time'
[rtyper:WARNING] prebuilt instance <pypy.translator.c.test.test_newgc.B object at 0x105349850> has no attribute 'a'
[rtyper:WARNING] prebuilt instance <pypy.translator.c.test.test_newgc.B object at 0x104912290> has no attribute 'c'
[rtyper] specializing: 200 / 1239 blocks (16%)
[rtyper] specializing: 300 / 1383 blocks (21%)
[rtyper] specializing: 500 / 1780 blocks (28%)
[rtyper] specializing: 600 / 1809 blocks (33%)
[rtyper] specializing: 800 / 1984 blocks (40%)
[rtyper] specializing: 900 / 1986 blocks (45%)
[rtyper] specializing: 1000 / 1986 blocks (50%)
[rtyper] specializing: 1100 / 1986 blocks (55%)
[rtyper] specializing: 1200 / 1986 blocks (60%)
[rtyper] specializing: 1300 / 1986 blocks (65%)
[rtyper] specializing: 1400 / 1986 blocks (70%)
[rtyper] specializing: 1500 / 1986 blocks (75%)
[rtyper] specializing: 1600 / 1986 blocks (80%)
[rtyper] specializing: 1700 / 1986 blocks (85%)
[rtyper] specializing: 1800 / 1986 blocks (90%)
[rtyper] specializing: 1900 / 1986 blocks (95%)
[rtyper] -=- specialized 1986 blocks -=-
[rtyper] specializing: 2000 / 2187 blocks (91%)
[rtyper] specializing: 2100 / 2187 blocks (96%)
[rtyper] -=- specialized 201 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[rtyper] -=- specialized 10 more blocks -=-
[rtyper] specializing: 2200 / 2226 blocks (98%)
[rtyper] -=- specialized 29 more blocks -=-
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x105229098> has no attribute 'addr'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_ll_typeid_map'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'top_of_space'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'red_zone'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctypelayout.GCData object at 0x105699d10> has no attribute '_gc_collect_stack_root'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_debug_pending'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'space_size'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'max_space_size'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'objects_with_weakrefs'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_list_rpy'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'total_collection_count'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg4'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg5'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_debug_seen'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'finalizer_lock_count'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg3'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'tmpstack'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'fromspace'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'free'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'tospace'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'objects_with_finalizers'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_count_rpy'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg0'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg1'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'id_free_list'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'next_free_id'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_callback2_arg2'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'objects_with_id'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute '_tracked_dict'
[rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gc.semispace.SemiSpaceGC object at 0x105c03a50> has no attribute 'run_finalizers'
[rtyper] specializing: 2300 / 3197 blocks (71%)
[rtyper] specializing: 2500 / 3208 blocks (77%)
[rtyper] specializing: 2700 / 3270 blocks (82%)
[rtyper] specializing: 2900 / 3281 blocks (88%)
[rtyper] specializing: 3100 / 3281 blocks (94%)
[rtyper] specializing: 3200 / 3281 blocks (97%)
[rtyper] -=- specialized 1063 more blocks -=-
[rtyper] specializing: 3300 / 3403 blocks (96%)
[rtyper] -=- specialized 116 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 502 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 12 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[rtyper] -=- specialized 15 more blocks -=-
[c] 1000 nodes [ array: 165 framework rtti: 18 func: 539 group: 1 struct: 607 ]
[c] 2000 nodes [ array: 410 framework rtti: 32 func: 643 group: 1 struct: 1509 ]
[c] 3000 nodes [ array: 638 framework rtti: 32 func: 660 group: 1 struct: 4581 ]
[c] 4000 nodes [ array: 638 framework rtti: 32 func: 660 group: 1 struct: 4581 ]
[c] 5000 nodes [ array: 638 framework rtti: 32 func: 660 group: 1 struct: 4581 ]
[rtyper] specializing: 3500 / 3561 blocks (98%)
[rtyper] -=- specialized 141 more blocks -=-
[rtyper] -=- specialized 0 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining] inlined 4 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 0 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[c:database] GC transformer: finished helpers
[c:database] GC transformer: finished tables
[c] 6000 nodes [ array: 663 framework rtti: 33 func: 693 group: 1 struct: 4802 ]
[gctransform:info] assigned 259 typeids
[gctransform:info] added 992 push/pop stack root instructions
[gctransform:info] found 2162 static roots
[c] 7000 nodes [ array: 2910 framework rtti: 59 func: 693 group: 1 struct: 4848 ]
[c] 8000 nodes [ array: 2910 framework rtti: 59 func: 693 group: 1 struct: 4848 ]
[c] 8511 nodes [ array: 2910 framework rtti: 59 func: 693 group: 1 struct: 4848 ]
[c:database] Completed
[c:writing] structdef.h
[c:writing] forwarddecl.h
[c:writing] structimpl.c
[c:writing] nonfuncnodes.c
[c:writing] implement.c
[c:writing] implement_1.c
[platform:execute] make in /var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2
[platform:Error] implement_1.c: In function ‘pypy_g_sort_gcmap’:
[platform:Error] implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
[platform:Error] ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
[platform:Error] ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
[platform:Error] Undefined symbols:
[platform:Error] "_main", referenced from:
[platform:Error] start in crt1.10.5.o
[platform:Error] ld: symbol(s) not found
[platform:Error] collect2: ld returned 1 exit status
[platform:Error] make: *** [testing_2] Error 1
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_from_objwithfinalizer_to_youngobj
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'item': <IntTestFunction 'test_from_objwithfinalizer_to_youngobj'>}>
item = <IntTestFunction 'test_from_objwithfinalizer_to_youngobj'>
def pytest_runtest_setup(__multicall__, item):
if isinstance(item, py.test.collect.Function):
appclass = item.getparent(PyPyClassCollector)
if appclass is not None:
spaceconfig = getattr(appclass.obj, 'spaceconfig', None)
if spaceconfig:
appclass.obj.space = gettestobjspace(**spaceconfig)
> __multicall__.execute()
pypy/conftest.py:323:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MultiCall 0 results, 0 meths, kwargs={'item': <IntTestFunction 'test_from_objwithfinalizer_to_youngobj'>}>
def execute(self):
while self.methods:
method = self.methods.pop()
kwargs = self.getkwargs(method)
> res = method(**kwargs)
_pytest/core.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <IntTestFunction 'test_from_objwithfinalizer_to_youngobj'>
def pytest_runtest_setup(item):
> item.config._setupstate.prepare(item)
_pytest/runner.py:49:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.runner.SetupState object at 0x1016ffad0>
colitem = <IntTestFunction 'test_from_objwithfinalizer_to_youngobj'>
def prepare(self, colitem):
""" setup objects along the collector chain to the test-method
and teardown previously setup objects."""
needed_collectors = colitem.listchain()
while self.stack:
if self.stack == needed_collectors[:len(self.stack)]:
break
self._pop_and_teardown()
# check if the last collection node has raised an error
for col in self.stack:
if hasattr(col, '_prepare_exc'):
> py.builtin._reraise(*col._prepare_exc)
_pytest/runner.py:299:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.runner.SetupState object at 0x1016ffad0>
colitem = <IntTestFunction 'test_finalizer_order'>
def prepare(self, colitem):
""" setup objects along the collector chain to the test-method
and teardown previously setup objects."""
needed_collectors = colitem.listchain()
while self.stack:
if self.stack == needed_collectors[:len(self.stack)]:
break
self._pop_and_teardown()
# check if the last collection node has raised an error
for col in self.stack:
if hasattr(col, '_prepare_exc'):
py.builtin._reraise(*col._prepare_exc)
for col in needed_collectors[len(self.stack):]:
self.stack.append(col)
try:
> col.setup()
_pytest/runner.py:303:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IntClassCollector 'TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup(self):
cls = self.obj
if not hasattr(cls, 'spaceconfig'):
cls.space = LazyObjSpaceGetter()
else:
assert hasattr(cls, 'space') # set by pytest_runtest_setup
> super(PyPyClassCollector, self).setup()
pypy/conftest.py:454:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IntClassCollector 'TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup(self):
setup_class = getattr(self.obj, 'setup_class', None)
if setup_class is not None:
setup_class = getattr(setup_class, 'im_func', setup_class)
> setup_class(self.obj)
_pytest/python.py:284:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_large_function ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_callback_simple __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_secondary_entrypoint_callback
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_empty_collect ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_simple __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_safe_pushpop
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_protect_getfield
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_varsized _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_using_lists
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_static_roots
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_nongc_static_root
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_void_array
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_malloc_failure
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_array_of_void
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_opaque __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_finalizer
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
____ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_del_catches ____
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
____ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_del_raises _____
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
______ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_weakref ______
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_prebuilt_weakref __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_malloc_raw
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_del_seeing_new_types
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_framework_late_filling_pointers
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_zero_raw_malloc __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_object_alignment __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_____ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_void_list _____
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_open_read_write_seek_close
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_callback_with_collect
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_____ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_can_move ______
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_malloc_nonmovable _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_resizable_buffer __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_hash_preservation _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_hash_overflow ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_hash_varsized ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_arraycopy_writebarrier_int
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_arraycopy_writebarrier_ptr
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_get_rpy_roots ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_get_rpy_referents _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_is_rpy_instance __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_try_cast_gcref_to_instance
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_get_rpy_memory_usage
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_get_rpy_type_index _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_dump_rpy_heap ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_write_typeids_z __
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_____ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_many_ids ______
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_gc_set_max_heap_size
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
___ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_gc_heap_stats ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
__ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_string_builder ___
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_string_builder_over_allocation
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
_ ERROR at setup of TestAsmGCRootWithSemiSpaceGC_Shared.test_nursery_hash_base _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = conftest.option.keyword
if keyword.startswith('test_'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.func_name = 'f_'+name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
pypy/translator/c/test/test_newgc.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'pypy.translator.c.gcc.test.test_asmgcroot.TestAsmGCRootWithSemiSpaceGC_Shared'>
func = <function allfuncs at 0x1041b92a8>
@classmethod
def _makefunc_str_int(cls, func):
def main(argv):
arg0 = argv[1]
arg1 = int(argv[2])
try:
res = func(arg0, arg1)
except MemoryError:
print 'Result: MemoryError'
else:
print 'Result: "%s"' % (res,)
return 0
config = cls.make_config()
t = TranslationContext(config=config)
a = t.buildannotator()
sec_ep = getattr(cls, 'secondary_entrypoints', [])
for f, inputtypes in sec_ep:
a.build_types(f, inputtypes, False)
a.build_types(main, [s_list_of_strings])
t.buildrtyper().specialize()
t.checkgraphs()
cbuilder = CStandaloneBuilder(t, main, config=config,
secondary_entrypoints=sec_ep)
c_source_filename = cbuilder.generate_source(
defines = cbuilder.DEBUG_DEFINES)
cls._patch_makefile(cbuilder.targetdir)
if conftest.option.view:
t.view()
> exe_name = cbuilder.compile()
pypy/translator/c/gcc/test/test_asmgcroot.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.translator.c.genc.CStandaloneBuilder object at 0x1059c52d0>
exe_name = None
def compile(self, exe_name=None):
assert self.c_source_filename
assert not self._compiled
shared = self.config.translation.shared
if (self.config.translation.gcrootfinder == "asmgcc" or
self.config.translation.force_make):
extra_opts = []
if self.config.translation.make_jobs != 1:
extra_opts += ['-j', str(self.config.translation.make_jobs)]
self.translator.platform.execute_makefile(self.targetdir,
> extra_opts)
pypy/translator/c/genc.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>
path_to_makefile = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2')
extra_opts = []
def execute_makefile(self, path_to_makefile, extra_opts=[]):
if isinstance(path_to_makefile, GnuMakefile):
path = path_to_makefile.makefile_dir
else:
path = path_to_makefile
log.execute('make %s in %s' % (" ".join(extra_opts), path))
returncode, stdout, stderr = _run_subprocess(
self.make_cmd, ['-C', str(path)] + extra_opts)
> self._handle_error(returncode, stdout, stderr, path.join('make'))
pypy/translator/platform/posix.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Darwin_x86_64 cc=gcc-4.0>, returncode = 2
stdout = 'gcc-4.0 -arch x86_64 -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 -frandom-seed=testing_2.c -o testing_2.s -S ....o -c main.c -I/Users/bob/src/pypy/pypy/translator/c -I/usr/include/ffi\ngcc-4.0 main.o -L. -ltesting_2 -o testing_2\n'
stderr = 'implement_1.c: In function \xe2\x80\x98pypy_g_sort_gcmap\xe2\x80\x99:\nimplement_1.c:1313: warning: passing argument ... start in crt1.10.5.o\nld: symbol(s) not found\ncollect2: ld returned 1 exit status\nmake: *** [testing_2] Error 1\n'
outname = local('/var/folders/yL/yLlGhqk4ExqmSbqgOFb1KE+++TI/-Tmp-/usession-default-55/testing_2/make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
errorfile = outname.new(ext='errors')
errorfile.write(stderr, 'wb')
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E implement_1.c: In function ‘pypy_g_sort_gcmap’:
E implement_1.c:1313: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
E ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
E ld: warning: in ./libtesting_2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
E Undefined symbols:
E "_main", referenced from:
E start in crt1.10.5.o
E ld: symbol(s) not found
E collect2: ld returned 1 exit status
E make: *** [testing_2] Error 1
E """)
pypy/translator/platform/__init__.py:128: CompilationError
============== 148 passed, 53 skipped, 52 error in 241.80 seconds ==============
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment