[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Touching the PATH
From: |
Akim Demaille |
Subject: |
Touching the PATH |
Date: |
07 Nov 2002 10:09:11 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
Err, it seems that my message are not delivered :( Sorry if there
_are_ duplicates. I sent the following messages recently:
--------------------------------------------------
From: Akim Demaille <address@hidden>
Subject: Touching the PATH
To: Libtool List <address@hidden>
X-Sent: 1 day, 19 hours, 56 seconds ago
If you look at the current tarball of GNU M4, located here:
http://www.lrde.epita.fr/~akim/download/m4-1.4q.tar.gz or .bz2
you'll see that make distcheck fails, while make check passes.
distcheck fails in a simple way, corresponding to this:
~/src/m4/m4-1.4q/=build/tests % echo 'esyscmd(m4 --version)' | PATH=`pwd`:$PATH
m4
m4: error while loading shared libraries: m4.so.0: cannot open shared object
file: No such file or directory
What's wrong?
What is wrong is that the PATH is not the one I passed:
~/src/m4/m4-1.4q/=build/tests % echo 'esyscmd(echo $PATH)' | PATH=`pwd`:$PATH
m4
/home/akim/src/m4/m4-1.4q/=build/src/.libs:/home/akim/src/m4/m4-1.4q/=build/tests:/home/akim/bin:/home/akim/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
and therefore, it is not the m4 I wanted to run that is run:
~/src/m4/m4-1.4q/=build/tests % echo 'esyscmd(which m4)' | PATH=`pwd`:$PATH m4
/home/akim/src/m4/m4-1.4q/=build/src/.libs/m4
Which apparently, didn't get the variables it wanted.
This is because of the following lines in ltmain,.sh:
$echo >> $output "\
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
exec \$program \${1+\"address@hidden"}
Why not running directly the program? Well, because:
1997-01-28 Gordon Matzigkeit <address@hidden>
* ltmain.sh.in (link): Export the PATH variable in order to find
the program, rather than giving a full path. This helps give the
program a less confusing value for argv[0].
but this is no longer relevant!!! Just look at the poor name reported
by the program:
remo% ./m4 --help | sed 1q
Usage: lt-m4 [OPTION]... [FILE]...
the name is already broken by the fact that lt- is prepended.
So, because playing with PATH (and with any user var actually) is a
bad idea, I vote for the replacement of the code above by:
$echo >> $output "\
exec \$progdir/\$program \${1+\"address@hidden"}
Comments?
--------------------------------------------------
From: Akim Demaille <address@hidden>
Subject: Changing PATH in the wrappers
To: Libtool Patches <address@hidden>
X-Sent: 23 hours, 2 minutes, 25 seconds ago
I sent a couple of days ago a bug report. Here is the patch I'm
suggesting. I'm also asking for writing permission on Libtool CVS, so
that I can apply my patches. Of course, I will wait for approvals. I
also plan to improve Autoconf 2.55 compatibility.
Please, install this patch, as without it GNU M4 fails to distcheck.
(I have failures, but they are Fortran related. I'll have a look at it).
Index: ChangeLog
from Akim Demaille <address@hidden>
* ltmain.in: Do not change the PATH in the wrappers: let them
launch the real binary using its path.
Index: ltmain.in
===================================================================
RCS file: /cvs/libtool/ltmain.in,v
retrieving revision 1.310
diff -u -u -r1.310 ltmain.in
--- ltmain.in 3 Nov 2002 17:35:36 -0000 1.310
+++ ltmain.in 6 Nov 2002 09:56:03 -0000
@@ -119,7 +119,7 @@
# This seems to be the best place for them
# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
+# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
win32_libid () {
win32_libid_type="unknown"
@@ -4313,14 +4313,6 @@
# Run the actual program with our arguments.
"
case $host in
- # win32 systems need to use the prog path for dll
- # lookup to work
- *-*-cygwin* | *-*-pw32*)
- $echo >> $output "\
- exec \$progdir/\$program \${1+\"address@hidden"}
-"
- ;;
-
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
@@ -4330,11 +4322,7 @@
*)
$echo >> $output "\
- # Export the path to the program.
- PATH=\"\$progdir:\$PATH\"
- export PATH
-
- exec \$program \${1+\"address@hidden"}
+ exec \$progdir/\$program \${1+\"address@hidden"}
"
;;
esac
@@ -4823,7 +4811,7 @@
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command
before installing it" 1>&2
- exit 1
+ exit 1
fi
fi
----------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Touching the PATH,
Akim Demaille <=