Date: Sat, 24 Apr 2004 00:05:21 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 358 ************************************************** Friday 23 April 2004 Number 358 ************************************************** Subjects for today 1 Re: What to with wxWindows? : Stefan.Neis at t-online.de 2 Re: What to with wxWindows? : John Poltorak 3 Re: Sources of info : Knut Stange Osmundsen 4 Re: autoconf problem : Knut Stange Osmundsen 5 Re: BYACC : Knut Stange Osmundsen 6 RE: What to with wxWindows? : Dave Webster 7 Re: autoconf problem : John Poltorak 8 Re: autoconf problem : John Poltorak 9 Recreating aclocal.m4 : John Poltorak 10 Re: autoconf problem : Andreas Buening 11 Re: Recreating aclocal.m4 : Andreas Buening 12 testsuite for GNU ed : John Poltorak 13 Re: Recreating aclocal.m4 : Dave Yeo" 14 Re: testsuite for GNU ed : Dave Yeo" 15 Re: _wait3 : Dave Yeo" 16 Re: Recreating aclocal.m4 : John Poltorak 17 UNIX environment variables : John Poltorak 18 bc : John Poltorak 19 make install : John Poltorak **= Email 1 ==========================** Date: Thu, 22 Apr 2004 16:27:11 +0200 (CEST) From: Stefan.Neis at t-online.de Subject: Re: What to with wxWindows? John Poltorak schrieb: > > I think I've managed to compile wxWindows > What can I do with it now? And how do I check it built > correctly? > > Is there a recommended app for a first timer to try? configure should have generated samples (and demos) subdirectories containing various simple sample and more complex demos of wxWindows which you can try to compile (Simply change into a samples/demos directory and run make - don't forget to set MAKESHELL, though). Most of the samples compile on OS/2, though some of them don't quite work. Demos are probably currently still to complicated for the OS/2 port, though. Regards, Stefan **= Email 2 ==========================** Date: Thu, 22 Apr 2004 16:21:38 +0100 From: John Poltorak Subject: Re: What to with wxWindows? On Thu, Apr 22, 2004 at 04:27:11PM +0200, Stefan.Neis at t-online.de wrote: > John Poltorak schrieb: > > > > I think I've managed to compile wxWindows > > > What can I do with it now? And how do I check it built > > correctly? > > > > Is there a recommended app for a first timer to try? > > configure should have generated samples > (and demos) subdirectories containing various > simple sample and more complex demos of wxWindows which you can try to > compile > (Simply change into a samples/demos directory > and run make - don't forget to set MAKESHELL, > though). > Most of the samples compile on OS/2, though > some of them don't quite work. Demos are > probably currently still to complicated for > the OS/2 port, though. I tried the samples, three compiled, three didn't. Of those compiling, fractal was the only one which ran, the other two fell over with exceptions. Anyway, that the furthest I've got to far... I'll check the samples later. Which is the best place to provide feedback? The wxWindows-OS/2 list does not appear to be working. > Regards, > Stefan -- John **= Email 3 ==========================** Date: Thu, 22 Apr 2004 17:25:42 +0200 From: Knut Stange Osmundsen Subject: Re: Sources of info John Poltorak wrote: > On Thu, Apr 22, 2004 at 10:51:55AM +0100, John Poltorak wrote: > > >>If anyone can think of others, please add them. > > > Since we are hoping to comply with certain Unix standards, I think it is > important to check out FHS:- > > Filesystem Hierarchy Standard > > http://www.pathname.com/fhs/ > > There is also The Single UNIX Specification website - parts of Version 2 > are available here:- > > http://www.opengroup.org/onlinepubs/7908799/ > > v3 has been released but I haven't found a link to any updated online > information. There is a 2003 edition of SUS: http://www.opengroup.org/onlinepubs/007904975/ Kind Regards, knut **= Email 4 ==========================** Date: Thu, 22 Apr 2004 17:18:44 +0200 From: Knut Stange Osmundsen Subject: Re: autoconf problem John Poltorak wrote: > I've found a problem which occurs after running Autoconf (v2.59) on Bison, > but I don't see how it is related to autoconf. > > Bison (v1.875) itself builds straight out of the box using the supplied > configure script. It also builds after running autoconf first, but does > fail during 'make install' because the file stamp-vti in the doc directory > gets messed up... For some reason it gets the contents of the environment > prepended to it with this resultant error:- > > Making install in doc > make[1]: Entering directory `G:/ux2bs/workdir/bison-1.875/doc' > g:/bin/sh /ux2bs/workdir/bison-1.875/config/missing --run makeinfo -I . \ > -o bison.info `test -f 'bison.texinfo' || echo './'`bison.texinfo > ./version.texi:35: Unknown command `(#)PD'. > makeinfo: Removing output file `bison.info' due to errors; use --force to > preserve. > make[1]: *** [bison.info] Error 1 > make[1]: Leaving directory `G:/ux2bs/workdir/bison-1.875/doc' > make: *** [install-recursive] Error 1 > > > > The Makefile itself is identical to the one created without using > autoconf. > > Any ideas on what has happened? > > Is this a shell problem? No it's a shell utility problem IIRC - big IIRC! I remember having this problem when building docs for bison 1.35 or some other tool. The problem is IIRC the set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/bison.texinfo`; statement in the stamp-vti rule. (I'm looking at 1.35 makefile here, so it might not be identical. the problem is config/mdate-sh which doesn't manage to parse the output of OS/2 ls and writes nothing to stdout, thus causing the set command to be invoked without arguments. Here is a diff of mdate-sh in bison 1.35: diff -u -r1.1.1.1 -r1.2 --- mdate-sh 26 Jan 2004 21:43:31 -0000 1.1.1.1 +++ mdate-sh 26 Jan 2004 21:55:23 -0000 1.2 at at -40,8 +40,11 at at # The month is at least the fourth argument # (3 shifts here, the next inside the loop). shift -shift -shift +# OS/2 doesn't necessarily have group/user columns, so we skip two shifts +if test -z "$OS2_SHELL"; then + shift + shift +fi # Find the month. Next argument is day, followed by the year or time. month= Kind Regards, knut **= Email 5 ==========================** Date: Thu, 22 Apr 2004 17:33:40 +0200 From: Knut Stange Osmundsen Subject: Re: BYACC Andrew MacIntyre wrote: > On Tue, 20 Apr 2004, John Poltorak wrote: > > >>>Don't forget -Zstack. Many applications will crash occasionally >>>without a reasonable stack. >> >>I thought the default stacksize was 8MB if nothing was specified... > > > Only for a.out. Its much smaller (4k or 8k I think) for -Zomf. The default for the link386 and ilink is 8KB. Not that programs which are using .def files might specify the size there. That's the reason why emxomfld doesn't try specfiy a default stack size (it would have to check the .def file for any size) which was too much work for EM and lazy /me. Kind Regards, knut **= Email 6 ==========================** Date: Thu, 22 Apr 2004 10:48:03 -0500 From: Dave Webster Subject: RE: What to with wxWindows? Start with the samples, minimal, move to menu, try image, then toolbar, then try dialog. Those all used to work a couple of years ago. Beyond that, I never dealt with the rest of the samples. And never even attempted a compile of a demo. OS/2 port needs a massive overhaul in it's widget rendering. The plan, if I ever get a chance, is to introduce IOCL's ICoordinateSystem approach. And with anything overly complex you get unexplainable, almost impossible to debug PMMERGE traps. The two may be related. -----Original Message----- From: John Poltorak [mailto:jp at warpix.org] Sent: Thursday, April 22, 2004 10:22 AM To: os2-unix at mail.warpix.org Subject: Re: What to with wxWindows? On Thu, Apr 22, 2004 at 04:27:11PM +0200, Stefan.Neis at t-online.de wrote: > John Poltorak schrieb: > > > > I think I've managed to compile wxWindows > > > What can I do with it now? And how do I check it built > > correctly? > > > > Is there a recommended app for a first timer to try? > > configure should have generated samples > (and demos) subdirectories containing various > simple sample and more complex demos of wxWindows which you can try to > compile > (Simply change into a samples/demos directory > and run make - don't forget to set MAKESHELL, > though). > Most of the samples compile on OS/2, though > some of them don't quite work. Demos are > probably currently still to complicated for > the OS/2 port, though. I tried the samples, three compiled, three didn't. Of those compiling, fractal was the only one which ran, the other two fell over with exceptions. Anyway, that the furthest I've got to far... I'll check the samples later. Which is the best place to provide feedback? The wxWindows-OS/2 list does not appear to be working. > Regards, > Stefan -- John **= Email 7 ==========================** Date: Thu, 22 Apr 2004 18:36:12 +0100 From: John Poltorak Subject: Re: autoconf problem On Thu, Apr 22, 2004 at 05:18:44PM +0200, Knut Stange Osmundsen wrote: > > Making install in doc > > make[1]: Entering directory `G:/ux2bs/workdir/bison-1.875/doc' > > g:/bin/sh /ux2bs/workdir/bison-1.875/config/missing --run makeinfo -I . \ > > -o bison.info `test -f 'bison.texinfo' || echo './'`bison.texinfo > > ./version.texi:35: Unknown command `(#)PD'. > > makeinfo: Removing output file `bison.info' due to errors; use --force to > > preserve. > > make[1]: *** [bison.info] Error 1 > > make[1]: Leaving directory `G:/ux2bs/workdir/bison-1.875/doc' > > make: *** [install-recursive] Error 1 > > > > > > > > The Makefile itself is identical to the one created without using > > autoconf. > > > > Any ideas on what has happened? > > > > Is this a shell problem? > > No it's a shell utility problem IIRC - big IIRC! > I remember having this problem when building docs for bison 1.35 or some > other tool. The problem is IIRC the set `$(SHELL) > $(top_srcdir)/config/mdate-sh $$dir/bison.texinfo`; statement in the > stamp-vti rule. (I'm looking at 1.35 makefile here, so it might not be > identical. the problem is config/mdate-sh which doesn't manage to parse > the output of OS/2 ls and writes nothing to stdout, thus causing the set > command to be invoked without arguments. Ah yes, good old mdate-sh... I remember tearing my hair out when sed would not build properly for some mysterious reason. Now that you mention mdate-sh, I've checked my archives and found the best way to fix this. Andreas suggested this a couple of months ago:- run 'automake --add-missing --force-missing'. This will hopefully update _all_ automake files in your package, including mdate-sh. This works fine, although I still have no idea why make found it necessary to build the version.texi in one case, but not in the other. > Kind Regards, > knut -- John **= Email 8 ==========================** Date: Thu, 22 Apr 2004 18:52:00 +0100 From: John Poltorak Subject: Re: autoconf problem On Thu, Apr 22, 2004 at 06:36:12PM +0100, John Poltorak wrote: > run 'automake --add-missing --force-missing'. This will hopefully update > _all_ automake files in your package, including mdate-sh. > > > This works fine, although I still have no idea why make found it necessary > to build the version.texi in one case, but not in the other. Just found out why... stamp-vti: bison.texinfo $(top_srcdir)/configure at (dir=.; test -f ./bison.texinfo || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/bison.texinfo`; \ Obviously running autoconf rebuilds configure so stamp-vti is out of date with respect to it. Mystery solved! -- John **= Email 9 ==========================** Date: Thu, 22 Apr 2004 19:52:49 +0100 From: John Poltorak Subject: Recreating aclocal.m4 I get a msg saying I need to recreate aclocal.m4 with aclocal and run automake again. How do I do this? I was under the impression that running:- aclocal -I m4 would recreate aclocal.m4, but that isn't working... -- John **= Email 10 ==========================** Date: Thu, 22 Apr 2004 22:09:49 +0200 From: Andreas Buening Subject: Re: autoconf problem John Poltorak wrote: > Ah yes, good old mdate-sh... I remember tearing my hair out when sed would > not build properly for some mysterious reason. > run 'automake --add-missing --force-missing'. This will hopefully update > _all_ automake files in your package, including mdate-sh. FAQ FAQ FAQ FAQ FAQ

