Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#6666 closed defect (fixed)

IRIX: configure mistakenly detects $_host_alias-strings

Reported by: SF/canavan Owned by: digitall
Priority: normal Component: Port: IRIX
Version: Keywords:
Cc: Game:

Description

Using 1.7.0-branch, configure uses a test Checking for $_host_alias-strings... that is too optimistic. For some reason, on IRIX 6.5 /usr/bsd/which produces the error message on stdout, and therefore tries to use $_host_alias-strings even if that does not exist:

$ echo "x$(which $_host_alias-strings 2>/dev/null)" x-strings not in /usr/sbin /usr/bsd /sbin /usr/bin /usr/bin/X11 . /usr/local/bin /usr/nekoware/bin /usr/local/bin /usr/nekoware/bin /usr/local/bin /usr/nekoware/bin /usr/local/bin /usr/nekoware/bin

I'd propose extending the test to check the return result as well, e.g.

if test ! "x$(which $_host_alias-strings 2>/dev/null)" = "x" && which $_host_alias-strings >/dev/null 2>&1; then

alternatively, one could check if the output of which refers to an executable file, e.g. [ -x "klzzwxh:0001" ]

Ticket imported from: bugs/6666.

Attachments (1)

configure.patch (396 bytes ) - added by digitall 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by digitall, 10 years ago

Summary: configure mistakenly detects $_host_alias-strings on IRIXIRIX: configure mistakenly detects $_host_alias-strings

comment:2 by digitall, 10 years ago

Will look at amending the configure check.

by digitall, 10 years ago

Attachment: configure.patch added

comment:3 by digitall, 10 years ago

canavan: Please test the attached patch please.

This is based on the method you indicated, but the code required is much simpler. It passes the checkbashisms test and should be POSIX compliant shell code, so we hope that IRIX works with this, but the documentation for your which is rather unclear about the expected return values: http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/u_man/cat1/which.z

comment:4 by digitall, 10 years ago

Owner: set to digitall
Resolution: fixed
Status: newpending

comment:5 by digitall, 10 years ago

If this works, I'll commit this (with thanks to LordHoto for helping work this out).

comment:6 by SF/canavan, 10 years ago

A quick test shows that the new test is working properly and detects mips-irix6.5-strings exactly if it is available.

thanks.

comment:7 by digitall, 10 years ago

No problem. Committed fix to master as150ac10a1e233540e56d272bfd6f21492c7b2a4e. Backported to release branch-1-7 as b188db856075d750748a3cb8ce8f067212fb3d47.

Closing as fixed.

comment:8 by digitall, 10 years ago

Status: pendingclosed

comment:9 by digitall, 6 years ago

Component: Port: IRIX
Note: See TracTickets for help on using tickets.