[tools0]    Setting up developement
                  tools


Download and install BlackBox component builder v1.6 from OberonMicrosystems at http://www.oberon.ch/.


OberonMicrosystems have kindly made some tools for developing ELF format shared object files available under the Lazy Cat Open Source licence. These tools are on the OpenBUGS web site in the ascii coded file DevElfLinker-Distro.txt. I have modified the tools slighly to make them compatible with v1.6 of BlackBox component builder. The modified version of the tools are in the ascii coded file MyPatch.txt. My modifications to the source code of DevElfLinker-Distro are in
bold blue typeface. MyPatch contains compiled versions of the modified source code.


If you want to develope the version of OpenBUGS that runs on Linux dowload the text file MyPatch from the OpenBUGS web site and save it to a file. Next start BlackBox and open the txt file MyPatch using the file menu. Then from the Tool menu pick Decode to install the Linux tools.
Finnaly close BlackBox. Note that BlackBox and the Linux tools run on Windows. If you only have Linux you will need to install WINE to work with these tools. The Linux tools consist of a linker for producing ELF format shared object files, DevElfLinker and some library modules. The module LinDl is an interface module to the Linux dynamic loader and LinLibc is an interface to libc. Module LinKernel is a Linux version of the Kernel module. The module in Lin/Mod/HostFiles is the Linux equivalent to the module HostFiles under Windows. Module LinKernel uses LinDl and LinLibc while the Linux HostFile module only uses LinLibc. If you want to edit and recompile any of these modules some care is required. When LinKernel is compiled the compiled (ocf) file is placed in the Code subdirectory of BlackBox, you must move it to the Lin/Code directory. When
you compile the Linux version of HostFiles the compiled ocf file is placed in subdirectory Host/Code and will overwrite the Windows version of this file. Therefore you must make a backup of the Windows ocf file before compiling. Once you have the Linux ocf corresponding to HostFiles file move it from Host/Code to Lin/Code and rename it HostFiles.


Next install OpenBUGS in some directory and open this directory in file manager. Select the entire contents of this directory and copy them into the BlackBox directory. You will be ask if you want to overwrite files, say yes. The BlackBox directory will now contain subdirectories like Graph...). You now have the OpenBUGS source code copied to a location where the BlackBox tools can compile the source code.


Next double click on the winbugs icon in the BlackBox directory to start BlackBox/OpenBUGS.
(it is important to click on the winbugs icon and not the BlackBox icon) From the Developer directory open the file called Make and click in the blob to compile the OpenBUGS source code.
You will be asked if you want to create a number of directories, say yes when prompted. If you want to make the Linux version also compile the module LinConsole at the bottom of this make file. Next open the file called Linking and click into the blobs to link the executable version of OpenBUGS. For Windows there are two linking options, one to create the Windows executable winbugs.exe and the opther to create the brugs.dll library. For Linux only a ELF shared object file brugs.so can be linked.


The OpenBUGS can make use of the taucs sparse matrix library. A Windows version of this library, libtaucs.dll, is distributed with OpenBUGS. This library is used in a sampling algorithm for Gaussian Markov Random Field (GMRF). Without taucs the sampling algorithm for GMRF will be much slower for high dimension problems. If you do not want WinBUGS to use the taucs library just remove libtaucs.dll from the OpenBUGS directory.


If you wish to use taucs to do sparse matrix algebra in the brugs.dll library add the name MathTaucsImp to the list of modules linked just before BugsC. We do not have Linux or C so we can not produce a Linux version of the taucs library. However the library is Open Source and can be downloaded from the web as source code. If you obtain a version of the taucs library in ELF format for Linux and want to use it with brugs.so add the name MathTaucsImp to the list of modules linked to form brugs so.


To distribute OpenBUGS go to directory Dev/Rsrc and open the file BugsRuntine. Type the name of the directory were you want to put OpenBUGS into the dialog box and click the button. All the compiled code, libraries, resource files and documentation needed for a fuctioning version of OpenBUGS will be copied (but not the BlackBox developement tools).


The BlackBox directory will also contain a functioning version of the OpenBUGS software and is a useful place to develope and test new software. If you do not want to do this just un-install BlackBox by clicking on the un-install icon.