![](https://secure.gravatar.com/avatar/57c7b4bf7981f7a178efa7af03944014.jpg?s=120&d=mm&r=g)
Hello all, I'm looking to port PyPy to OpenBSD (specifically amd64/x86_64, as I no longer have any i386 machines; that might be the cause of some of my woes). Getting much of PyPy to run on OpenBSD/amd64 is simple - partly basing things on the FreeBSD parts - and compilation on my laptop merrily steams ahead for half an hour or more. It then stumbles over time types which, in terms of RPython / PyPy, I must admit ignorance. Any help is much appreciated! My current problem centres around pypy/module/rctime/interp_time.py. The offending code is here: t = (((c_time(lltype.nullptr(rffi.TIME_TP.TO))) / YEAR) * YEAR) # we cannot have reference to stack variable, put it on the heap t_ref = lltype.malloc(rffi.TIME_TP.TO, 1, flavor='raw') t_ref[0] = t p = c_localtime(t_ref) That last line (#210) then causes this error message: E TypeError: <Array of INT > items: E expect <INT> E got <Signed> This is surprising because, naively, all the types in interp_time.py seem to match up with what I'd expected. On line 320 of that module there is something which gave me an idea. So if I change the first line of that excerpt to: t = rffi.r_time_t((((c_time(lltype.nullptr(rffi.TIME_TP.TO))) / YEAR) * YEAR)) I don't get the error. Is it the right patch? Dunno. But, if it is, I doubt it's OpenBSD specific (is it a 64 bit thing perhaps?). However, things then die a little later: [translation:ERROR] TyperError: don't know how to convert from <FloatRepr Float> to <IntegerRepr INT> [translation:ERROR] .. (pypy.module.rctime.interp_time:287)_get_inttime [translation:ERROR] .. block@121 with 1 exits [translation:ERROR] .. v1 = simple_call((type r_INT), v0) So I'm not sure if this is a one-off problem; or if the wrong types are being used in other places too; or if PyPy is getting confused by some of OpenBSD's types; or... who knows. Unfortunately the backtraces I get are in the guts of RPython, and only seem to tell me the point of the error, and not the full backtrace that led to it - I'm not sure what function called _get_inttime. If anyone has any suggestions, I'm all ears! Laurie -- http://tratt.net/laurie/ -- Personal http://fetegeo.org/ -- Free text geocoding http://convergepl.org/ -- The Converge programming language
![](https://secure.gravatar.com/avatar/5b37e6b4ac97453e4ba9dba37954cf79.jpg?s=120&d=mm&r=g)
Hi Laurie, On Tue, Aug 2, 2011 at 8:14 PM, Laurence Tratt <laurie@tratt.net> wrote:
I'm looking to port PyPy to OpenBSD (specifically amd64/x86_64, as I no longer have any i386 machines; that might be the cause of some of my woes).
I have fixed the problems you reported (see 109f80dac1c1). I cannot say if there will be more, though. These are caused by a different combination of 32- versus 64-bit integer types than on Linux64 and MacOSX64. Feel free to report again here or on our irc channel, #pypy at irc.freenode.net. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Laurence Tratt