HP3000-L Archives

May 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Mon, 14 May 2001 09:53:47 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
Tom Emerson wrote:
>
> I'm considering porting something to the HP3000 that makes use of Python.
> While I see there is a "Python/iX" on Jazz, there are two problems with it:
>
>    1) it is version 1.5.1 and the documentation for the program I'm working
> on is quite adamant about needing version 1.5.2 [in particular, "with
> threads"]
>
>    2) the version on Jazz is binary only -- there doesn't seem to be any
> notes on what the author did to get that version working on the 3000.
>
> What I've tried so far:
>
>    1) I've found and uploaded a copy of the 1.5.2 source, did the

Why not try the latest & greatest Python 2.1 instead?

> standard "./configure" with the option "--with-threads" and this seemed to
> work OK, but...

Do yourself a favor and try to build it without threads first.  Threads on MPE
is still an evolving frontier.  Get the basic functionality working first
before you attempt the threaded version.

>    2) one of the routines wouldn't compile because the size of the "stat"
> structure was unknown -- tracing things around a little, it seems to be
> because the "stat.h" in /usr/include has a test for "_POSIX_SOURCE" as a
> defined macro -- while I thought that was a default when compiling from the
> shell, I nevertheless added "-D_POSIX_SOURCE" to the Makefile and it seemed
> to get past that point [but everything that includes /sys/types.h complains
> about 4 "empty" declarations]
>    3) On point one the operative word is "seemed" to work OK -- for some
> reason one of the subordinate "Makefile"'s doesn't get built properly [it's
> empty] so compilation just simply stops... :(

You want to re-run configure like this:

AUTOCONF=1 CPPFLAGS="-D_POSIX_SOURCE -D_SOCKET_SOURCE" ./configure --blah blah
blah

For just about everything you will ever port, those CPPFLAGS are usually
required.  The AUTOCONF=1 helps make sure unresolved externals get detected
properly on MPE (this is only supported by MPE gcc ld v0.17).

By setting CPPFLAGS at configure time, that should automatically propagate
through all subordinate makefiles.

> I suspect that ultimately the "with-threads" will trip me up, however I
> noted from the doc/README.txt file that references to "threads" *could*
> mean DCE threads, which would correspond to draft 4 [appearently there is
> a "draft 10" version that was out for the HP, but had problems and has been
> revoked...???]

MPE has DCE / draft 4 threads today, but I've never used them.  Draft 10 is
still a work in progress.  Simplify your port and ignore the threads for now.

> so I'm hoping that it won't take much to get version 1.5.2
> to properly compile -- does anyone know offhand if the person who ported
> v1.5.1 would consider looking into 1.5.2?  [or could they provide notes on
> what they did to make 1.5.1 work?]

Think big -- go for Python 2.1 instead, and after you complete your port, make
sure you submit your changes back to the official Python developers.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2