All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
new bash?
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
new bash? - Oct. 21, '04, 10:32:38 PM
|
|
|
minameismud
Posts: 14
Joined: Jul. 13, '04,
Status: offline
|
Any ETA for an updated Bash shell? I've heard from my more *nix savvy friends that bash 3.0 came out about a month ago.
|
|
|
RE: new bash? - Oct. 22, '04, 10:13:30 AM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
I unpacked bash-3.0.tar.gz. It builds without incident for me.
% ./configure
.......
% make
.......
% ./bash -l
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
bash-3.00$
|
|
|
RE: new bash? - Oct. 22, '04, 10:31:36 AM
|
|
|
jonsmi
Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
|
Did so as well about a week or two ago. Installs without trouble. Did not have
too much time to look into it, but I think, you'll have to make changes to
the configure file in order to compile bash 3.0 with shared libs.
Don't you get some ???.so error? Does this work as a shortcut from
the Desktop:
C:\WINDOWS\system32\POSIX.EXE /u /c /usr/local/bin/bash -l
It does with GNU bash, version 2.05b.0(2)-release (i386-pc-interix3),
but it did not for me with bash 3.0.
There is also talk of a script which is supposed to crash this version.
Seems like this might become quite interesting stuff.
|
|
|
RE: new bash? - Oct. 22, '04, 10:44:07 AM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
quote:
Don't you get some ???.so error? Does this work as a shortcut from
the Desktop:
You're right. I hadn't tried that. Looks exactly like the problem with RXVT.
/dev/fs/D/breiter/SFU/bash-3.0/bash: error in loading shared libraries
libintl.so: cannot open shared object file: No such file or directory
% objdump -p bash | egrep "RPATH|NEED"
NEEDED libintl.so
NEEDED libiconv.so
NEEDED libc.so.3.5
NEEDED libdl.so.3.5
I think it needs to be linked with -rpath '/usr/local/lib'
|
|
|
RE: new bash? - Oct. 22, '04, 11:02:10 AM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Here's a patch of Makefile generated by ./configure with the -rpath tweak.
--- Makefile.old Fri Oct 22 10:53:22 2004
+++ Makefile Fri Oct 22 11:03:08 2004
@@ -511,7 +511,7 @@
$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
$(RM) $@
- $(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS)
+ $(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS) -rpath /usr/lib:/usr/local/lib'
ls -l $(Program)
size $(Program)
% objdump -p bash | egrep "RPATH|NEED"
NEEDED libintl.so
NEEDED libiconv.so
NEEDED libc.so.3.5
NEEDED libdl.so.3.5
RPATH /usr/lib:/usr/local/lib
This fixes the library load error. Now I can start it with psxrun but I get a wierd set of meesages as it is starting up:
shell-init: error retrieving current directory: getcwd: cannot access parent dir
ectories: Bad file descriptor
job-working-directory: error retrieving current directory: getcwd: cannot access
parent directories: Undefined error: 0
job-working-directory: error retrieving current directory: getcwd: cannot access
parent directories: Undefined error: 0
chdir: error retrieving current directory: getcwd: cannot access parent director
ies: Undefined error: 0
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
bash-3.00$
However I don't have any problem at all if I start it from inside an Interix shell.
< Message edited by breiter -- Oct. 22, '04, 11:07:13 AM >
|
|
|
RE: new bash? - Oct. 22, '04, 8:22:42 PM
|
|
|
jonsmi
Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
|
quote:
% objdump -p bash | egrep "RPATH|NEED"
NEEDED libintl.so
NEEDED libiconv.so
NEEDED libc.so.3.5
NEEDED libdl.so.3.5
Highly interesting. That's two more than with the current version.
ayla:/usr/local/bin# bash --version
GNU bash, version 2.05b.0(2)-release (i386-pc-interix3)
Copyright (C) 2002 Free Software Foundation, Inc.
ayla:/usr/local/bin# objdump -p bash | egrep "RPATH|NEED"
NEEDED libdl.so.3.5
NEEDED libc.so.3.5
Just to compare with SUSE Linux 9.1 (9.2 in the beginning of November):
linpus:/bin # bash --version
GNU bash, version 2.05b.0(1)-release (i586-suse-linux)
Copyright (C) 2002 Free Software Foundation, Inc.
linpus:/bin # objdump -p bash | egrep "RPATH|NEED"
NEEDED libreadline.so.4
NEEDED libhistory.so.4
NEEDED libncurses.so.5
NEEDED libdl.so.2
NEEDED libc.so.6
--------------------------------------------------------
vmayla:/bin # bash --version
GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
vmayla:/bin # objdump -p bash | egrep "RPATH|NEED"
NEEDED libreadline.so.4
NEEDED libhistory.so.4
NEEDED libncurses.so.5
NEEDED libdl.so.2
NEEDED libc.so.6
No change. On Linux gcc 3.3 defaults to shared libraries; on Interix
to static libraries. Rodney once pointed out how to build shared ones.
It's in the source code for libiconv-1.9.2. Take a look at the configure
script there, and do a search on interix. This worked for the
Fox Toolkit, in order to build xfe 0.72 (btw, marvelous X-based File
Explorer -- haven't packed it yet though).
Think I'll try that approach.
|
|
|
RE: new bash? - Oct. 22, '04, 9:10:33 PM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Actually, if you ./configure --enable-static-link you get the same end result as my manually hacked Makefile (except that the binary is bigger).
It builds bash just fine and bash loads using posix.exe, but it gives some weird getcwd errors as it starts up with posix.exe but not when started from an Interix shell nor when passed to RXVT or XTerm as the -e param.
% objdump -p ./bash | egrep "RPATH|NEEDED"
%
|
|
|
RE: new bash? - Oct. 22, '04, 10:41:52 PM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
It is particularly frustrating for figuring this out that lib/su/getcwd.c is unchanged from the 2.05b src package on Interopsystems ftp server (except for a #if involving AIX). I can't make the problem occur except with invocation directly from POSIX.EXE.
It is a problem beyond my ken.
|
|
|
RE: new bash? - Oct. 23, '04, 9:00:36 AM
|
|
|
steveh
Posts: 177
Joined: Jan. 23, '04,
Status: offline
|
Now Rodney's teasing
/me wonders whats happening on monday? Hope he had some good news on his trip :)
|
|
|
RE: new bash? - Oct. 23, '04, 12:26:31 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
He seems to be in a good mood ;)
Rodney, BTW What amout the magic tool to support win32 tools display on weird terminals and ssh sesions?
|
|
|
RE: new bash? - Oct. 23, '04, 9:36:55 PM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
You may recall my complaining about BASH behavior with RXVT: BASH misbehaves until I set the export TERM=xterm. I have come to realize that the real problem is that BASH defaults to TERM=dumb when a terminal isn't set, which caused "error the terminal is not fully functional" in an Interix shell. I guess this is because POSIX.EXE doesn't set TERM to "interix". I solved that problem by putting export TERM=interix into my profile.lcl. This works great until you want to switch to alternate terminals like XTerm and RXVT. Then this solution sux because you have to constantly set TERM manually in the alternate terminals.
Now that I've looked at the code for BASH 3.00, I realize that the real fix is for BASH to default to TERM=interix when TERM is not set, at least when BASH is being built for Interix.
The key points where BASH decides to fail over to TERM=dumb are in variables.c and lib/readline/terminal.c. I made the change to default the TERM=interix. Viola all better now: When I log in with POSIX.EXE TERM=interix and when I log in with RXVT or XTerm TERM=xterm. All this happens automatically. Like I said in previous posts, that is as it should be.
I'm still looking to Rodney to fix the issue with getcwd.
Here are the diffs.
% diff -u variables.c.old variables.c
--- variables.c.old Sun Jul 4 13:57:26 2004
+++ variables.c Sat Oct 23 21:29:49 2004
@@ -361,8 +361,13 @@
#if 0
set_auto_export (temp_var); /* XXX */
#endif
-
+#ifndef __INTERIX
temp_var = set_if_not ("TERM", "dumb");
+#else /* __INTERIX */
+/* For Interix, we want to make sure that TERM defaults to interix because the
POSIX vtty doesn't
+set TERM explicitly. breiter@wolfereiter.com */
+ temp_var = set_if_not ("TERM", "interix");
+#endif
#if 0
set_auto_export (temp_var); /* XXX */
#endif
% diff -u lib/readline/terminal.c.old lib/readline/terminal.c
--- lib/readline/terminal.c.old Sat Oct 23 20:58:57 2004
+++ lib/readline/terminal.c Sat Oct 23 21:29:49 2004
@@ -366,7 +366,13 @@
_rl_screenwidth = _rl_screenheight = 0;
if (term == 0)
+#ifndef __INTERIX
term = "dumb";
+#else /* __INTERIX */
+/* For Interix, we want to make sure that TERM defaults to interix because the
POSIX vtty doesn't
+set TERM explicitly. breiter@wolfereiter.com */
+ term = "interix";
+#endif
/* I've separated this out for later work on not calling tgetent at all
if the calling application has supplied a custom redisplay function,
|
|
|
RE: new bash? - Oct. 24, '04, 8:17:19 AM
|
|
|
jonsmi
Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
|
quote:
You may recall my complaining about BASH behavior with RXVT: BASH misbehaves until I set the export TERM=xterm.
Have you tried to set this environment variable globally in Settings, Control Panel, System, Advanced, Environment Variables? I had to so explicitly once I tested MKS
8.5/8.6, cause after that the same error message was generated:
"error the terminal is not fully functional" in an Interix shell
And this solved the problem (thanks to Mark pointing it out).
While we're at it: We both agreed that bash 3.0 compiled fine "right out of the
box". This held true on my test machine, which mainly runs Linux, but then I thought
it was time to apply all updates from Interop (perhaps the idea with the CD, hopefully
later a DVD , is not so bad at all)
After that, I don't manage to compile bash 3.0 anymore, neither on the test machine
nor my two production systems (which I usually treat with the utmost care).
Our good friend inet_aton is back in town again, in bash-3.0/lib/sh/netopen.c.
It is as well in the same file in bash 2.05b.0(2). Am just about to study the
source code there. Hove now with bash 3.0 -- it starts with ./configure
checking for getservent... yes
checking for inet_aton... yes
checking for vsnprintf... yes
This gets reflected in bash-3.0/config.h:
/* Define if you have the inet_aton function. */
#define HAVE_INET_ATON 1
All right we all know by now: we have two ways to access inet_aton:
(1)$ man inet_aton
inet_aton(3) inet_aton(3)
inet_aton()
NAME
inet_aton(), inet_addr(), inet_network(), inet_ntoa(), inet_makeaddr(),
inet_lnaof(), inet_netof() - Internet address manipulation routines
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
(2) $ strings /usr/local/lib/libbind.a | grep inet_aton
___inet_aton
___inet_aton
___inet_aton
___inet_aton
___inet_aton
And if I got i right, the preferred way is to add a line like this one:
-L /usr/local/lib -lbind
Seems like this Makefile should be the right one to edit: lib/sh/Makefile.
So far all my endeavorers have been in vain, and I don't come around this stop code
(unfortunately time is very limited, due to alt.family.babys):
ringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o
-lbuiltins -lsh -lreadline -lhistory -ltermcap -lglob -ltilde -lintl -liconv
lc -ldl
./lib/sh/libsh.a(netopen.o)(.text+0x27):netopen.c: undefined reference to `___i
et_aton'
collect2: ld returned 1 exit status
*** Error code 1
Stop.
What about you? No problems with inet_aton?
|
|
|
RE: new bash? - Oct. 24, '04, 8:22:11 AM
|
|
|
jonsmi
Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
|
quote:
quote:
You may recall my complaining about BASH behavior with RXVT: BASH misbehaves until I set the export TERM=xterm.
Sorry, I meant TERM=interix -- which you know place in profile.lcl.
|
|
|
RE: new bash? - Oct. 24, '04, 9:33:52 AM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Just a guess but did you have BIND 9 installed before when it worked?
I have had BIND 9 break my builds of ClamAV with interal structures in arpa/inet.h of BIND 9. Uninstalling BIND 9 fixed my issues. It only seemed to affect ClamAV, but Rodney was intrigued.
If it breaks BASH as well, then there inductively must be something wrong with BIND 9 or some common assumption in the Linux/GNU world about the way that BIND works that doesn't hold true for the Interix BIND 9.
|
|
|
RE: new bash? - Oct. 25, '04, 1:57:15 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
I've just finished unburying myself to get to building bash 3.0.
For BIND 9 the only issue was adding "-lbind" to the list of libraries to link with.
There are issues that are outstanding for me to fix. There is the globbing problem
that shows up each time. There is a fix the TERM problem provided by Reid Madsen
many month ago. So I'll use those changes.
(of source other thing are coming to bury me by the looks of the incoming mail...)
|
|
|
RE: new bash? - Oct. 25, '04, 9:04:32 PM
|
|
|
breiter
Posts: 294
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
quote:
For BIND 9 the only issue was adding "-lbind" to the list of libraries to link with.
I'm sorry for being dense, but how did you do that? And while I'm asking, how did you fix the problem with getcwd?
Could you please post a diff or something so that I can follow and learn from?
Thanks.
|
|
|
RE: new bash? - Oct. 25, '04, 11:18:15 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
> I'm sorry for being dense, but how did you do that?
With bash I modified the configure file to identify "interix3*" and
set a bunch of environment variables including, for BIND specifically, the
LOCAL_LIBS.
> And while I'm asking, how did you fix the problem with getcwd?
I didn't run into the problem (luck of the Irish I guess).
> Could you please post a diff or something so that I can follow and learn from?
The full sources I'll get up on the ftp site later. All are mark with "__INTERIX"
except for the configure changes which are "interix3". The changes are pretty much
like the changes with 2.0. But I have the OpenSSH 3.9 binaries to put on site first.
|
|
|
RE: new bash? - Oct. 26, '04, 2:50:07 PM
|
|
|
jonsmi
Posts: 168
Joined: Aug. 12, '03,
From: Oslo, Norway
Status: offline
|
quote:
I've just finished unburying myself to get to building bash 3.0.
For BIND 9 the only issue was adding "-lbind" to the list of libraries to link with.
Yes, that's what I also ended up with, alas only theoretical, as there was no
time for computers. To answer, Brian, no I did not have bind installed, when
it worked, so it was bind I suspected, and that it had to be done with
lbind, but in which Makefile, where and how -- very curious and anxious to
learn.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|