From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Thu, 23 May 2002 04:26:07 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 223 ************************************************** Wednesday 22 May 2002 Number 223 ************************************************** Subjects for today 1 Re: Re: compiling emacs : John Poltorak 2 Re: compiling emacs : Arnstein.Prytz at jcu.edu.au 3 Re: OpenWatcom : csaba.raduly at sophos.com 4 Re: OpenWatcom : John Poltorak 5 Re: OpenWatcom : Holger Veit 6 Re: OpenWatcom : John Poltorak 7 Re: OpenWatcom : csaba.raduly at sophos.com 8 Re: OpenWatcom : John Poltorak 9 lost posts : John Poltorak **= Email 1 ==========================** Date: Thu, 23 May 2002 10:25:23 +0100 From: John Poltorak Subject: Re: Re: compiling emacs On Thu, May 23, 2002 at 10:25:34AM -0400, Arnstein.Prytz at jcu.edu.au wrote: > Dear John, > > Thank you for your instruction to compile emacs 20.7. Please bear in mind tht the instructions were just a repost of some instructions previously provided. They did not work 100% for me, but gave me a good start in getting emacs built, along with some further tips from the porter. > > 8. make > > I installed the latest make 3.79.1 but it just exited without any > error messages at all. If that is the case, then there is still a problem with this version. Are you using the one which was released last week? > So, instead I reverted to a version of > 3.76.1 which I do not have any problems with - in fact, it is the > last version I have not had any problems with. > > After a considerable time compiling files, successfully > completing the lib-src directory, it stalls in the src directory > on fileio.c, line 3356. It complains that it cannot find sync(). > > This is where I stalled. Where is the sync() routine defined? > > I hope that I have not just been a boofhead here. I may end up > re-installing all the emx and gnu stuff to clean things up a > bit, but that is something I wish to leave for a bit longer. Installing emx and all the gnu stuff is still a real pain. I was hoping that the situation would have become much more straightforward by now, but its actually more confusing than it was a year ago, because it may be necessary to use one of three different versions of gcc to build any particular app. Having said that, we are, IMV, catching up with the mainstream open source apps. As far as emacs goes, have you tried building it with gcc v2.8.1? I think that is what I used. > > Thank you for your help. > > Regards, Arnstein > > P.S. Is there a pre-compiled version anywhere? > ------------------------------------------------------------------ > Arnstein Prytz Arnstein.Prytz at jcu.edu.au > School of Maths and Physics ph: 61-7-47815183 > James Cook University fax: 61-7-47815880 > Townsville, Queensland 4811, Australia > ------------------------------------------------------------------ -- John **= Email 2 ==========================** Date: Thu, 23 May 2002 10:25:34 -0400 From: Arnstein.Prytz at jcu.edu.au Subject: Re: compiling emacs Dear John, Thank you for your instruction to compile emacs 20.7. I have followed your instructions and have been unsuccessful. I'll explain more. > 1. tar zxf SOMEWHERE\emacs-20.7.tar.gz > 2. tar zxf SOMEWHERE\leim-20.7.tar.gz > 3. cd emacs-20.7 ok > 4. chmod +rw -R* chmod +rw -R * note the extra space between R and * > 5. untgz SOMEWHERE\emacs-20.7-KIT1.9.tgz I get complaints from my version of untgz UNTGZ/OS2 Decompression Utility 0.95 freeware version Copyright (c) 1996,97 Tillmann Steinbrecher. Feb 17 1997 untgzos2: error - not a supported archive type If I try instead tar zxf emacs-20.7-KIT1.9.tgz the error message is tar: archive emacs-20.7-KIT1.9.tgz EOF not on block boundary but stuff is still extracted up to scroll2.ptr. Decompressing and untar-ing in separate steps seems to work gzip -d emacs-20.7-KIT1.9.tgz tar xf emacs-20.7-KIT1.9.tar > 6. configure.cmd --with-bsd-socket --with-xf86sup-pty > Execution of configure.cmd ask you twice, just press Enter key I guess you are referring to the question about the patch program. I do not have gpatch, which it said it would use by default, but I have patch.exe version 2.5. It accepted that without any hassles. > 8. edit src\puresize.h as follows (line 36-43); > > #ifndef SYSTEM_PURESIZE_EXTRA > /* #define SYSTEM_PURESIZE_EXTRA 0 */ > #define SYSTEM_PURESIZE_EXTRA 200000 $B"+(B this number > #endif > > #ifndef SITELOAD_PURESIZE_EXTRA > #define SITELOAD_PURESIZE_EXTRA 200000 $B"+(B this nimber > #endif I presume that characters from $B to the end of the line are just rubbish and should be deleted. (You have two step 8's) > Moreover, I have edited src\config.h as follows (line 246-248); > > #define EMACS_CONFIGURATION "AthlonXP OS/2_Warp_V4.51 emx09d_fix04" > > #define EMACS_CONFIG_OPTIONS "--emacs-configuration=AthlonXP > OS/2_Warp_V4.51 emx I assume the last line has been truncated at 80 columns and should really be #define EMACS_CONFIG_OPTIONS "--emacs-configuration=AthlonXP OS/2_Warp_V4.51 emx09d_fix04" > 7. SET INCLUDE=x:/emx/include I am using gcc 3.03 so I have ignored this statement (in line with instructions provided with that version). > SET NAME=John Poltorak $B"+(B ADD this in CONDIF.SYS Once again, remove rubbish characters from $B. I don't suppose I need to use your name here :) > 8. make I installed the latest make 3.79.1 but it just exited without any error messages at all. So, instead I reverted to a version of 3.76.1 which I do not have any problems with - in fact, it is the last version I have not had any problems with. After a considerable time compiling files, successfully completing the lib-src directory, it stalls in the src directory on fileio.c, line 3356. It complains that it cannot find sync(). This is where I stalled. Where is the sync() routine defined? I hope that I have not just been a boofhead here. I may end up re-installing all the emx and gnu stuff to clean things up a bit, but that is something I wish to leave for a bit longer. Thank you for your help. Regards, Arnstein P.S. Is there a pre-compiled version anywhere? ------------------------------------------------------------------ Arnstein Prytz Arnstein.Prytz at jcu.edu.au School of Maths and Physics ph: 61-7-47815183 James Cook University fax: 61-7-47815880 Townsville, Queensland 4811, Australia ------------------------------------------------------------------ **= Email 3 ==========================** Date: Thu, 23 May 2002 10:33:53 +0100 From: csaba.raduly at sophos.com Subject: Re: OpenWatcom On 23/05/2002 05:34:24 owner-os2-unix wrote: >On Wed, 22 May 2002 21:43:05 +0100, John Poltorak wrote: > >> >>Is it possible to use OpenWatcom to build certain open source apps? Certainly :-) You can compile e.g. GNU wget for NT with Watcom C (I even cross-compiled with Watcom C 11.0, host OS/2, target NT :-) The trouble is, lots of free software assumes at least compatibility with Unix-ish compilers (including GNU C). These compilers use the -o switch to specify the output, be it an obj file from the compiler or an executable from the linker. Watcom C is incompatible with this: it uses -fo and -fe (and it requires an equal sign: -fo=foo.obj, -fo foo.obj won't work) for object and executable files, respectively. WCC seems to parse its commandline in a case-insensitive manner. This makes it impossible to use -o for output and -O for optimization. Writing a front-end to recode the switches is left as an exercise to the reader :-) It also needs to convert forward slashes to backslashes in paths (Watcom treats them as switches). Unix-ish compilers have the ability to invoke the linker. The Watcom equivalent is wcl/wcl386. Many free apps use autoconf & co. to ease the porting to different platforms/compilers. Once that understands and detects Watcom C, it will become easier to generate makefiles. After that, it's just working around the missing bits. > >Also does anyone know how to setup OpenWatcom to use the toolkit headers or >the EMX headers? Watcom C understands the INCLUDE and LIB environment variables, so : SET INCLUDE=D:\toolkit\h;d:\openwatcom\h; ... etc SET LIB=D:\toolkit\lib;d:\openwatcom\lib386; ... SET WCC386= -zq SET WPP386= -zq -- 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 4 ==========================** Date: Thu, 23 May 2002 10:57:03 +0100 From: John Poltorak Subject: Re: OpenWatcom On Thu, May 23, 2002 at 10:33:53AM +0100, csaba.raduly at sophos.com wrote: > > On 23/05/2002 05:34:24 owner-os2-unix wrote: > > >On Wed, 22 May 2002 21:43:05 +0100, John Poltorak wrote: > > > >> > >>Is it possible to use OpenWatcom to build certain open source apps? > > Certainly :-) > You can compile e.g. GNU wget for NT with Watcom C (I even cross-compiled > with Watcom C 11.0, host OS/2, target NT :-) Excellent! That's good to know. How does the resultant Watcom binary compare with the one produced by gcc in terms of size and efficiency? > Unix-ish compilers have the ability to invoke the linker. The Watcom > equivalent is wcl/wcl386. > > Many free apps use autoconf & co. to ease the porting to different > platforms/compilers. Once that understands and detects Watcom C, > it will become easier to generate makefiles. After that, it's > just working around the missing bits. I asked about the use of OpenWatcom on the Autoconf mailing list and it was suggested that it should be possible to make it work, so maybe with some judicious tweaking of CONFIG.SITE it would be possible to build some standard GNU apps such as SED, for example, without needing to change any of the code... > > > >Also does anyone know how to setup OpenWatcom to use the toolkit headers > or > >the EMX headers? > > Watcom C understands the INCLUDE and LIB environment variables, so : > > SET INCLUDE=D:\toolkit\h;d:\openwatcom\h; ... etc > SET LIB=D:\toolkit\lib;d:\openwatcom\lib386; ... > SET WCC386= -zq > SET WPP386= -zq -- John **= Email 5 ==========================** Date: Thu, 23 May 2002 12:55:38 +0200 From: Holger Veit Subject: Re: OpenWatcom On Wed, May 22, 2002 at 09:56:49PM -0400, Jack Troughton wrote: > Ken Ames wrote: > > Holger says x apps can only be built with gcc/emx. I am hoping Openwatcom will start > > to do some of the open source software. > > Well, open source is more about the license than the tools. It just so > happens _so far_ that the bulk of the open source stuff out there is > done with gcc... but that's not true for all of them. It is not the compiler itself - surely Watcom will produce good code, maybe even higher quality than gcc - it is - the compiler arguments; I know the old Watcom was rather strange concerning its argument style (doubt that changed recently), but gcc is POSIX compatible (here: not API, but command options). Failure of Watcom C to accept the frequently used CC options and arguments will make its use in Unix Makefiles pretty difficult to impossible. - the runtime library needs certain properties to be compatible. Unfortunately, there are EMX/gcc data structures, like FILE* leaking in to and out of the X11 API, so even if the calling conventions were compatible, the API arguments are unlikely compatible. Open source is not an issue at all for both gcc or watcom. Holger -- Please update your tables to my new e-mail address: holger.veit$ais.fhg.de (replace the '$' with ' at ' -- spam-protection) **= Email 6 ==========================** Date: Thu, 23 May 2002 13:10:32 +0100 From: John Poltorak Subject: Re: OpenWatcom On Thu, May 23, 2002 at 12:55:38PM +0200, Holger Veit wrote: > On Wed, May 22, 2002 at 09:56:49PM -0400, Jack Troughton wrote: > > Ken Ames wrote: > > > Holger says x apps can only be built with gcc/emx. I am hoping Openwatcom will start > > > to do some of the open source software. > > > > Well, open source is more about the license than the tools. It just so > > happens _so far_ that the bulk of the open source stuff out there is > > done with gcc... but that's not true for all of them. > > It is not the compiler itself - surely Watcom will produce good code, > maybe even higher quality than gcc Would it be possible to develop LIBEMX using Watcom? > - it is > - the compiler arguments; I know the old Watcom was rather > strange concerning its argument style (doubt that changed > recently), but gcc is POSIX compatible (here: not API, but > command options). Failure of Watcom C to accept the > frequently used CC options and arguments will make its > use in Unix Makefiles pretty difficult to impossible. But if building from scratch using Autoconf and Automake, couldn't this problem be eliminated? > - the runtime library needs certain properties to be compatible. > Unfortunately, there are EMX/gcc data structures, like FILE* > leaking in to and out of the X11 API, so even if the calling > conventions were compatible, the API arguments are unlikely > compatible. Since OpenWatcom is still in it's very early stages, can't such problems be addressed. It would be a shame if two free OS/2 compilers were incomptible. In case anyone is interested, there is a OpenWatcom newsserver at:- news.openwatcom.org which has a newsgroup for c/c++ users. There is also a newsgroup for contributors... Could something like LIBEMX be contributed in order to facilitate development of Unix-like apps on OpenWatcom? > Open source is not an issue at all for both gcc or watcom. > > Holger > > -- > Please update your tables to my new e-mail address: > holger.veit$ais.fhg.de (replace the '$' with ' at ' -- spam-protection) -- John **= Email 7 ==========================** Date: Thu, 23 May 2002 13:15:51 +0100 From: csaba.raduly at sophos.com Subject: Re: OpenWatcom On 23/05/2002 10:57:03 owner-os2-unix wrote: >On Thu, May 23, 2002 at 10:33:53AM +0100, csaba.raduly at sophos.com wrote: [snip] >> You can compile e.g. GNU wget for NT with Watcom C (I even cross-compiled >> with Watcom C 11.0, host OS/2, target NT :-) > >Excellent! That's good to know. > >How does the resultant Watcom binary compare with the one produced by gcc >in terms of size and efficiency? > It doesn't :-( The main reason I compiled wget with Watcom was the lack of GCC on the NT machine. Efficiency is not really an issue for wget, as most of the time is likely to be spent waiting for the network. I won't be surprised if wcc386 -othexan would beat gcc -O2. "YMMV. And since I didn't run it through a profiler, MMMV too. -- Joe Maun in comp.lang.c" [snip] > >I asked about the use of OpenWatcom on the Autoconf mailing list and it >was suggested that it should be possible to make it work, so maybe with >some judicious tweaking of CONFIG.SITE it would be possible to build some >standard GNU apps such as SED, for example, without needing to change any >of the code... > Sed might be a good example, as it's unlikely to use fork(), or any other Unix system call which only exists in the EMX emulation layer. But see my comments on -o vs -fo= and -fe= I doubt autoconf can hack that (especially the '=') -- 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 8 ==========================** Date: Thu, 23 May 2002 13:55:44 +0100 From: John Poltorak Subject: Re: OpenWatcom On Thu, May 23, 2002 at 01:15:51PM +0100, csaba.raduly at sophos.com wrote: > But see my comments on -o vs -fo= and -fe= > I doubt autoconf can hack that (especially the '=') Apparently this needs a CC driver that translates POSIX command line options to the Watcom equivalent. There are already drivers for CL and BCC in the source, I'm told. -- John **= Email 9 ==========================** Date: Thu, 23 May 2002 19:17:43 +0100 From: John Poltorak Subject: lost posts My system seems to have lost some posts today, not sure why exactly, but it seems to have been busy trying to return mail to non-existant spammers, and some msgs have disappeared... If you have posted something today, and it hasn't been sent back to you can you repost, please? Thanks, -- John