os8-cp can't find python lib

38 views
Skip to first unread message

Mike Markowski

unread,
May 1, 2026, 11:43:14 AM (3 days ago) May 1
to pid...@googlegroups.com
I put the new pidp8i image [v20260415 (April 15, 2026)] on an SD card and all is mostly well.  But when I try to copy files from linux to OS8 I run into an issue:

pidp8i@pidp8i:~/itm-v1$ os8-cp -a codiff.f4 DSK:CODIFF.F4
Traceback (most recent call last):
  File "/opt/pidp8i/bin/os8-cp", line 49, in <module>
    from os8util import *

I find the lib:

pidp8i@pidp8i:~/itm-v1$ find ~ -name '*os8util*'
/home/pidp8i/pidp8i/lib/os8util.py.in


but am unsure what is the significance of the '.in'.  Have a missed steps in the initial install?

Thanks,
Mike Markowski 

William Cattey

unread,
May 2, 2026, 7:11:27 PM (2 days ago) May 2
to PiDP-8
Hi Mike,

Sorry this isn't working for you.  Thank you VERY much for this bug report. It pointed out a couple things I need to fix.

Root cause: After we perform the build we wipe out all the stuff in the build hierarchy in ~pidp8i/pidp8i, but the testing I did failed to reveal where the install hierarcy is not fully working.

The immediate problem is that the needed library os8util.py never got installed. I've tested and checked in a fix for that to trunk.  The following might get you going:

cd ~/pidp8i
./configure
sudo install -m 644 -g pidp8i -D lib/os8util.py /opt/pidp8i/lib/os8util.py

However there may be an additional dependency on the boot images that I've missed with that work-around.

Do you get

pidp8i@pidp8i:~/pidp8i$ os8-cp -a hello.tx DSK:HELLO.TX
Abort: Requested boot image file: /home/pidp8i/pidp8i/bin/v3d-patched.rk05 not found.

When you use that work-around?

If so, the way to get going is to build the system:

pidp8i stop
cd ~/pidp8i
./configure
tools/mmake
sudo make install
pidp8i start

Note that the latest release changed the behavior of os8-cp in a way that I only partially documented.  (I've checkd in an update to doc/os8-cp.md.)  Here's what you need to know:

Experience has taught us that it's impossible to ensure there is only be one
instance of `os8-cp` manipulating a particular bootable image at a time.

So running os8-cp boots into a scratch copy of the OS8_TOOLTIME image.
Any copy into SYS: or DSK: is lost. You must explicitly mount your destination
filesystem on a different device, if you want the copies to persist.

So for your action in os8-cp to persist you're going to have to mount a filesystem on rk1, and copy into it.

Again, thank you for the bug report.

-Bill

Mike Markowski

unread,
May 3, 2026, 9:04:36 AM (yesterday) May 3
to William Cattey, PiDP-8
Thanks, Bill, for quick help!  Your first idea did not work and resulted in python stack trace rather than the error you expected (I'll tack it on below in case it's helpful).  After your 2nd idea of rebuilding, all worked flawlessly and it's good to know about needing an fs on rk1.

I'll add that after the error yesterday I used TECO to copy/paste fortran-iv code from a linux window into os/8 teco.  It was a fun exercise quickly coming up against buffer and memory limits, feeling the constraints of the pdp8 and relearning teco commands to deal with it.

Thanks again for the help,
Mike

Stack trace after trying your 1st idea:
pidp8i@pidp8i:~/pidp8i$ touch junk.tx
pidp8i@pidp8i:~/pidp8i$ os8-cp -a junk.tx DSK:JUNK.TX

Traceback (most recent call last):
  File "/opt/pidp8i/bin/os8-cp", line 839, in <module>
    main()
    ~~~~^^
  File "/opt/pidp8i/bin/os8-cp", line 652, in main
    s = Simh(dirs.build, True)
  File "/home/pidp8i/pidp8i/lib/simh.py", line 288, in __init__
    self._child = pexpect.spawn(os.path.join(basedir, "bin", sim), encoding="utf-8")
                  ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 205, in __init__
    self._spawn(command, args, preexec_fn, dimensions)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 276, in _spawn
    raise ExceptionPexpect('The command was not found or was not ' +
            'executable: %s.' % self.command)
pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: /home/pidp8i/pidp8i/bin/pdp8.
pidp8i@pidp8i:~/pidp8i$ 


--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-8/77010064-84ca-4a13-86b6-6004494c11bfn%40googlegroups.com.

William Cattey

unread,
May 3, 2026, 12:12:36 PM (21 hours ago) May 3
to PiDP-8
The work-around didn't work?  DARN!  How very odd.

The fix I checked into trunk seems to work even after doing make clean.  So I guess we've moved it forward.

I'm guessing that the once-only startup install code fixes up build-tree dependencies, and that one has to do another step than just hand-installing components.

-Bill
Reply all
Reply to author
Forward
0 new messages