Message: Small bugs in Geant 4.9.2.p01 Configure script Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Small bugs in Geant 4.9.2.p01 Configure script 

Forum: Installation and Configuration
Date: 06 Aug, 2009
From: Tony Johnson <Tony Johnson>

While installing the Geant4 software for the EXO experiment I have 
discovered a couple of small bugs in the Configure script supplied with 
Geant4. I have described them here with workarounds (not fixes) in case 
others run into similar problems, and in the hope they can be fixed in a 
future release.

Bug 1

When run on some systems (at least two Ubuntu systems I have tried) the 
Configure script prints out some obscure text. For example:

tonyj@oxford:~/g4/geant4.9.2.p01$ ./Configure -incflags
They are not compatible!  You are probably running ksh on a non-USG 
system.
I'll have to use /bin/echo instead of the builtin, since Bourne shell 
doesn't
have echo built in and we may have to run some Bourne shell scripts.  That
means I'll have to use '-n' to suppress newlines now.

The star should be here-->*
-I/home/tonyj/g4/geant4.9.2.p01/include/

Since the EXO build script is trying to access that last line 
the excess verbiage messes things up badly. The workaround is to comment 
out some lines in the Configure script, using this patch script:

--- Configure.orig    2009-08-02 09:02:08.000000000 -0700
+++ Configure    2009-08-02 09:02:23.000000000 -0700
@@ -1263,15 +1263,15 @@
     '-n') n='' c='\c';;
     *) n='-n' c='';;
     esac
-        cat <<FOO
-They are not compatible!  You are probably running ksh on a non-USG 
system.
-I'll have to use $echo instead of the builtin, since Bourne shell doesn't
-have echo built in and we may have to run some Bourne shell scripts. 
That
-means I'll have to use '$n$c' to suppress newlines now.
-
-FOO
-        $echo $n "The star should be here-->$c"
-        $echo "*"
+        #cat <<FOO
+#They are not compatible!  You are probably running ksh on a non-USG 
system.
+#I'll have to use $echo instead of the builtin, since Bourne shell 
doesn't
+#have echo built in and we may have to run some Bourne shell scripts. 
That
+#means I'll have to use '$n$c' to suppress newlines now.
+#
+#FOO
+        #$echo $n "The star should be here-->$c"
+        #$echo "*"
fi
$rm -f foo1 foo2
;;

Bug 2

A more obscure bug exists which is less likely to affect many people. When 
using the Geant4 Configure script non-interactively (e.g in a batch job, 
or as part of a automated build system) Configure fails with an obscure 
message:

$G4INSTALL/Configure -incflags
Say 'sh Configure', not 'sh <Configure'

Again a workaround is to apply a simple patch:

--- Configure.orig    2009-07-28 16:10:05.049525000 -0700
+++ Configure    2009-07-28 16:26:05.986600000 -0700
@@ -587,11 +587,12 @@
case "$fastread$alldone" in
yescont|yesexit) ;;
*)
-    if test ! -t 0; then
-        echo "Say 'sh Configure', not 'sh <Configure'"
-        exit 1
-    fi
-    ;;
+#    if test ! -t 0; then
+#        echo "Say 'sh Configure', not 'sh <Configure' fr=$fastread 
ad=$alldone"
+#        exit 1
+#    fi
+#    ;;
esac

exec 4>&1

I think the real source of this bug is the line:

case "$fastread$alldone" in
yescont|yesexit) ;;

in the case that no options were specified, $fastread and $alldone are 
both equal to the empty string, and bash considers that the empty string 
is "in" all other strings.

Tony

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Ben Morgan - 07 Aug, 2009)
(_ None: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Ben Morgan - 07 Aug, 2009)
(_ None: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Ben Morgan - 10 Aug, 2009)
1 None: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Ben Morgan - 10 Aug, 2009)
1 Ok: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Tony Johnson - 10 Aug, 2009)
2 Feedback: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Tony Johnson - 10 Aug, 2009)
1 None: Re: Small bugs in Geant 4.9.2.p01 Configure script   (Ben Morgan - 12 Aug, 2009)
... 2 Message(s)
 Add Message Add Message
to: "Small bugs in Geant 4.9.2.p01 Configure script"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]