Opened 5 years ago

Closed 5 years ago

Last modified 7 months ago

#6666 closed defect (fixed)

IRIX: configure mistakenly detects $_host_alias-strings

Reported by: SF/canavan Owned by: digitall
Priority: normal Component: Port: IRIX
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 "which $_host_alias-strings" ]

Ticket imported from: bugs/6666.

Attachments (1)

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

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by digitall

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

comment:2 Changed 5 years ago by digitall

Will look at amending the configure check.

Changed 5 years ago by digitall

Attachment: configure.patch added

comment:3 Changed 5 years ago by digitall

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 Changed 5 years ago by digitall

Owner: set to digitall
Resolution: fixed
Status: newpending

comment:5 Changed 5 years ago by digitall

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

comment:6 Changed 5 years ago by SF/canavan

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 Changed 5 years ago by digitall

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

Closing as fixed.

comment:8 Changed 5 years ago by digitall

Status: pendingclosed

comment:9 Changed 7 months ago by digitall

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