./version.texi:35: Unknown command `(#)PD'.

Problem: I'm trying to compile package xyz and make prints a message about ./version.texi:35: Unknown command `(#)PD'. which looks like the following:

Making install in doc
make[1]: Entering directory `G:/ux2bs/workdir/bison-1.875/doc'
g:/bin/sh /ux2bs/workdir/bison-1.875/config/missing --run makeinfo   -I . \
 -o bison.info `test -f 'bison.texinfo' || echo './'`bison.texinfo
../version.texi:35: Unknown command `(#)PD'.
makeinfo: Removing output file `bison.info' due to errors; use --force to 
preserve.
make[1]: *** [bison.info] Error 1
make[1]: Leaving directory `G:/ux2bs/workdir/bison-1.875/doc'
make: *** [install-recursive] Error 1

This usually happens after you have run one of the autotools or changed one of the configure files yourself. Then make tries to remake one or more .info files.

Reason: The mdate-sh file (usually in the 'doc' subdirectory) is outdated. Solution: 1) Rerun automake with the -f -a -c options. Note: if you don't specify the correct flavor (--gnu, --gnits, --foreign) automake may also install some files you don't need. If in doubt, start with --foreign. 2) Replace mdate-sh in your source package manually by /usr/share/.../mdate-sh. 3) As a workaround you can use the 'touch' utility to change the file stamp of your .info files (e.g., 'touch doc/foo.info').

