From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Sun, 24 Mar 2002 04:20:19 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 173 ************************************************** Saturday 23 March 2002 Number 173 ************************************************** Subjects for today 1 Re: Ncurses build problem : Andreas Buening 2 New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 : Jun Sawataishi 3 Re: Using START in a shell script : Jun Sawataishi 4 Re: Ncurses build problem : Thomas E. Dickey" 5 [Fwd: Bug In istallpkg.cmd] : Ted Sikora 6 Re: IFS in shell scripts : Thomas Dickey 7 Re: New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 : Dave and Natalie" 8 Re: Ncurses build problem : John Poltorak 9 Re: Ncurses build problem : John Poltorak 10 Re: Re: Running ./configure : Dave and Natalie" 11 Re: Re: Running ./configure : Dave and Natalie" 12 Re: IFS in shell scripts : Thomas Dickey 13 IFS in shell scripts : John Poltorak 14 Re: Re: Running ./configure : Adrian Gschwend" 15 Re: IFS in shell scripts : Thomas Dickey 16 Re: Porting Joe's Own Editor (JOE) : Marty" 17 Re: AWK & SED : John Poltorak 18 Re: New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 : John Poltorak 19 Re: Re: Running ./configure : John Poltorak 20 Re: IFS in shell scripts : John Poltorak **= Email 1 ==========================** Date: Sun, 24 Mar 2002 02:01:49 +0100 From: Andreas Buening Subject: Re: Ncurses build problem John Poltorak wrote: > > On Fri, Mar 22, 2002 at 05:47:27PM +0000, John Poltorak wrote: > > On Fri, Mar 22, 2002 at 12:35:42PM -0500, Thomas E. Dickey wrote: > > > On Fri, 22 Mar 2002, John Poltorak wrote: > > > > > > > > > > > I've managed to build NCURSES previously, but I'm trying to do it again > > > > in a clean environment without years of accumulated files to determine > > > > exactly what it requires. Unfortunately I can't get configure to run. > > > > It complains about the C compiler being unable to create executables. > > > > > > did you regenerate the configure script? > > > > Yes. > > > > I've got it running now. The problem was due to $TMP AFAICT. > > Having said that, I can get NCURSES' configure to run from a standalone > CMD file, but if this called from a shell script it fails with the msg > above. > > How can this be? It is using exactly the same code, so there must be > something in the environment causing it to succeed or fail. However the > error msg about creating executables must be questionable. configure complains that it is not able to create an executable just after determining the object file extension? This happens sometimes. If I remember correctly (please read the following with caution, I'm not sure about this) this happens due to corrupted env. vars. like EMXSHELL="ksh " (but I don't remember which ones are the candidates). I vaguely remember that gcc is really unable to produce that executable. This means if you fiddle out what configure is doing and if you enter that gcc command line into the same shell it will fail, too. :-( [snip] bye, Andreas -- One OS to rule them all, One OS to find them, One OS to bring them all and in the darkness bind them In the Land of Redmond where the Shadows lie. **= Email 2 ==========================** Date: Sun, 24 Mar 2002 04:26:46 +0900 From: Jun Sawataishi Subject: New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 As I have mentioned before, GNU bash version 2.05a and GNU texinfo version 4.1 have been uploaded in my web page. Both package contain diff files and os2unix utility, so re-compilation is very easy (do not use autoconf). bash 2.05a: improved a lot - static link with ncurses 5.2 modified by me - file name completion with menu - drive selection with menu - bash can be used as file viewer (for text, photo, etc....) - properly recognize window size in XFree86 for OS/2 - file name completion in XFree86 is okay - useful functions defined ( test function handles "-x" flag ) - searches for $UNIXROOT/etc/profile - assume $UNIXROOT/usr/share/terminfo as terminfo directory - a patch for Japanese code applied .................... See http://homepage1.nifty.com/jsawa/gnu/README_bash-2.05a.os2 Visit http://www2s.biglobe.ne.jp/~vtgf3mpr/gnu/bash.htm texinfo 4.1: Alt-key works fine as compared to previous one - assume $UNIXROOT/usr/share/terminfo as terminfo directory - assume $UNIXROOT/usr/share/locale as locale directory - a patch for Japanese code applied to texindex.exe and makeinfo.exe - both zip and rpm package available # OS/2 is not a question, it's a solution. # SAWATAISHI Jun # http://www2s.biglobe.ne.jp/~vtgf3mpr/index-e.htm **= Email 3 ==========================** Date: Sun, 24 Mar 2002 05:03:07 +0900 From: Jun Sawataishi Subject: Re: Using START in a shell script At Sat, 23 Mar 2002 19:35:11 +0000, John Poltorak wrote: > > Is it possible to START a cmd file form a shell script? > > I can't find a way of doing it... - for *.com / *.exe cmd.exe /c start /f /n PROGRAM - for *.cmd cmd.exe /c start /f /c PROGRAM # OS/2 is not a question, it's a solution. # SAWATAISHI Jun # http://www2s.biglobe.ne.jp/~vtgf3mpr/ **= Email 4 ==========================** Date: Sun, 24 Mar 2002 06:52:56 -0500 (EST) From: "Thomas E. Dickey" Subject: Re: Ncurses build problem On Sun, 24 Mar 2002, John Poltorak wrote: > This creates the variable CFLAGS and sets it to nul. What I think I need > is to do destroy this variable if it is set to nul, or find some > alternative way of parsing the line. Suggestions welcome... various shells have either an unsetenv or unset (which sometimes coincide). -- T.E.Dickey http://invisible-island.net ftp://invisible-island.net **= Email 5 ==========================** Date: Sun, 24 Mar 2002 07:31:26 -0500 From: Ted Sikora Subject: [Fwd: Bug In istallpkg.cmd] Mike Fry wrote: > > There is a small bug in installpkg.cmd. > > Basically, there are a series if OS/2 copy commands that use the REXX > variable unixroot. When resolved, this variable ends up with '/' > characters in the constructed pathname. The OS/2 copy command does not > work with '/' characters: only '\'. > > -- > > Mike Fry > email - mikefry at iafrica.com -- Ted Sikora tsikora at ntplx.net **= Email 6 ==========================** Date: Sun, 24 Mar 2002 09:08:30 -0500 From: Thomas Dickey Subject: Re: IFS in shell scripts On Sun, Mar 24, 2002 at 12:43:42PM +0000, John Poltorak wrote: > If I define IFS as a TAB does a single tab specify a field seperator? > ie if there are two tabs together are they interpreted as a single tab by > the shell? > > > I want to set up a line such as:- > > > p1TABp2TABp3TABp4 > > How do I specify a nul value for p2? by quoting it, e.g., p1TAB""TABp3TABp4 > What happens if I actually have? :- > > > abcTABTABxyzTAB123 > > > does p2 take the value xyz or nul ? generally multiple separators in shell scripts are treated as one. however, some applications (such as cut) count the number of separators. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 7 ==========================** Date: Sun, 24 Mar 2002 09:31:49 -0800 From: "Dave and Natalie" Subject: Re: New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 On Mon, 25 Mar 2002 00:04:58 +0900, Jun Sawataishi wrote: >At Sat, 23 Mar 2002 22:39:23 -0800, >Dave and Natalie wrote: >> On Sun, 24 Mar 2002 04:26:46 +0900, Jun Sawataishi wrote: >> > - static link with ncurses 5.2 modified by me >> http://homepage1.nifty.com/jsawa/gnu/ncurses-5.2.zip seems to be corrupt. It is 70k instead of 460k > >Sorry to trouble you. I just re-uploaded ncurses-5.2.zip. >Please re-try again. Note that file size is changed from 460k to 261k. Ok got it this time. Thanks. Oh what have you modified in ncurses? Dave **= Email 8 ==========================** Date: Sun, 24 Mar 2002 09:50:50 +0000 From: John Poltorak Subject: Re: Ncurses build problem On Sat, Mar 23, 2002 at 05:52:43PM -0500, Thomas Dickey wrote: > On Sat, Mar 23, 2002 at 10:21:21PM +0000, John Poltorak wrote: > > > So, it looks like the difference is down to CFLAGS, but I don't see where > > they are set... > > > > Does the configure script set a default value if nothing exists? > > The convention is to leave variables such as $CFLAGS alone if they have > been set, and otherwise try to determine an appropriate value for them. What I am wanting to do is develop a standard build system for UnixOS/2 apps. A key part of this system is a parameter table which contains specific variables for all the apps. I have now found the reason that the build of NCURSES was failing was because of the CFLAGS setting, CFLAGS being one of the variable fields getting evaluated from the parameter table. The entries in the table are currently:- appname archive-name CFLAGS LDFLAGS configure-parms etc. The fields are tab delimited, and in the case of NCURSES there was no value set for CFLAGS, so I'm not sure what $CFLAGS would get set to. It looks as though CFLAGS is getting set to nul and as a result overides the default in NCURSES. If this is the case, I'd like to know how to remove CFLAGS if it is set to nul... If I can get over this hurdle, then NCURSES will fit into my build system quite nicely, although I still have the issue of multiple versions of Autoconf to deal with. If anyone has any suggestions about the best way to incorporate the co-existance of several versions of Autoconf, I'd like hear them. > -- > Thomas E. Dickey > http://invisible-island.net > ftp://invisible-island.net -- John **= Email 9 ==========================** Date: Sun, 24 Mar 2002 10:13:38 +0000 From: John Poltorak Subject: Re: Ncurses build problem On Sun, Mar 24, 2002 at 02:01:49AM +0100, Andreas Buening wrote: > John Poltorak wrote: > > Having said that, I can get NCURSES' configure to run from a standalone > > CMD file, but if this called from a shell script it fails with the msg > > above. > > > > How can this be? It is using exactly the same code, so there must be > > something in the environment causing it to succeed or fail. However the > > error msg about creating executables must be questionable. > > configure complains that it is not able to create an executable > just after determining the object file extension? The problem is due to $CFLAGS being set incorrectly. When the standalone CMD file is run, no attempt is made to set a value for CFLAGS, so NCURSES uses its default (-g -O -Zcrtdll) and this works fine. When the same code is called from my shell script, then CFLAGS is evaluated from a parameter table which doesn't contain any value for CFLAGS itself but does appear to set it to something even if it is null (which sounds like a contradiction) and in turn overrides NCURSES default. I'm not sure how to handle it. Basically, I parse a line which contains a set of values appropriate to the app being built like so:- read p1 ARCHIVE CFLAGS LDFLAGS PARMS SRC < temp This creates the variable CFLAGS and sets it to nul. What I think I need is to do destroy this variable if it is set to nul, or find some alternative way of parsing the line. Suggestions welcome... > [snip] > > bye, > Andreas -- John **= Email 10 ==========================** Date: Sun, 24 Mar 2002 12:07:43 -0800 From: "Dave and Natalie" Subject: Re: Re: Running ./configure On Sat, 23 Mar 2002 16:16:00 +0100, Andreas Buening wrote: >> X11make install has always worked. Newer makes work for make install as well. > >Okay, I should have been more precise: it doesn't work >if your prefix dir contains a drive letter unless you >use a patched mkinstalldirs or the newest autoconf 2.52x+. >(and please don't tell me that I must never use a drive >letter because a) it's not Posix and b) it's much more >fun if the program behaves different on different drives) > Ok, I guess I just never tried using a drive letter as my compiles are just for personal use and for my setup I don't need a driveletter. Dave **= Email 11 ==========================** Date: Sun, 24 Mar 2002 12:19:47 -0800 From: "Dave and Natalie" Subject: Re: Re: Running ./configure On Sun, 24 Mar 2002 19:22:17 +0000, John Poltorak wrote: > >Actually, I don't think Slackware is particulary FHS compliant and I'd >really like to start rebuilding all the packages fairly soon from scratch >using a better directory structure. So far I have been sticking slavishly >to Slackware's structure which means that certain packages, such as the >GNU Text Utils (TXTUTILS) have executables split between /bin and >/usr/bin. I don't particularly like this split and it looks fairly >arbitrary to me. The idea is that /bin contains a mininium enviroment to get things done in a rescue situation, eg if /usr can't be mounted. Two thoughts, /bin could be forced to be on the boot drive so that if other partitions can't be loaded you would still have a mininium enviroment. Or what I have done is to put /bin first in the path so prgrams like dir that have OS/2 equivalents will be found first. This way users could decide wether to have /usr/bin near the beginning of $PATH or later if they don't use unixos2 very often. Dave **= Email 12 ==========================** Date: Sun, 24 Mar 2002 12:40:38 -0500 From: Thomas Dickey Subject: Re: IFS in shell scripts On Mon, Mar 25, 2002 at 12:38:32AM +0900, Jun Sawataishi wrote: > At Sun, 24 Mar 2002 12:43:42 +0000, > John Poltorak wrote: > > If I define IFS as a TAB does a single tab specify a field seperator? > > ie if there are two tabs together are they interpreted as a single tab by > > the shell? > > I want to set up a line such as:- > > p1TABp2TABp3TABp4 > > How do I specify a nul value for p2? > > What happens if I actually have? :- > > abcTABTABxyzTAB123 > > does p2 take the value xyz or nul ? > Using sh, ksh, and bash I tested how IFS worked. ash does it differently from bash and pdksh. (you probably do not have sh except as a copy of one of those - a quick check with /bin/sh on Solaris shows no null strings, while ksh shows similar results to your test with 'sh'). (on Slackware 8.0), ash gives -a_ -b_ -_ -c_ -a_ -b_ -_ -c_ -a_ -b_ -_ -c_ -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 13 ==========================** Date: Sun, 24 Mar 2002 12:43:42 +0000 From: John Poltorak Subject: IFS in shell scripts If I define IFS as a TAB does a single tab specify a field seperator? ie if there are two tabs together are they interpreted as a single tab by the shell? I want to set up a line such as:- p1TABp2TABp3TABp4 How do I specify a nul value for p2? What happens if I actually have? :- abcTABTABxyzTAB123 does p2 take the value xyz or nul ? -- John **= Email 14 ==========================** Date: Sun, 24 Mar 2002 14:07:54 +0100 (CET) From: "Adrian Gschwend" Subject: Re: Re: Running ./configure On Sat, 23 Mar 2002 21:25:43 +0000, John Poltorak wrote: Hi John, >We've come a long way in the last year, thanks to great efforts by >yourself and a number of other porters. I would like to thank everyone on the list too, especially you! It's great to see that the unixos2 effort is heading into the right direction. There is still a lot of work to do but what you did with FHS-like packages and the effort for pushing UNIXROOT is really great! I hope we can improve again this year, it looks good so far! I just hope we find a good way to clone Holger and some other members on this list soon ;-))) cu Adrian -- Adrian Gschwend at OS/2 Netlabs ICQ: 22419590 ktk at netlabs.org ------- The OS/2 OpenSource Project: http://www.netlabs.org **= Email 15 ==========================** Date: Sun, 24 Mar 2002 15:15:01 -0500 From: Thomas Dickey Subject: Re: IFS in shell scripts On Sun, Mar 24, 2002 at 08:00:43PM +0000, John Poltorak wrote: > On Mon, Mar 25, 2002 at 12:38:32AM +0900, Jun Sawataishi wrote: > > > If you want to set a null string, do not use as IFS. > > It's always tricky picking the correct field seperator because it may have > special significance in certain situations, or it may occur as an embedded > character somewhere. > > Which character is the best candidate as a field seperator? you could try using another control character, such as ^A. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 16 ==========================** Date: Sun, 24 Mar 2002 16:34:38 -0500 (EST) From: "Marty" Subject: Re: Porting Joe's Own Editor (JOE) Stripping down the termcap entry further, I think I've got JOE working without any drawing glitches. It's even working with multiple sub-windows. (Hit CTRL-K O to split the current window into two, and both windows will update correctly.) Shelling out seems to be working. I did a CTRL-K E (edit) and used "!DIR" as the filename, and it opened up a new editor window with the directory contents in it. Integrated shells are not working, however (CTRL-K ') because it says that no "ptys" were available. I don't anticipate that being fixed any time soon. Also, piping output into JOE seems to be working perfect also. Running "dir | joe -" will bring up the directory in an edit window. I'd say it's just about fully functional and probably could be included in a distribution. Here's the termcap entry that I used: OS2CMD:\ :co#80:li#25:\ :cm=\E[%i%d;%dH:\ :nd=\E[C:\ :so=\E[1;35;44m:se=\E[0;44m:\ :us=\E[1;31;44m:ue=\E[0;44m:\ :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[0;44m:\ :ti=\E[0;44m:te=\E[0m:\ I'm going to update the joerc to wake up a few more keys. PgUp and PgDn aren't working (but you can use CTRL-U and CTRL-V respectively instead). I'm also going to update some of the help text to make sure the key bindings match the help text. But right now, it's an incredibly useful tool for working with large files. I just pulled in a 230MB file in 8 seconds and can edit it with ease. I can't do that with any other OS/2 editor that I know of. **= Email 17 ==========================** Date: Sun, 24 Mar 2002 16:40:08 +0000 From: John Poltorak Subject: Re: AWK & SED On Sat, Mar 23, 2002 at 06:53:38PM +0100, Michael Zolk wrote: > On Sat, Mar 23, 2002 at 10:43:17AM +0000, John Poltorak wrote: > > On Sat, Mar 23, 2002 at 01:28:34AM +0100, Adrian Gschwend wrote: > > > Hi all, > > > > > > I hope it's not a too stupid question, are SED and AWK already > > > available as unixos2-like package? I found no zip files in > > > unixos2/packages, are they contained somewhere else or are they simply > > > not yet packaged? > > > > They are here:- > > > > ftp://unixos2.com/pub/unixos2/unixos2-current/unixos2/a1/bin.zip > > > > along with around 40 other programs > > Do you really think it is a good idea to lump dozens of completely unrelated > executables together in one big pkg? Not really. I don't know why it is done like that in Slackware, but someone must have made that decision. > Personally, I would prefer it if I could > install the programs I need separately. It won't make any difference once UnixOS/2 is available as a full distro since BIN will be a required package. What we are aiming at is proper distro rather than people picking and choosing individual apps. Of course, anyone is free to put together their own package such as the the GNUPACK, but I don't thin we are in a position to start rearranging something based on Slackware until we have a much fuller set of apps. > > Michael > -- -- John **= Email 18 ==========================** Date: Sun, 24 Mar 2002 16:44:15 +0000 From: John Poltorak Subject: Re: New binary package for GNU Bash 2.05a and GNU Texinfo 4.1 On Mon, Mar 25, 2002 at 12:04:58AM +0900, Jun Sawataishi wrote: > At Sat, 23 Mar 2002 22:39:23 -0800, > Dave and Natalie wrote: > > On Sun, 24 Mar 2002 04:26:46 +0900, Jun Sawataishi wrote: > > > - static link with ncurses 5.2 modified by me > > http://homepage1.nifty.com/jsawa/gnu/ncurses-5.2.zip seems to be corrupt. It is 70k instead of 460k > > Sorry to trouble you. I just re-uploaded ncurses-5.2.zip. > Please re-try again. Note that file size is changed from 460k to 261k. How does your port of NCURSES differ from the real thing? Since the real version of NCURSES does include OS/2 and will actually build straight out of the box (given the correct Autoconf) is there any point in creating a seperate version? It will only serve to confuse people... -- John **= Email 19 ==========================** Date: Sun, 24 Mar 2002 19:22:17 +0000 From: John Poltorak Subject: Re: Re: Running ./configure On Sun, Mar 24, 2002 at 02:07:54PM +0100, Adrian Gschwend wrote: > On Sat, 23 Mar 2002 21:25:43 +0000, John Poltorak wrote: > > Hi John, > > >We've come a long way in the last year, thanks to great efforts by > >yourself and a number of other porters. > > I would like to thank everyone on the list too, especially you! Thanks, but I'm only trying to repackage the work that other people are providing. Not being a C programmer makes me feel particularly hamstrung as far as getting any porting done. > It's > great to see that the unixos2 effort is heading into the right > direction. There is still a lot of work to do but what you did with > FHS-like packages and the effort for pushing UNIXROOT is really great! Actually, I don't think Slackware is particulary FHS compliant and I'd really like to start rebuilding all the packages fairly soon from scratch using a better directory structure. So far I have been sticking slavishly to Slackware's structure which means that certain packages, such as the GNU Text Utils (TXTUTILS) have executables split between /bin and /usr/bin. I don't particularly like this split and it looks fairly arbitrary to me. > I hope we can improve again this year, it looks good so far! I just > hope we find a good way to clone Holger and some other members on this > list soon ;-))) I think that once the correct build toolset is defined and available people won't face the same frustrations as some of us have experienced over the last year. It's only by more people trying things out and relaying any problems that we can hope to refine the final product. So I'd urge anyone who hasn't already done so to build a package on OS/2. Maybe try building Perl - it's a very useful exercise, and quite satisfying when you come up with a final runnable PERL.EXE. > cu > > Adrian > > > > -- > Adrian Gschwend > at OS/2 Netlabs -- John **= Email 20 ==========================** Date: Sun, 24 Mar 2002 20:00:43 +0000 From: John Poltorak Subject: Re: IFS in shell scripts On Mon, Mar 25, 2002 at 12:38:32AM +0900, Jun Sawataishi wrote: > If you want to set a null string, do not use as IFS. It's always tricky picking the correct field seperator because it may have special significance in certain situations, or it may occur as an embedded character somewhere. Which character is the best candidate as a field seperator? > > > # OS/2 is not a question, it's a solution. > # SAWATAISHI Jun > # http://www2s.biglobe.ne.jp/~vtgf3mpr/ -- John