From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Fri, 22 Mar 2002 04:20:12 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 171 ************************************************** Thursday 21 March 2002 Number 171 ************************************************** Subjects for today 1 Re: Using SLANG : Thomas Dickey 2 Re: Using SLANG : csaba.raduly at sophos.com 3 curses.h : John Poltorak 4 Re: Re: Running ./configure : csaba.raduly at sophos.com 5 Re: Using SLANG : John Poltorak 6 Re: Using SLANG : csaba.raduly at sophos.com 7 Re: Using SLANG : John Poltorak 8 Re: Using SLANG : John Poltorak 9 Re: Ncurses build problem : Thomas E. Dickey" 10 Re: Perl test time-out : John Poltorak 11 Perl 5.6.1 won't fork()? : Edwin =?iso-8859-1?Q?G=FCnthner?= 12 Re: Using SLANG : csaba.raduly at sophos.com 13 Ncurses build problem : John Poltorak 14 Re: AWK & SED : Dave and Natalie" 15 Re: Ncurses build problem : John Poltorak 16 Re: Texinfo v4.1 : Jun Sawataishi 17 Re: Running ./configure : Jun Sawataishi **= Email 1 ==========================** Date: Fri, 22 Mar 2002 06:28:55 -0500 From: Thomas Dickey Subject: Re: Using SLANG On Fri, Mar 22, 2002 at 10:46:44AM +0000, John Poltorak wrote: > > $(CURSES_H): > echo '#include ' > $(CURSES_H) > > > The error above is due to ..\curses.h looking like this:- > > "#include " > > Is this because I'm using the wrong shell? > > In this case I ran it under CMD.EXE. > > Something is translating ' to " rather than treating it as a delimiter. probably the make program, attempting to accommodate differences in shells. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 2 ==========================** Date: Fri, 22 Mar 2002 10:07:34 +0000 From: csaba.raduly at sophos.com Subject: Re: Using SLANG On 21/03/2002 19:58:19 Thomas Dickey wrote: >On Thu, Mar 21, 2002 at 07:18:53PM +0000, John Poltorak wrote: >> I've built libslang for SLANG v1.4.5 but can't seem to build any of the >> programs in the curses directory. > >iirc, the curses compatibility is ifdef'd only for Unix systems. > Not necessarily, I've built the curses compatibility demos before. (my slang is 1.4.1) In src/slcurses.h, there are the following definitions: #define COLS SLtt_Screen_Cols #define LINES SLtt_Screen_Rows rain.c includes Slang comes with its own curses.h, which includes slcurses.h My guess is that you are picking up the "real" curses.h EMX's curses.h just includes , which has extern int COLS, LINES ; That should've caused link errors, not compile errors. >> gcc -g -DSLANG -I.. rain.c -o rain -L../objs -lslang >> In file included from rain.c:1: >> ..\curses.h:1: parse error before string constant Uhh, something's wrong with your curses.h, check it out. The makefile in src/curses creates a ../curses.h by writing #include in it. Looks like that went wrong. -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 3 ==========================** Date: Fri, 22 Mar 2002 10:09:17 +0000 From: John Poltorak Subject: curses.h What should curses.h contain? EMX has:- #include I propose we adopt:- #include -- John **= Email 4 ==========================** Date: Fri, 22 Mar 2002 10:15:25 +0000 From: csaba.raduly at sophos.com Subject: Re: Re: Running ./configure On 21/03/2002 21:38:20 owner-os2-unix wrote: [snip] >> set EMXSHELL=sh > >Is this requied still? > The EMX "system()" function uses that to determine which shell to launch. If it isn't set, it'll use whatever is in COMSPEC (most likely CMD.EXE) That'll break e.g. autoconf quite badly :-( >> export ac_executable_extensions=".exe" (!!!) > >Not settable under CMD.EXE AFAIK - only under a SHELL. That's clearly shell syntax. CMD.EXE uppercases ac_executable_extensions (i.e. the left side), otherwise it works, without the quotes even. >> a reasonable shell (pdksh?) > >I've stopped using PDKSH with AUTOCONF because it won't allow me to use >a path such as 'c:\usr\bin' > What's wrong with c:/usr/bin ? [snip] >> >> You also need config.sub and config.guess (from >> ftp://ftp.gnu.org/gnu/config?) >> >> Quite easy, isn't it? ;-) > > >ARRRGGGHHHHH!!!!!!!!!!!! > That sums up the current situation nicely. -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 5 ==========================** Date: Fri, 22 Mar 2002 10:46:44 +0000 From: John Poltorak Subject: Re: Using SLANG On Fri, Mar 22, 2002 at 10:07:34AM +0000, csaba.raduly at sophos.com wrote: > > In src/slcurses.h, there are the following definitions: > > #define COLS SLtt_Screen_Cols > #define LINES SLtt_Screen_Rows > > rain.c includes > Slang comes with its own curses.h, which includes slcurses.h > > My guess is that you are picking up the "real" curses.h > EMX's curses.h just includes , which has > > extern int COLS, LINES ; > > That should've caused link errors, not compile errors. > > >> gcc -g -DSLANG -I.. rain.c -o rain -L../objs -lslang > >> In file included from rain.c:1: > >> ..\curses.h:1: parse error before string constant > > Uhh, something's wrong with your curses.h, check it out. > > The makefile in src/curses creates a ../curses.h by > writing #include in it. > Looks like that went wrong. Here's part of the Makefile:- CURSES_H = ../curses.h EXECS = rain blue hanoi firework \ bs battle gdc tclock worm view #knight newdemo testcurs xmas all: $(CURSES_H) $(EXECS) $(CURSES_H): echo '#include ' > $(CURSES_H) The error above is due to ..\curses.h looking like this:- "#include " Is this because I'm using the wrong shell? In this case I ran it under CMD.EXE. Something is translating ' to " rather than treating it as a delimiter. > -- > Csaba Ráduly, Software Engineer Sophos Anti-Virus > email: csaba.raduly at sophos.com http://www.sophos.com > US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 > -- John **= Email 6 ==========================** Date: Fri, 22 Mar 2002 11:36:59 +0000 From: csaba.raduly at sophos.com Subject: Re: Using SLANG On 22/03/2002 10:46:44 owner-os2-unix wrote: [snip] >> >> gcc -g -DSLANG -I.. rain.c -o rain -L../objs -lslang >> >> In file included from rain.c:1: >> >> ..\curses.h:1: parse error before string constant >> >> Uhh, something's wrong with your curses.h, check it out. >> >> The makefile in src/curses creates a ../curses.h by >> writing #include in it. >> Looks like that went wrong. > > >Here's part of the Makefile:- > >CURSES_H = ../curses.h > >EXECS = rain blue hanoi firework \ >bs battle gdc tclock worm view >#knight newdemo testcurs xmas > >all: $(CURSES_H) $(EXECS) > >$(CURSES_H): >echo '#include ' > $(CURSES_H) > > >The error above is due to ..\curses.h looking like this:- > >"#include " > >In this case I ran it under CMD.EXE. > Yes, with CMD.EXE you don't want any quotes. You might be better off putting this in the Makefile SHELL=/bin/rm errrrr, /bin/sh :-) HTH, -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 7 ==========================** Date: Fri, 22 Mar 2002 12:06:45 +0000 From: John Poltorak Subject: Re: Using SLANG On Fri, Mar 22, 2002 at 11:36:59AM +0000, csaba.raduly at sophos.com wrote: > > On 22/03/2002 10:46:44 owner-os2-unix wrote: > > [snip] > >> >> gcc -g -DSLANG -I.. rain.c -o rain -L../objs -lslang > >> >> In file included from rain.c:1: > >> >> ..\curses.h:1: parse error before string constant > >> > >> Uhh, something's wrong with your curses.h, check it out. > >> > >The error above is due to ..\curses.h looking like this:- > > > >"#include " > > > >In this case I ran it under CMD.EXE. > > > > Yes, with CMD.EXE you don't want any quotes. > You might be better off putting this in the Makefile > > SHELL=/bin/rm errrrr, /bin/sh :-) I found this line worked... echo #include ^ > $(CURSES_H) although subsequetly tried your suggestion which also worked. but now I get loads of errors due to undefined symbols, so it appears that that something is missing from slang.a. It was built using the self generate Makefile but apparently it needs -lvideo tadding to the link line, but it's a funny old makefile, and I may have put the line in the wrong place. Incidentally, is it possible to add the equivalent of -lvideo to the command line for make without amending the makefile? > HTH, > > -- > Csaba Ráduly, Software Engineer Sophos Anti-Virus > email: csaba.raduly at sophos.com http://www.sophos.com > US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 > -- John **= Email 8 ==========================** Date: Fri, 22 Mar 2002 12:14:19 +0000 From: John Poltorak Subject: Re: Using SLANG On Fri, Mar 22, 2002 at 06:28:55AM -0500, Thomas Dickey wrote: > On Fri, Mar 22, 2002 at 10:46:44AM +0000, John Poltorak wrote: > > > > $(CURSES_H): > > echo '#include ' > $(CURSES_H) > > > > > > The error above is due to ..\curses.h looking like this:- > > > > "#include " > > > > Is this because I'm using the wrong shell? > > > > In this case I ran it under CMD.EXE. > > > > Something is translating ' to " rather than treating it as a delimiter. > > probably the make program, attempting to accommodate differences in shells. It's looks like I can correct the problem by setting SHELL=/bin/sh in the environment before running make. > -- > Thomas E. Dickey > http://invisible-island.net > ftp://invisible-island.net -- John **= Email 9 ==========================** Date: Fri, 22 Mar 2002 12:35:42 -0500 (EST) From: "Thomas E. Dickey" Subject: Re: Ncurses build problem 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? > > How do I determine why it's failing? > > Can I run the same configure test from the command line? > > -- T.E.Dickey http://invisible-island.net ftp://invisible-island.net **= Email 10 ==========================** Date: Fri, 22 Mar 2002 12:36:12 +0000 From: John Poltorak Subject: Re: Perl test time-out On Thu, Mar 21, 2002 at 11:38:43AM -0500, Henry Sobotka wrote: > John Poltorak wrote: > > > > I'm running this test using the debugger... > > > > # Check if can fork with dynamic extensions (bug in CRT): > > if ($^O eq 'os2' and > > system "$^X -I../lib -MOpcode -e 'defined fork or die' > /dev/null 2>&1") { > > print "ok $_ # skipped: broken fork\n" for 2..5; > > exit 0; > > } > > > > print $^O says os2, but I can't work what the second condition is checking > > for... > > Its a system call to run perl ($^X) with include path ../lib, using the > Opcode module, and execute the inline script between single quotes that > tests whether or not fork is defined. Thanks for the detailed explanation. I'm finding I'm getting deeper into this than I wanted to go :-) Guess it will give me a better overview of how Perl works, in the long run. > > How do I display the output from the test? > > Direct it to something other than /dev/null. Unfortunately there is no output, it probably only exits with a code... > > > It looks as though it must be failing though. Why should that happen? > > The return value of the system call is 0, i.e. fork is defined, so the > condition is false. What is it that determines whether fork is defined? It looks like I either have something missing or it's returning the wrong information. > h~ -- John **= Email 11 ==========================** Date: Fri, 22 Mar 2002 14:12:37 +0100 From: Edwin =?iso-8859-1?Q?G=FCnthner?= Subject: Perl 5.6.1 won't fork()? Hi there, I am using the Perl 5.6.1 / 5.7.2 binaries avaiable from Hobbes. Today I tried to use fork() in one of my script and it failed (with both versions on several machines). It told me "not enough memory". Is that a setup problem or is that fork() wont work with those binaries? thx, **= Email 12 ==========================** Date: Fri, 22 Mar 2002 15:50:34 +0000 From: csaba.raduly at sophos.com Subject: Re: Using SLANG On 22/03/2002 12:06:45 owner-os2-unix wrote: [snip] > >Incidentally, is it possible to add the equivalent of -lvideo to the >command line for make without amending the makefile? Yes, but it's not going to do what I think you think it'll do :-) I think you'll need to modify the makefile. > >> -- >> Csaba Ráduly, Software Engineer Sophos Anti-Virus >> email: csaba.raduly at sophos.com http://www.sophos.com >> US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 >> Please don't quote signatures, it adds no useful information -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 13 ==========================** Date: Fri, 22 Mar 2002 16:56:27 +0000 From: John Poltorak Subject: Ncurses build problem 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. How do I determine why it's failing? Can I run the same configure test from the command line? -- John **= Email 14 ==========================** Date: Fri, 22 Mar 2002 17:08:26 -0800 From: "Dave and Natalie" Subject: Re: AWK & SED On Sat, 23 Mar 2002 01:28:34 +0100 (CET), Adrian Gschwend wrote: > You can always get them from Mr Sawataishi page. http://www2s.biglobe.ne.jp/~vtgf3mpr/index-e.htm Dave **= Email 15 ==========================** Date: Fri, 22 Mar 2002 17:47:27 +0000 From: John Poltorak Subject: Re: Ncurses build problem 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. > > > > How do I determine why it's failing? > > > > Can I run the same configure test from the command line? > > > > > > -- > T.E.Dickey -- John **= Email 16 ==========================** Date: Fri, 22 Mar 2002 22:16:37 +0900 From: Jun Sawataishi Subject: Re: Texinfo v4.1 At Tue, 19 Mar 2002 21:50:19 +0000, John Poltorak wrote: > On Wed, Mar 20, 2002 at 01:06:06AM +0900, Jun Sawataishi wrote: > > At Tue, 19 Mar 2002 12:30:35 +0000, > > John Poltorak wrote: > > > There has been a recent update to GNU Texinfo to v4.1 :- > > > ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-4.1.tar.gz > > > Are we likely to get an OS/2 port soon? > > I have already built version 4.1 and 4.1a. > > I just put a patch kit in my web directory. > > http://homepage1.nifty.com/jsawa/gnu/texinfo-4.1-OS2-patch.zip > Thanks, I have it now. > At some point, I would like to be able to build it using Autoconf... O.K. First, apply a diff file for C source (os2/C_Source.diff). Second, apply a diff file for Makefile.in's manually. Then execute autoconf. > > > > x:/src>tar zxvf SOMEWHERE/texinfo-4.1.tar.gz > > x:/src> cd texinfo-4.1 > > x:/src/texinfo-4.1> unzip SOMEWHERE/texinfo-4.1-OS2-patch.zip > > x:/src/texinfo-4.1> unzip OS2patch > > > > > > x:/src/texinfo-4.1> os2unix -ALL > > x:/src/texinfo-4.1> make > > > > If you'd like to make aout format executables > > > > x:/src/texinfo-4.1/src> make omf=no > > I have never understood all these different formats. Sorry to trouble you. It's my fault. "If you'd like to make omf format. make omf=on" By default, omf format executables will be built. > Do we have a standard for UnixOS/2 packages? And if so which *FLAGS > should be used for building? To avoid this time-comsuming problem, `os2unix' utility included in my patch kit uses `config.site' written by me. Read `os2/config.site' and you will know *FLAGS. > > John, If you have spare time to test and to make a package for > > newly built texinfo, please upload it in UNIXOS2 ftp site. > Yes, I will do, but I'd like to compare it against your config.log if > possible, just to make sure I haven't messed something up. To compare `config.log', I recommend you to build texinfo with `os2unix' utility and build one with autoconf. > Can I grab it from somewhere? May I mail you `config.log'? # OS/2 is not a question, it's a solution. # SAWATAISHI Jun # http://www2s.biglobe.ne.jp/~vtgf3mpr/ **= Email 17 ==========================** Date: Fri, 22 Mar 2002 23:30:05 +0900 From: Jun Sawataishi Subject: Re: Running ./configure At Wed, 20 Mar 2002 20:05:53 -0500 (EST), Stephen Amadei wrote: > Hello... I have most of the unixish tools installed on my OS/2 > system. I am trying to run the configure script in BASH to > try a quick compile of the SDTS libraries... but the configure script > won't find cc or gcc. I tried specifing the location of cc using > --prefix, but it still failed. How about using `os2unix' utility version 2.0 (Today, I uploaded the latest version). This utility modifies shell scripts including `configure' and Makefile.in's. http://www2s.biglobe.ne.jp/~vtgf3mpr/os2unix/os2unix.zip [12 kb] Most simple way to use it is: $ tar zxvf foo-version.tar.gz $ cd foo-version foo-version$ unzip SOMEWHERE/os2unix.zip foo-version$ os2unix -all foo-version$ os2unix -config foo-version$ make If you see a error message saying "XXX not installed", do like this. $ os2unix -c $ set CONFIG_SITE=os2/config.site $ sh configure # OS/2 is not a question, it's a solution. # SAWATAISHI Jun # http://www2s.biglobe.ne.jp/~vtgf3mpr/