[GE users] "too many arguments" error in util/arch

olesen Mark.Olesen at faurecia.com
Wed Apr 14 12:20:46 BST 2010

On Tue, 2010-04-13 at 20:20 -0700, jgrn307 wrote:
> I stay in BASH due to some dependency issues with my particular setup
> -- I have this vague recollection sge doesn't play quite right with
> BASH in its default configuration (I notice in the host configuration
> bash is not one of the "login shells") -- could this be the problem?
> /bin/sh points to "sh" on my system, but everything is being launched from within bash.

In my version of util/arch (from the 6.2u3 version), the lines 253 and
257 (where you report errors) correspond to the following 'if'

libc_version=`echo $libc_string | tr ' ,' '\n' | grep "2\." | cut -f 2
-d "."`
         if [ $libc_version -lt 2 ]; then
            if [ $libc_version -eq 2 ]; then

If the libc_version variable happens to contain multiple values, you
will receive exactly the error you are seeing.
For example (from the command line),

libc_version="10 12"
[ $libc_version -lt 2 ] && echo ok

bash: [: too many arguments

If the libc_version is quoted, you'll get a different error:

libc_version="10 12"
[ "$libc_version" -lt 2 ] && echo ok

bash: [: 10 12: integer expression expected

To trace the problem, could you please see what libc_string would
contain. Ie, which values do you get for the following?

    strings /lib64/libc.so.6 | grep "GNU C Library"
    strings /lib/libc.so.6.1 | grep "GNU C Library"

On my system (openSUSE 11.2) I get this:

GNU C Library stable release version 2.10.1 (20090918), by Roland
McGrath et al.

If you somehow have another "2." somewhere in the string though, this
will cause util/arch to fail after the tr/grep. If my suspicions are
correct, it is fairly simple to solve.


This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.


To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list