I've noticed on my Tru64 5.0a box that the check for `BSD-compatible' nm
always fails, and after some checking I discovered that it failed on 4.0f
too, and I never noticed it.
It took me a while to find what the problem is, but I think it's due to
the fact that sometime between Digital UNIX 4.0d and Tru64 UNIX 4.0f, in
addition to the OS name change :-|, the output from nm changed:
4.0d box$/usr/bin/nm -B /dev/null
/usr/bin/nm: Error: /dev/null is not an object
4.0f box$/usr/bin/nm -B /dev/null
/usr/bin/nm: Invalid file or object type
5.0a box$/usr/bin/nm -B /dev/null
/usr/bin/nm: Invalid file or object type
Since the code in `ltconfig' and AC_PROG_NM (in `libtool.m4') is doing
an `egrep /dev/null', the new format isn't being matched.
If I change the egrep to
egrep '(/dev/null| object)'
then of course it matches, and things are happy. I'm not sure if this
is going to break some other platform, though, or have unintended side
effects.
I'm not sure what all needs to be patched: diffs for both ltconfig and
ltconfig.in are attached, as well as `libtool.m4'.
Please let me know if there are problems with the diffs, or if there's
some other approach that is preferrable.
Thanks!
PS: Please be sure to update the `config.guess' before the next libtool
release. The one that's included doesn't correctly generate the OS
version of Tru64 5.x: it always comes up with `osf5.0' instead of
`osf5.0<letter>', because the code in config.guess is only running `sizer'
for the 4.x OS release. I'm not sure who's maintaining the canonical
config.guess -- if someone know's I'll report the problem to them too...
Tim
--
Tim Mooney [EMAIL PROTECTED]
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
diff -ur libtool-1.3.5.orig/acinclude.m4 libtool-1.3.5/acinclude.m4
--- libtool-1.3.5.orig/acinclude.m4 Sun May 14 17:35:47 2000
+++ libtool-1.3.5/acinclude.m4 Thu Aug 24 15:21:54 2000
@@ -333,10 +333,13 @@
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ # Adding the `| object' to the egrep allows Tru64 4.0f+'s nm to be
+ # found, since it doesn't output a filename, just:
+ # nm: Invalid file or object type
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
break
else
diff -ur libtool-1.3.5.orig/libtool.m4 libtool-1.3.5/libtool.m4
--- libtool-1.3.5.orig/libtool.m4 Sun May 14 17:35:47 2000
+++ libtool-1.3.5/libtool.m4 Thu Aug 24 15:21:54 2000
@@ -333,10 +333,13 @@
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ # Adding the `| object' to the egrep allows Tru64 4.0f+'s nm to be
+ # found, since it doesn't output a filename, just:
+ # nm: Invalid file or object type
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
break
else
diff -ur libtool-1.3.5.orig/ltconfig libtool-1.3.5/ltconfig
--- libtool-1.3.5.orig/ltconfig Sat May 27 06:15:00 2000
+++ libtool-1.3.5/ltconfig Thu Aug 24 15:31:11 2000
@@ -1565,10 +1565,13 @@
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ # Adding the `| object' to the egrep allows Tru64 4.0f+'s nm to be
+ # found, since it doesn't output a filename, just:
+ # nm: Invalid file or object type
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
NM="$ac_dir/nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
NM="$ac_dir/nm -p"
break
else
diff -ur libtool-1.3.5.orig/ltconfig.in libtool-1.3.5/ltconfig.in
--- libtool-1.3.5.orig/ltconfig.in Fri May 26 20:58:57 2000
+++ libtool-1.3.5/ltconfig.in Thu Aug 24 15:30:25 2000
@@ -1565,10 +1565,13 @@
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ # Adding the `| object' to the egrep allows Tru64 4.0f+'s nm to be
+ # found, since it doesn't output a filename, just:
+ # nm: Invalid file or object type
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
NM="$ac_dir/nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|
+object)' >/dev/null; then
NM="$ac_dir/nm -p"
break
else