August 28, 2012
Porting to Posix on the HP 3000
One of the leading lights in HP 3000 development has been researching how to port software to Posix under MPE/iX. David Dummer, who created DataExpress and played a major role in making Transact a genuine language, was looking for help to resolve an error while compiling.
Why would a 3000 homesteader want to port software to Posix? One reason is to ready an application for the journey to one of the *nixes, like HP-UX or Linux. Here's Dummer's dilemma.
I have been trying for some days to port a Unix application to an HP 3000. One of the source files contains calls to the Posix functions of 'tcgetattr' and 'tcsetattr' for terminal handling control. I compile this source under the Posix shell, as the MPE C compiler doesn't appear to be able to find the included 'termios.h' header file. The application program is then created by the MPE linkage editor.
At execution time the loader denotes the two Posix functions as unresolved externals. From my reading of articles on Porting to Posix I would have expected these two functions to be in the relocateable library file '/lib/libc.a'
I then decided to write a makefile and to perform all of the compile and build functions under the Posix shell. This appears to cure the missing function problem, but the resulting application aborts before reaching the first statement in the mainline program.
Mark Bixby, who wrote that seminal resource on porting to MPE applications to open source, weighed in with some advice for developers.Bixby was cautioning homesteaders as far back as 2002 that they'd need to get comfortable with porting, because crucial 3000 software was certain to be in need of upgrades over the life of a homestead installation. Bixby's now working at K-12 app provider QSS, which is still supporting HP 3000 apps.
Lars Appel, another prodigious porter who moved Samba across to MPE/iX, pointed at repositories of these wrappers which are still online, hosted in the independent community now that HP's closed down that HP 3000 Jazz server.
My extensive MPE Posix porting knowledge has largely been recycled in the eight or so years since I last did substantive MPE work. But if I recall correctly, the libbsd distribution -- or perhaps was it the Posix porting wrappers -- which used to be available from jazz.external.hp.com contained tcgetattr and tcsetattr implementations.
As far as I recall, Steve H's porting wrappers also included those two. The Client Systems main Jazz page leads to http://clientsystems.com/portwrappers650.html
And you can typically only compile and use those few routines that you need -- you don't have to build and link the whole wrappers package.
More advice came about the Posix shell commands cc or cc89, a script with lots of extras added. Reports said it was pretty tricky to replicate that at the MPE command prompt. So the first rule of success would be to compile Posix programs only under the Posix shell.
MPE: run .\testposx;unsat=debug will get a developer to debug, for anything that was called but not available. Otherwise, use MPE: run .\testposx;debug
No more trying to figure out what runs on
MPE/iX or where to find it. No more worrying
about availability! www.MPE-OpenSource.org
is all things MPE/iX: Open Source packages,
freeware, scripting, plus loads of tools
and information to keep your 3000 system
alive and thriving!
The comments to this entry are closed.