Bye, Andreas **= Email 11 ==========================** Date: Thu, 22 Apr 2004 22:09:42 +0200 From: Andreas Buening Subject: Re: Recreating aclocal.m4 John Poltorak wrote: > > I get a msg saying I need to recreate aclocal.m4 with aclocal and run > automake again. > > How do I do this? I was under the impression that running:- > > aclocal -I m4 > > would recreate aclocal.m4, but that isn't working... You have to run "aclocal -I directory" where "directory" is the subdirectory where you find the .m4 files. Typically, this is "m4" or "config", sometimes the source directory itself. Bye, Andreas **= Email 12 ==========================** Date: Thu, 22 Apr 2004 22:54:19 +0100 From: John Poltorak Subject: testsuite for GNU ed I've just tried running 'make check' for this OS/2 port of GNU ed:- ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu/systools/gnued.zip and get 'exited abnormally' for all the tests. Is this because the tests need porting to OS/2? I can't say I'm familiar with ED, but I've seen it used in some build scripts, so I thought I may as well build it... -- John **= Email 13 ==========================** Date: Thu, 22 Apr 2004 18:56:52 -0800 From: "Dave Yeo" Subject: Re: Recreating aclocal.m4 On Thu, 22 Apr 2004 22:09:42 +0200, Andreas Buening wrote: >> aclocal -I m4 >> >> would recreate aclocal.m4, but that isn't working... > >You have to run "aclocal -I directory" where "directory" >is the subdirectory where you find the .m4 files. Typically, >this is "m4" or "config", sometimes the source directory >itself. Often there is a dot there representing the current directory. aclocal -I . Dave **= Email 14 ==========================** Date: Thu, 22 Apr 2004 18:59:54 -0800 From: "Dave Yeo" Subject: Re: testsuite for GNU ed On Thu, 22 Apr 2004 22:54:19 +0100, John Poltorak wrote: > > >I've just tried running 'make check' for this OS/2 port of GNU ed:- > >ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu/systools/gnued.zip > >and get 'exited abnormally' for all the tests. > >Is this because the tests need porting to OS/2? > >I can't say I'm familiar with ED, but I've seen it used in some build >scripts, so I thought I may as well build it... > You need to change cmp to diff. Its failing due to the line endings, crtl-L vs ctrl-L ctrl-M Dave **= Email 15 ==========================** Date: Thu, 22 Apr 2004 21:19:32 -0800 From: "Dave Yeo" Subject: Re: _wait3 On Wed, 21 Apr 2004 22:01:53 +0200, Andreas Buening wrote: >> >Good question. I can link wait3() but it seems to be declared nowhere (emx). >> >> Hmm it doesn't link here and I can't find it declared anywhere. Its purpose is >> wait3(), wait4(). wait for process to terminate or stop >> and this is the code >> /* reap any zombies */ >> int status, pid; >> while ((pid= wait3(&status, WNOHANG, (struct rusage *)0))>0); >> >> Wonder if I can just comment it out? > >I don't think so. At least make has some replacement code for >systems without wait3(): > >#define WAIT_NOHANG(status) waitpid (-1, (status), WNOHANG) >respectively >#define WAIT_NOHANG(status) wait3 ((status), WNOHANG, (struct rusage *) 0) Came up with this after reading waitpid's and wait3's man pages, came up with this, they're sopposed to be equal. #define wait3(stat_loc, options, resource_usage) \ waitpid((pid_t)-1, stat_loc, options) Then found Kyosuke TOKORO's patch and see he just ifdefed it out. Dave **= Email 16 ==========================** Date: Fri, 23 Apr 2004 10:29:08 +0100 From: John Poltorak Subject: Re: Recreating aclocal.m4 On Thu, Apr 22, 2004 at 06:56:52PM -0800, Dave Yeo wrote: > On Thu, 22 Apr 2004 22:09:42 +0200, Andreas Buening wrote: > > >> aclocal -I m4 > >> > >> would recreate aclocal.m4, but that isn't working... > > > >You have to run "aclocal -I directory" where "directory" > >is the subdirectory where you find the .m4 files. Typically, > >this is "m4" or "config", sometimes the source directory > >itself. > > Often there is a dot there representing the current directory. aclocal -I . I'm having no success recreating the aclocal.m4 in bison's root directory. Do I need to delete the old one first? What is the file supposed to consist of? > Dave > -- John **= Email 17 ==========================** Date: Fri, 23 Apr 2004 11:34:51 +0100 From: John Poltorak Subject: UNIX environment variables There's an interesting section on the specification of Unix Enviroment Variables by the Open Group here:- http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html -- John **= Email 18 ==========================** Date: Fri, 23 Apr 2004 12:31:38 +0100 From: John Poltorak Subject: bc I've just found that I can build GNU bc straight from source as long as I run aclocal, automake, autoconf, autoheader first. bc is a 'basic calculator' but can do handy things like take input from the command line:- C:\>echo 1 + 2 | bc 3 bc is also one of the utilties listed as a Unix requirement by the Open Group. See the full list here:- http://www.opengroup.org/onlinepubs/007904975/idx/utilities.html One problem highlighted when building bc is that it won't build with a patched autoconf v2.59 but the standard one works OK. The patched one does not produce a configure script - it errors with:- checking for an ANSI C-conforming const... yes checking for size_t... yes checking for ptrdiff_t... yes checking for vprintf... yes checking for _doprnt... no checking for isgraph... yes checking for setvbuf... yes ../configure[5409]: syntax error: `if' unmatched You can grab bc here:- ftp://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz -- John **= Email 19 ==========================** Date: Fri, 23 Apr 2004 13:26:07 +0100 From: John Poltorak Subject: make install Is there any way to tell if a Makefile has an install target? -- John