Installing MathSupport in Mediawiki on RHEL5

Yesterday I wanted to get that Math-Thing to work in a Wiki to give users the possibility to create nice looking formulas.

System:
Red Hat Enterprise Linux 5 – 64bit
Mediawiki 1.15.1

In my default MW-install there was already a MATH subfolder in the wiki-root – so no need to install anything here. I just had to compile the stuff in the Math-folder to get the texvc-executable.
The Math-README states the need to have OCaml installed before compiling. OCaml is no default on RHEL5. So I grabbed the next best RHEL5-compatible RPM (ocaml-3.10.1-1.el5.i386.rpm) from here.
The “make” in the Math-Folder faild with something like this:

ocamlopt -c util.ml
/tmp/camlasm747801.s: Assembler messages:
/tmp/camlasm747801.s:62: Error: suffix or operands invalid for `call'
/tmp/camlasm747801.s:80: Error: suffix or operands invalid for `call'
/tmp/camlasm747801.s:128: Error: suffix or operands invalid for `call'
/tmp/camlasm747801.s:164: Error: suffix or operands invalid for `push'
/tmp/camlasm747801.s:181: Error: suffix or operands invalid for `pop'
/tmp/camlasm747801.s:199: Error: suffix or operands invalid for `push'
/tmp/camlasm747801.s:206: Error: suffix or operands invalid for `push'
/tmp/camlasm747801.s:212: Error: suffix or operands invalid for `push'
/tmp/camlasm747801.s:219: Error: suffix or operands invalid for `push'
Assembler error, input left in file /tmp/camlasm747801.s
make: *** [util.cmx] Error 2

After some unsuccessfull googling it came to my mind, that I had a similar problem when unintentionally trying to install a 32bit-version of Oracle-Database on a 64bit-RHEL.
The OCaml I installed was 32bit. So I replaced it with this 64bit-version and lo and behold the Math-“make” succeeded. I set the $wgUseTeX in the LocalSettings to “true”, created a page with some formulas and all was well.

In another migrated wiki which came from another server I did the same but just got  red errormessages instead of formulas when I opend a preexisting page with formulas. The errors said something like “no read/write access to math-directory”. In the LocalSettings I found this:

$wgMathPath         =  “{$wgUploadPath}/math”
$wgMathDirectory    =  “{$wgUploadDirectory}/math”
$wgTmpDirectory     =  “{$wgUploadDirectory}/tmp”

These variables are identical to the ones in the DefaultSettings.php. So there’s no need to use them here, even if I don’t see any problem if so. I deleted them but still got “red alerts”. I checked the directory-permissions at the filesystem but all was okay. Finally I opened the wiki-page with the errors in edit-mode and saved it unchanged to the wiki to get a suspected old page-version out of the wiki-cache. Success!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: