On Wed, Oct 12, 2011 at 1:39 AM, Shawn Walker <[email protected]> wrote: > On 11 October 2011 15:56, Maciej Fijalkowski <[email protected]> wrote: >> On Wed, Oct 12, 2011 at 12:47 AM, Shawn Walker <[email protected]> >> wrote: >>> Greetings, >>> >>> I've been working on getting pypy to build on Solaris 11 Express using gcc >>> 4.5. >> >> Hi. In general Solaris is not a supported platform, so expect problems >> (we don't happen to have a buildbot or a maintainer), we can try to >> help however. > > Yes, that was apparent, but the help is appreciated. > > With some small tweaks most of pypy is compiling, so I think it > shouldn't take much. > > I've figured out a lot of other issues already. > >>> >>> I could use some help deciphering the following error I encountered >>> during translation using "python2.6 translate.py -Ojit": >>> >>> [translation:ERROR] Error: >>> [translation:ERROR] Traceback (most recent call last): >>> [translation:ERROR] File "translate.py", line 308, in main >>> [translation:ERROR] drv.proceed(goals) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 809, >>> in proceed >>> [translation:ERROR] return self._execute(goals, task_skip = >>> self._maybe_skip()) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/translator/tool/taskengine.py", >>> line 116, in _execute >>> [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 286, >>> in _do >>> [translation:ERROR] res = func() >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 323, >>> in task_annotate >>> [translation:ERROR] s = annotator.build_types(self.entry_point, >>> self.inputtypes) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 103, in build_types >>> [translation:ERROR] return self.build_graph_types(flowgraph, >>> inputcells, complete_now=complete_now) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 194, in build_graph_types >>> [translation:ERROR] self.complete() >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 250, in complete >>> [translation:ERROR] self.processblock(graph, block) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 448, in processblock >>> [translation:ERROR] self.flowin(graph, block) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 508, in flowin >>> [translation:ERROR] self.consider_op(block.operations[i]) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 710, in consider_op >>> [translation:ERROR] raise_nicer_exception(op, str(graph)) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line >>> 707, in consider_op >>> [translation:ERROR] resultcell = consider_meth(*argcells) >>> [translation:ERROR] File "<4151-codegen >>> /export/home/swalker/devel/pypy/pypy/annotation/annrpython.py:745>", >>> line 3, in consider_op_simple_call >>> [translation:ERROR] return arg.simple_call(*args) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/unaryop.py", line >>> 175, in simple_call >>> [translation:ERROR] return >>> obj.call(getbookkeeper().build_args("simple_call", args_s)) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/unaryop.py", line >>> 696, in call >>> [translation:ERROR] return bookkeeper.pbc_call(pbc, args) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/bookkeeper.py", line >>> 667, in pbc_call >>> [translation:ERROR] results.append(desc.pycall(schedule, args, >>> s_previous_result, op)) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/description.py", line >>> 798, in pycall >>> [translation:ERROR] return self.funcdesc.pycall(schedule, args, >>> s_previous_result, op) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/description.py", line >>> 283, in pycall >>> [translation:ERROR] result = self.specialize(inputcells, op) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/description.py", line >>> 279, in specialize >>> [translation:ERROR] return self.specializer(self, inputcells) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/specialize.py", line >>> 80, in default_specialize >>> [translation:ERROR] graph = funcdesc.cachedgraph(key, builder=builder) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/description.py", line >>> 237, in cachedgraph >>> [translation:ERROR] graph = self.buildgraph(alt_name, builder) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/annotation/description.py", line >>> 200, in buildgraph >>> [translation:ERROR] graph = translator.buildflowgraph(self.pyobj) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/translator/translator.py", line >>> 77, in buildflowgraph >>> [translation:ERROR] graph = space.build_flow(func) >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/objspace/flow/objspace.py", line >>> 279, in build_flow >>> [translation:ERROR] ec.build_flow() >>> [translation:ERROR] File >>> "/export/home/swalker/devel/pypy/pypy/objspace/flow/flowcontext.py", >>> line 273, in build_flow >>> [translation:ERROR] self.space.unwrap(e.get_w_value(self.space)))) >>> [translation:ERROR] Exception': found an operation that always raises >>> AttributeError: generated by a constant operation: getattr >>> [translation:ERROR] .. v119 = simple_call(v118, fd_0) >>> [translation:ERROR] .. '(pypy.rlib.rsocket:269)PacketAddress.as_object' >>> [translation:ERROR] Processing block: >>> [translation:ERROR] block@3 is a <class >>> 'pypy.objspace.flow.flowcontext.SpamBlock'> >>> [translation:ERROR] in (pypy.rlib.rsocket:269)PacketAddress.as_object >>> [translation:ERROR] containing the following operations: >>> [translation:ERROR] v120 = getattr(space_0, ('newtuple')) >>> [translation:ERROR] v121 = getattr(space_0, ('wrap')) >>> [translation:ERROR] v118 = getattr(self_0, ('get_ifname')) >>> [translation:ERROR] v119 = simple_call(v118, fd_0) >>> [translation:ERROR] v122 = simple_call(v121, v119) >>> [translation:ERROR] v123 = getattr(space_0, ('wrap')) >>> [translation:ERROR] v124 = getattr(self_0, ('get_protocol')) >>> [translation:ERROR] v125 = simple_call(v124) >>> [translation:ERROR] v126 = simple_call(v123, v125) >>> [translation:ERROR] v127 = getattr(space_0, ('wrap')) >>> [translation:ERROR] v128 = getattr(self_0, ('get_pkttype')) >>> [translation:ERROR] v129 = simple_call(v128) >>> [translation:ERROR] v130 = simple_call(v127, v129) >>> [translation:ERROR] v131 = getattr(space_0, ('wrap')) >>> [translation:ERROR] v132 = getattr(self_0, ('get_hatype')) >>> [translation:ERROR] v133 = simple_call(v132) >>> [translation:ERROR] v134 = simple_call(v131, v133) >>> [translation:ERROR] v135 = getattr(space_0, ('wrap')) >>> [translation:ERROR] v136 = getattr(self_0, ('get_addr')) >>> [translation:ERROR] v137 = simple_call(v136) >>> [translation:ERROR] v138 = simple_call(v135, v137) >>> [translation:ERROR] v139 = newlist(v122, v126, v130, v134, v138) >>> [translation:ERROR] v140 = simple_call(v120, v139) >>> [translation:ERROR] --end-- >>> >>> If I understand the above error correctly, it's either saying >>> get_ifname doesn't exist as an attribute (function) or that as_object >>> doesn't exist. >>> >>> I'm not familiar with pypy's translation errors, so I'm uncertain how >>> to interpret the above. >>> >>> Any assistance is appreciated, >>> -- >>> Shawn Walker >> >> Seems as_object does not exist. I suggest first running rsocket tests >> and seeing why it's not there by reading the source code (you don't >> have to translate for that). > > So I cd'd into 'pypy' from the source root, and ran: > > ./test_all.py rlib/test/test_rsocket.py > > Everything passes except one test which was skipped: > > rlib/test/test_rsocket.py:35: test_netlink_addr SKIPPED > > Looking at the source: > > 35 def test_netlink_addr(): > 36 if getattr(rsocket, 'AF_NETLINK', None) is None: > 37 py.test.skip('AF_NETLINK not supported.') > > That seems expected given my platform. > > Is there a way to do an incremental translate? Currently, every time > I run translate, it does the whole thing again, which makes the whole > fix/build cycle very slow. > > -Shawn >
No, there is no such thing :( I believe one of those operations inside get_ifname does not work, like ifreq is not there? (can you import it from _rsocket_rffi?). For now you can possibly disable the entire PacketAddress class declaration and it should compile _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
