Open Object Rexx in NetBSD:
ooRexx Compilation


Created - Apr 31, 2007  |  Modified - Sep 20, 2007

P2O2 WWW Homepage -> Open Object Rexx in NetBSD -> ooRexx Compilation


ooRexx Sources and Hyperlinks

Open Object Rexx must be compiled from sources provided by Open Object Rexx (ooRexx) website [1]. It is not part of the Packages Collection (pkgsrc) [2, 3]. Rexx scripts can be run with Regina Rexx [4] or REXX/icm [5] wich are included both in pkgsrc [2] and on FTP sites with binary files [3]. They can also be processed by ooRexx. But genuine ooRexx scripts are for ooRexx only.

[1] Open Object Rexx Downloads
[2] pkgsrc: The NetBSD Packages Collection
[3] Application Software for NetBSD
[4] REXX/imc
[5] Regina Rexx

 

INSTALL File Remarks

ooRexx compilation is straightforward. Let's quote ooRexx documentation:

Installation Notes for Open Object Rexx
=======================================

Please read ALL of these notes before building ooRexx!

To install ooRexx, you first need to configure it. This is done by executing the configure script provided in this archive.

Generally all you need to run is "configure", but there are some options that can be passed to the configure script; use "configure --help" to view them. If the configure script does not exist then run "bootstrap" script to create it.

Once the configure script has been run, you can then type "make". This will create the following objects:

 rexx            the ooRexx interpreter
 rexxc           the ooRexx "compiler"; it is really a tokenizer
 rxqueue         interface from command line to Rexx queue
 rxsubcom        enables subcommand environments to be manipulated
 rxdelipc        utility to remove IPC objects
 librexx.so      shared library containing majority of interpreter
 librexxapi.so   shared library containing API functionality
 librxmath.so    maths extension library
 librexxutil.so  RexxUtil extension library; system functions
 librxregexp.so  Regular Expression extension library
 librxsock.so    Low-level socket extension library
    

Once you have ooRexx compiled, it can then be installed. By default, the ooRexx executables will be installed into /opt/ooRexx/bin and the libraries and external function packages (*.so) will be installed into /opt/ooRexx/lib/ooRexx. The base path "/opt" can be changed by adding the --prefix=path (where path is the base path) to the configure command. eg. to install ooRexx into your home directory: $HOME/bin and $HOME/lib/ooRexx, configure --prefix=$HOME ... This is paticularly useful if you do not have root access on the machine on which you are building ooRexx.

On most platforms, it is necessary to include the directory where shared libraries (including *.so) reside, to the LD_LIBRARY_PATH environment variable. Under AIX this environment variable is LIBPATH. Under HP-UX this environment variable is SHLIB_PATH. Under SGI seems to be LD_LIBRARYN32_PATH. (...)

Platform Specifc Notes

*BSD Platforms:


ooRexx builds on FreeBSD 5.4 and 6.1, NetBSD 2.0.2 and OpenBSD 3.4. May be a bug due to ooRexx using members of internal C structs which are not portable across platforms.

 

P2O2 Remarks

Placing sources and making binaries

First of all I must say I installed ooRexx against NetBSD rules. Please follow the way as ooRexx package is not a NetBSD package. So create /usr/pkg/opt directory. Most Linux distributions use /opt directory but we want to keep all not system applications under "official" /usr/pkg directory. Next copy ooRexx-3.1.2.tar.gz to /usr/pkg/opt and untar it. You'll have ooRexx sources in /usr/pkg/opt/ooRexx-3.1.2/ directory.

ooRexx compillation ooRexx should be done with following parameter

    # configure --prefix=/usr/pkg/opt/ooRexx
    

Everything should go smoothly. Pay attention to the fact that both directories have different names. All binaries and libraries will be placed in this /usr/pkg/opt/ooRexx directory after running make install.

Time no to make binaries and libraries. Issue then commands:

    # make
    # make install
    

All rexx versions and variants including ooRexx, are provided with /samples directory with scores of example scripts.

Making symlinks

Now we have to make the system know where the ooRexx was installed. All ooRexx programs will be put into /usr/pkg/opt/ooRexx/bin directory. Libraries will go to /usr/pkg/opt/ooRexx/lib/ooRexx. Next you have to define LD_LIBRARY_PATH and add /bin to system PATH. Both entries should be done in /root/.profile and ~/.profile files. Of course you can do this globaly in system-wide /etc/profile as well. Remember, if "something" worked wrong all the libraries from /usr/pkg/opt/ooRexx/lib/ooRexx would be symlinked to /usr/pkg/lib directly but do that as a last resort.

    An example of ~/home/.profile

    PATH=$HOME/bin:/usr/pkg/opt/ooRexx/bin:/bin:/sbin:/usr/bin:(.....)
    PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
    export PATH

    export LD_LIBRARY_PATH=/usr/pkg/opt/ooRexx/lib/ooRexx
    

Last but not least, make appropriate symlinks for files in .../ooRex/include/ and ../ooRexx/man/ directories. Respectively from /usr/pkg/include/, and from /usr/pkg/man/man1/.

    # ln -s /usr/pkg/opt/ooRexx/include/rexx.h  /usr/pkg/include/
    # ln -s /usr/pkg/opt/ooRexx/man/man1/rexx.1  /usr/pkg/man/man1/
    # ...
    

Checking installation

Let's place example scripts from /usr/pkg/opt/ooRexx/share/ooRexx in home subdirectory, e.g. ~/home/data/rexx/examples/oorexx/. They have executable flag set on so they can be invoked in terminal window by typing their name and pressing Enter. Most "pure" rexx scripts wrote by users have to be run with "rexx script.rex" command. BTW, rexx scripts are created/distributed with different file extenstions - rx, rex, rexx, orx, orx, orex, oorx, oorex, oorexx, and cmd (for OS/2 system). However if you place at the first line of such a script the famous unix magic string "#!/usr/pkg/bin/rexx" you'll be able to run the script clicking/typing its name only.

 

P2O2 Screenshots

[MC window with ooRexx directories]

Picture 1: MC window with ooRexx directories (red color signals root rights, find # in command line).

[MC window with ooRexx examples]

Picture 2: MC window with ooRexx examples. rexxcps.rexx will be run. It tests system power/speed in processing rexx scripts.

[rexxcps.rex test results]

Picture 3: rexxcps.rex test results.

 

Download Files

1.) ooRexx.tar.gz - compiled binaries

 

[Logo P2O2]

 

[Logo NetBSD]

 

[Logo Open Object Rexx]

 

[Powered by Rexx Logo]

 


Przemysław Pawełczyk - Cracow, Poland    [Static website generated with Rexx scripts in NetBSD]