SuSE GmbH

SuSE Support Database

Title: Mathematica: Installation script terminates

----------

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

----------

Mathematica: Installation script terminates

Mathematica: Installation script math.install terminates without installing

Concerns only to S.u.S.E. Linux 4.2.

Symptom:

math.install terminates without installing

Cause:

There is a line in the script math.install:
mydir=`expr $0'/' : '\(/\)[^/]*//*$' \| $0'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \| .`
In this line is tried to be found the directory in which the script is.

It is an error either in the expr programme or in the used Regex functions of the libc.so.5.2.18. In the future we will link expr to other Regex functions.

Solution:

Change in math.install the line mentioned above to:
mydir=/usr/local/math/Install
or to where you have installed Mathematica. In S.u.S.E. Linux 4.3 the problem will not appear anymore. You can also update the packet, see ftp://ftp.suse.de/pub, whether there is already a new packet for expr (packet shutils) or not.

X frontend (xfe.install)

Here the same problem appears. Change in the script xfe.install the corresponding line analogously.

For Hacker:

With the following script you can verify the problem.
	#!/bin/sh
	#--------------------------- Testscript z.B. /home/alex/kfr/tmp/braune ------
	echo "\$0:$0"
	echo dirname:`dirname $0`
	
	#myd=`expr $0'/' : '\(/\)[^/]*//*$' \| $0'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \| .`

	myd=`expr $0'/' : '[^/]*//*$' \| 'NO'`
	echo "myd:$myd"
	
	myd=`expr $0'/' : '\(/\)[^/]*/*$' \| 'NO'`
	echo "myd:$myd"
	
	myd=`expr $0'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \| 'NO'`
	echo "myd:$myd"
It is wrong:
+/tmp $ expr --version
	expr - GNU sh-utils 1.12
	+/tmp $ `pwd`/braune 
	$0:/home/alex/kfr/tmp/braune
	dirname:/home/alex/kfr/tmp
	myd:NO
	myd:NO
	myd:/home/alex/kfr/tmp
	+/tmp $ ./braune 
	$0:./braune
	dirname:.
	myd:NO
	myd:/
	myd:.
	+/tmp $ 
It is correct:
	+/tmp $ expr --version
	expr - GNU sh-utils 1.12
	+/tmp $ `pwd`/braune 
	$0:/home/alex/kfr/tmp/braune
	dirname:/home/alex/kfr/tmp
	myd:NO
	myd:NO
	myd:/home/alex/kfr/tmp
	+/tmp $ ./braune 
	$0:./braune
	dirname:.
	myd:NO
	myd:NO
	myd:.
	+/tmp $ 
Decissive is, why a "/" at "./braune" is delivered during the 2nd printout , which it should not.

As one sees, "dirname" works always correctly. Due to compatibility reasons, unfortunately one cannot always use it.

Credits:

The solution could be found with Martin Braune and Holger Perlt's friendly help.

----------

See also:

----------

Keywords: MATHEMATICA, LIBC, EXPR, MATH.INSTALL, XFE.INSTALL

----------

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

----------

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

----------

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