Operating System - Linux
1826792 Members
1963 Online
109703 Solutions
New Discussion

tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

 
SOLVED
Go to solution
Tom Schroll
Frequent Advisor

tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

System: HP-UX 11.23 (update 2) on ia64.

We have tcsh 6.12 installed from the TC-OpenSource Bundle (from Internet Express A.02.00). When tcsh is started, it returns the error "tcsh: using dumb terminal settings." Setting the TERM variable to anything sane (ie: xterm or vt100) returns the same error each time. And term capabilities are broken. I checked terminfo, and it's there as expected (/usr/share/lib/terminfo). I also ran tusc (truss) on this version of tcsh and found that it does attempt to open the terminfo files and seems to be OK...right after opening libxcurses. I can include the output from tusc if need be.

Moving right along, I promptly removed the version of tcsh from TC-OpenSource, thinking it was flawed. I installed the version from the Software and Porting archive. I tried version 6.14. Same error. Hrrmmm. I tried a few older versions that I had laying around from the same site. Same error. Until I go back to 6.10 from 11.22. And then it works. However, 6.10 has a bug which causes it to not handle large files (2GB) in wildcard expansion. So... 6.10 is not an option.

I also tried installing (and uninstalling)OpenSource termcap from the Porting Archive. But tusc shows no attempt to open the /usr/local version of termcap or terminfo. It wants to use HP-UX native terminfo in /usr/share/lib. So that trail got cold real quick.

I tried diagnostics on 3 different systems too, so it's not just a possible terminfo corruption on one system.

Finally, I had to settle with using the PA-RISC version of 6.13. It obviously runs in Aries emulation mode. And it works properly, letting me set TERM and terminal capabilities are completely functional. It also handles large files correctly. But I don't want to rely on using the PA-RISC version on a ia64 box forever!

So my question is, has anybody else noticed that the ia64 version of tcsh > 6.10 is busted on ia64 11.23 as far as terminal type setting is concerned?

And does anybody know *why* it is busted?

Thanks!!!!!!
If it ain't broke, it needs optimized.
9 REPLIES 9
Ermin Borovac
Honored Contributor
Solution

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Here is relevant section from tcsh 6.14 source code.

i = tgetent(bp, ptr);
if (i <= 0) {
if (i == -1) {
#if (SYSVREL == 0) || defined(IRIS3D)
xprintf(CGETS(7, 20, "%s: Cannot open /etc/termcap.\n"), progname);
}
else if (i == 0) {
#endif /* SYSVREL */
xprintf(CGETS(7, 21,
"%s: No entry for terminal type \"%s\"\n"), progname,
getenv("TERM"));
}
xprintf(CGETS(7, 22, "%s: using dumb terminal settings.\n"), progname);
...

Now according to tgetent man page, it returns -1 if error occurs and 0 if all goes well. So tgetent success on 11.23 ia64 is interpreted as failure in tcsh source code.

i = tgetent(bp, ptr);
if (i <= 0) {

needs to be changed to

i = tgetent(bp, ptr);
if (i < 0) {

So no matter what you set TERM to it won't help you.
Tom Schroll
Frequent Advisor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Sharp eye! Using tusc, this confirms what I was seeing there as well.

So.........

When is someone on the Porting and Archiving site (or the maintainer of tcsh) going to fix this bug? I'll look around for correct place to submit bugs. What's funny is that it's been broken since tcsh 6.11+ and nobody else noticed this? Or did something change with HP-UX as of 11.23?... And even funnier is that the PA-RISC version WORKS...which I imagine is based on the same code base. Weird. Weird. Weird. Thanks for your help!
If it ain't broke, it needs optimized.
H.Merijn Brand (procura
Honored Contributor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

I have forwarded this thread to the development team (to whose list I am subscribed)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tom Schroll
Frequent Advisor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Thanks for forwarding it. I'll keep this thread open in case anyone wants to post an update or any other questions. I'll be happy to help out if I can. Take care...
If it ain't broke, it needs optimized.
Ermin Borovac
Honored Contributor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

PA-RISC version of tcsh is probably linked with libtermcap. libtermcap library is phased out in favour of libcurses library.

As far as I can see tgetent() from libtermcap returns 1 on success, whereas tgetent() from libcurses returns 0 on success.

PA-RISC boxes (even 11.23) still include libtermcap.a (static) in /usr/lib. I think 11.23 Itanium systems don't come with libtermcap any longer.

That is probably why PA-RISC version of tcsh works, as it was linked with libtermcap library.

Imre Kolos
New Member

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Hi,

have you tried tcsh 6.14 and termcap. both from Porting Archive?

cause tcsh 6.14 from P-A on HPUX 11.11:

tcsh: No entry for terminal type "xterm"
tcsh: using dumb terminal settings.

but with termcap-1.3.1 from P-A it is ok.

/br
Tom Schroll
Frequent Advisor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Yes, I tried installed termcap from the Porting archive. I stated this fact in the original posting:

"...also tried installing (and uninstalling)OpenSource termcap from the Porting Archive. But tusc shows no attempt to open the /usr/local version of termcap or terminfo. It wants to use HP-UX native terminfo in /usr/share/lib. So that trail got cold real quick."

Indeed I left the termcap library installed the whole time (trying all versions of tcsh) and then removed it and tried again. Since the PA-RISC version works, and the ia64 version does not (no matter if OpenSource termcap is installed or not), it certainly appears to be the curses library issue identified in the previous postings. And my tusc research confirms this (the ia64 version does not even try to open termcap, it uses curses directly). The tcsh code itself needs fixed or the ia64 version needs linked against the equivalent libraries that the PA-RISC version uses (not trivial because termcap has been obsoleted and replaced by native HP-UX curses libraries on 11.23 ia64, so I don't even think that is a solution). Basically it appears we need to wait for someone to fix the tsch source code to handle the correct return value of the aforementioned function.

Good suggestion to check the termcap stuff though...which was my first thought as well...until after I fought with it for hours and realized that ia64 isn't even trying to open termcap! Interesting, eh?

Thanks!
If it ain't broke, it needs optimized.
Fritz MAYER
Advisor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Tom exactly describes the same problem I've got since several months. I too have installed the PA version as a turnaround. I've almost forgotton that actually a "false" tcsh has been installed until I got a problem with sftp (HP-UX Secure Shell T1471AA A.04.00.001). With tcsh as login shell it's not possible to establish a sftp connection. With all other tested shells no problem. So I tried again different tcsh versions (which didn't help the sftp problem) and encountered again the "dumb terminal settings" problem.

So, are there any solutions in sight?

Tom, if you've found a solution in the meantime, please share it!

Thanks,
Fritz
Fritz MAYER
Advisor

Re: tcsh 6.11 (and higher) is busted on ia64 11.23 (update 2)

Now I took Ermin's modification of the source code and compiled it and replaced the original binary with the new one. I'm happy again, but the sftp problem is another story and deserves a separate thread.

Thanks Ermin! (I too would have given 10 points!)