On Wed, Mar 25, 2009 at 11:56:45AM +0000, Matthew Szudzik wrote:
> Incidentally, I'm running Mathematica on i386 using compat_linux.  There
> are a few non-trivial steps involved in the installation--contact me if
> you want the details.

I've received a few requests for the Mathematica installation procedure
on OpenBSD, so I thought that I'd take a moment to post it on this
mailing list.  I have tested this procedure with Mathematica 6 on
OpenBSD 4.4.  I plan to experiment with Mathematica 7 on OpenBSD 4.5 in
May, and will post my results.

This procedure assumes that you are running OpenBSD 4.2 or later on the
i386 architecture, and that you have a licensed copy of Mathematica 6
For Linux.  I also assume that you have enabled compat_linux and have
installed the fedora_base package, as described at
 http://www.openbsd.org/faq/faq9.html#Interact

To install Mathematica, do the following:

 (1) Apply the patch at
  http://marc.info/?l=openbsd-misc&m=119479722118605
 to the OpenBSD kernel.  Instructions for downloading the kernel source
 code and building the patched kernel are available at
  http://www.openbsd.org/faq/faq5.html#BldGetSrc
  http://www.openbsd.org/faq/faq5.html#BldKernel

 (2) Create the directory
  /tmp/mathematica
 and copy the Mathematica 6 For Linux installation files into that
 directory.

 (3) The MathInstaller file should now be located at 
  /tmp/mathematica/Unix/Installer/MathInstaller
 Type the following command to edit that file
  ed -s /tmp/mathematica/Unix/Installer/MathInstaller << EOF
  1c
  #!/usr/local/emul/fedora/bin/sh
  .
  /DefaultManPageDir=/c
  DefaultManPageDir="/usr/local/man/man1"
  .
  g/Linux)/s/Linux)/OpenBSD)/
  g/chgrp -fhR/s/chgrp -fhR/chgrp -fR/
  g/chown -fhR/s/chown -fhR/chown -fR/
  wq
  EOF

 (4) Make sure that you have superuser privileges, and run the installer
 by typing
  /tmp/mathematica/Unix/Installer/MathInstaller
 When you are prompted for Mathematica's installation directory, enter
  /usr/local/emul/fedora/usr/local/Wolfram/Mathematica/6.0
 And when asked to create a new directory, type "y".  Accept the default
 options at all subsequent prompts.

 (5) Again, make sure that you have superuser privileges, and edit the
 Mathematica executables by typing the following command.
  for i in math mathematica mcc Mathematica MathKernel
  do
  ed -s /usr/local/emul/fedora/usr/local/Wolfram/Mathematica/*/Executables/$i 
<< EOF
  1c
  #!/usr/local/emul/fedora/bin/sh
  .
  g/Linux)/s/Linux)/OpenBSD)/
  g/cat .proc.cpuinfo | grep processor/s/cat .proc.cpuinfo | grep 
processor/dmesg | grep '^cpu[0-9]* at '/
  wq
  EOF
  done

 (6) Mathematica's "Paclet" system requires Sun's Java binary, which
 does not function under Linux binary emulation on OpenBSD.  See
  http://archives.neohapsis.com/archives/openbsd/2006-11/1099.html
 To disable the Paclet system, remove or rename the file
  
/usr/local/emul/fedora/usr/local/Wolfram/Mathematica/*/Documentation/English/PacletInfo.bin

 (7) You are now ready to run Mathematica.  The first time you start
 Mathematica, you need to change some of the default configuration
 options.  In particular, on the menu at
  Edit > Preferences... > Internet Connectivity
 you should uncheck the box labeled "Allow Mathematica to access the
 Internet", since the Paclet system is required for that functionality.
 Furthermore, you need to configure the MathLink connection to use
 pipes rather than shared memory.  The procedure for doing this varies,
 depending on which version of Mathematica you are using.  On my
 version, I go to the
  Evaluation > Kernel Configuration Options...
 menu, edit the local kernel, click "Advanced Options" in the "Kernel
 Properties" menu, and change the word "SharedMemory" to "Pipes" in the
 "Arguments to MLOpen" box.

You're done!

Reply via email to