SuSE GmbH

SuSE Support Database

Title: Mathematica: Template compiler

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

Mathematica: Template compiler

Version: Mathematica 2.2.4 and S.u.S.E. Linux 4.2

Symptom:

After the installation, the mathlink template compiler is available to be used in /usr/local/bin/mcc . This script is required to pre-process mathematica template files (*.tm) and to pass them on to the C compiler.

Unfortunately it does not work.

Cause:

Since the mathlink library libML.a, required during linking, is in a.out format (at least at mine, Mathematica for Linux 2.2.4), the C call (quite at the end in mcc) must be defined on an ELF system for a.out compiling and linking.

Solution:

In the file:
   cc $outfile -I$mlinclude $passtocc -L$mllibrary ... 
will change into
   cc $outfile -b i486-linuxaout -I$mlinclude $passtocc -L$mllibrary
A diff-patch is included. CAREFUL: The place where "mcc" is depends on the installation.

Patch:

*** /usr/local/bin/mcc.orig	Mon Aug  5 15:21:48 1996
--- /usr/local/bin/mcc	Mon Aug  5 15:20:32 1996
***************
*** 69,77 ****
     mlteddotofiles="$mlteddotofiles $mloutfile.o"
     passtocc="$passtocc $mloutfile.c"
  fi
  
!    cc $outfile -I$mlinclude $passtocc -L$mllibrary -lML -lm -DSTANDALONEMLINK
  
  if [ ".$mloutfile" != "." ] ; then
      if [ ".$debug" = "." ] ; then
        rm -f $mloutfile.c
--- 69,77 ----
     mlteddotofiles="$mlteddotofiles $mloutfile.o"
     passtocc="$passtocc $mloutfile.c"
  fi
  
!    cc $outfile -b i486-linuxaout -I$mlinclude $passtocc -L$mllibrary -lML -lm -DSTANDALONEMLINK
  
  if [ ".$mloutfile" != "." ] ; then
      if [ ".$debug" = "." ] ; then
        rm -f $mloutfile.c

Credits:

This bug was friendly described to us and solved by:

Albrecht Gebhardt
Institut fuer Mathematik
Universitaet Klagenfurt

email: albrecht.gebhardt@uni-klu.ac.at

----------

See also:

----------

Keywords: MATHEMATICA, COMPILER, MCC, TEMPLATE

----------

Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-mathematica2)

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-mathematica2, Copyright SuSE GmbH, Nuremberg, Germany - Version:
SuSE GmbH - Last generated: 07. Oct 1999 17:27:32 by maddin with sdb_gen 1.00.0