m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange --version issue


From: John Calcote
Subject: Re: strange --version issue
Date: Wed, 09 Apr 2008 09:38:23 -0600
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Well, I've discovered the problem. (If anyone cares).

Apparently, for whatever reason, the bash shell caches the last known location of m4. I had just installed version 1.4.5 in /usr/local, so that I could upgrade to autoconf 2.62, but I hadn't yet close my shell when I tested the installation.

I was messing around, and renamed the /usr/bin/m4 to get it out of the picture, and then bash couldn't find it. So I wondered if it was cached by the shell. I started a new shell and this one worked fine.

John

John Calcote wrote:
Here's some more data on the m4 --version issue.

$ *m4 --version*
*GNU M4 1.4.4*
Written by Rene' Seindal.
...

$ *strace m4 --version*
execve("/usr/local/bin/m4", ["m4", "--version"], [/* 68 vars */]) = 0
...
write(1, "GNU M4 1.4.5\n", 13*GNU M4 1.4.5*
)          = 13
write(1, "Written by Rene\' Seindal.\n\nCopyr"..., 152Written by Rene' Seindal.
...

Running "m4 --version" alone appears to execute the one in /usr/bin (1.4.4), while executing under strace seems to run the correct one in /usr/local/bin (1.4.5).

Again, I'm wondering...

John

John Calcote wrote:
Can someone please tell me what the heck is going on here:

$ echo $PATH
...:/usr/local/bin:/usr/bin:...
$ ls -al /usr/bin/m4
-rwxr-xr-x 1 root root 60768 2006-06-16 07:39 /usr/bin/m4
$ ls -al /usr/local/bin/m4
-rwxr-xr-x 1 root root 179252 2008-04-09 08:46 /usr/local/bin/m4
$ which m4
/usr/local/bin/m4
$ /usr/bin/m4 --version
GNU M4 1.4.4
Written by Rene' Seindal.
...
$ /usr/local/bin/m4 --version
GNU M4 1.4.5
Written by Rene' Seindal.
...
$ m4 --version
GNU M4 1.4.4
Written by Rene' Seindal.
...

I'm sure this is not really an m4 question, but I'm totally stumped - /usr/local/bin comes first in my PATH, yet when I execute "m4 --version" I seem to be picking up the 1.4.4 version in my /usr/bin directory. What gives?

John








reply via email to

[Prev in Thread] Current Thread [Next in Thread]