I downloaded some of the source code I was hoping to compile, but it seems
that the code is not one of the cases that Paul indicates might simply
need to run "ash .configure" and "make" to build.
In the case of one package there is no "configure" file and make does not
do anything when invoked without any options. If I run it as in:
>[U:\usr\src\nars2000\trunk]make -d -f MAKEFILE
>GNU Make 3.81
>Copyright (C) 2006 Free Software Foundation, Inc.
>This is free software; see the source for copying conditions.
>There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>This program built for i386-pc-os2-emx
>Reading makefiles...
>Reading makefile `MAKEFILE'...
>MAKEFILE:54: *** missing separator. Stop.
Looking at the makefile I see the following at its start:
# Microsoft Visual C++ generated build script
And line 54 is simply:
!else
So I am unclear what is being complained about.
As noted this is my first attempt to work in this area, so it might well
be I am missing something simple to make this and other compiles work.
Perhaps I am reaching a bit too far for a first step. I will be happy for
any suggestions at this point.
-- Dave
-----------------------------------------------------------
dhdurgee<at>verizon<dot>net
-----------------------------------------------------------
>On Wed, 3 Dec 2008 16:29:31 UTC, m...@privacy.net wrote:
>> >[U:\usr\src\nars2000\trunk]make -d -f MAKEFILE
>> >GNU Make 3.81
>> >Copyright (C) 2006 Free Software Foundation, Inc.
>> >This is free software; see the source for copying conditions.
>> >There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> >
>> >This program built for i386-pc-os2-emx
>> >Reading makefiles...
>> >Reading makefile `MAKEFILE'...
>> >MAKEFILE:54: *** missing separator. Stop.
>>
>> Looking at the makefile I see the following at its start:
>>
>> # Microsoft Visual C++ generated build script
>>
>> And line 54 is simply:
>>
>> !else
>>
>> So I am unclear what is being complained about.
>There are quite a few Makefile formats around. GNU make cannot deal with
>those files written for Microsoft makes or IBM's nmake. I don't think
>"!else" is valid syntax for GNU make. Either you use another Makefile
>shipped with the package, or you learn the differences and adapt the
>syntax to work with GNU make.
The package includes only the Microsoft version, so I guess I need to
"translate" a version that GNU make is happy with. Do you have any
pointers on this, perhaps a "translator" of some sort that can fixup most
of the glitches? As I noted, I am new in this area and can use all the
pointers you are will to give me.
I don't want to be a pest, so if you can point me to some guidelines on
adapting a makefile from Microsoft I would hope that would be all I would
need.
Thanks for your speedy response. Keep up the good work on SeaMonkey!
You can also use nmake included in the OS/2 Developers Toolkit
which uses Microsoft makefile style or wmake included in OpenWatcom
which can also be invoked in MS compatible mode (wmake -ms).
The make tool in general is not dependent on a compiler, you could
also use it for everything else that needs to be updated due to
file changes :) .
> I downloaded some of the source code I was hoping to compile, but it seems
> that the code is not one of the cases that Paul indicates might simply
> need to run "ash .configure" and "make" to build.
Paul's build environment is designed for porting programs from uni to OS/2, this
nars2000 says at the top of its web page
"At the moment, NARS2000 is designed to run on Windows only, versions 2000, XP,
and Vista. However, it is free software, so you are invited to help extend its
reach"
This will make it more complicated than just a plain recompile!
--
Trevor Hemsley, Brighton, UK
Trevor dot Hemsley at ntlworld dot com
Looking a bit further I find that nmake is included in Paul's build
environment. Unfortunately running it still hits a problem:
>[U:\usr\src\nars2000\trunk]nmake
>
>Operating System/2 Program Maintenance Utility
>Version 4.00.001 Oct 4 2001
>Copyright (C) IBM Corporation 1988-2001
>Copyright (C) Microsoft Corp. 1988-1991
>All rights reserved.
>
>makefile(341) : fatal error U1023: syntax error present in expression
>Stop.
Looking at the makefile shows the line in question to be:
>!if exist ($(O)assign.DEP)
Inspection shows this to be the first of many lines of that form, so it
appears there will be a fair bit of adjustment needed to even get nmake to
accept this makefile.
Is it possible to integrate the Open Watcom in Paul's environment as well?
Would this be likely to have more success than other methods of attacking
the problem?
This would seem to suggest I attempt another project first, given my lack
of experience in this entire area.
I also took a stab at compiling Hercules-3.05, which is a uni source and
ran into difficulties. I had submitted this to Paul on Mantis as a
possible port and he took a first shot at it a bit over a year ago, but
the results were not functional.
I downloaded the source, ran "ash ./configure" and then a make, which ran
into problems. The output at the end of the make was:
>In file included from hstdinc.h:243,
> from pttrace.c:18:
>hostopts.h:284:1: warning: "DLL_EXPORT" redefined
><command line>:18:1: warning: this is the location of the previous definition
>pttrace.c: In function `ptt_pthread_cond_timedwait':
>pttrace.c:328: warning: passing arg 3 of `pthread_cond_timedwait' discards qualifiers from pointer target type
>pttrace.c: In function `ptt_pthread_detach':
>pttrace.c:359: error: void value not ignored as it ought to be
>make.exe[2]: *** [pttrace.lo] Error 1
>make.exe[2]: Leaving directory `U:/usr/src/hercules-3.05'
>make.exe[1]: *** [all-recursive] Error 1
>make.exe[1]: Leaving directory `U:/usr/src/hercules-3.05'
>make: *** [all] Error 2
Given this I can only assume that Paul needed to fix several issues in
order to produce the binary that would not run and that this will probably
also take a more experienced porter than I to handle.
I took one more stab at this by downloading the Lame-3.98 source. I ran
"ash ./configure" and make, which also ran into problems:
>emxomf: Cannot create output file `u:/tmp\ldconv_main_o_5da948d01f63121728.obj'
>emxomfld: a.out to omf conversion failed for 'U:\usr\src\lame-3.98\frontend\main.o'.
>make.exe[2]: *** [lame.exe] Error 1
>make.exe[2]: Leaving directory `U:/usr/src/lame-3.98/frontend'
>make.exe[1]: *** [all-recursive] Error 1
>make.exe[1]: Leaving directory `U:/usr/src/lame-3.98'
>make: *** [all] Error 2
As there is an OS/2 version of this available I am starting to wonder if I
somehow missed something in setting up Paul's build environment. I also
just noticed that KO Myung-Hun included a file with his binary that may
address my issues and add an OS/2 specific priority setting. Does the
above error look like something that the patch might fix?
> >emxomf: Cannot create output file `u:/tmp\ldconv_main_o_5da948d01f63121728.obj'
> >emxomfld: a.out to omf conversion failed for 'U:\usr\src\lame-3.98\frontend\main.o'.
Do you have a U: drive with a \tmp directory on it?
>On Thu, 4 Dec 2008 16:05:55 UTC in comp.os.os2.programmer.porting,
>m...@privacy.net wrote:
>> >emxomf: Cannot create output file `u:/tmp\ldconv_main_o_5da948d01f63121728.obj'
>> >emxomfld: a.out to omf conversion failed for 'U:\usr\src\lame-3.98\frontend\main.o'.
>Do you have a U: drive with a \tmp directory on it?
Opps! I have the U: drive, but had neglected to create the directory on
it. I did so and now lame-3.98 compiles correctly. I guess that lets me
know I have the build environment set up correctly.
Thanks for the quick reply point out my oversight. Any suggestions on the
problem I am seeing with Hercules-3.05? Somehow I doubt that one is
caused by the missing directory.
I think so. Install OpenWatcom and use wmake.exe from it.
> Would this be likely to have more success than other methods of attacking
> the problem?
Don't know as I have no clue of what your makefile contains ;)
> >pttrace.c: In function `ptt_pthread_detach':
> >pttrace.c:359: error: void value not ignored as it ought to be
To save me from finding and downloading this, what is on line 359 of pttrace.c?
Quote about 10 lines either side of it too
>On Thu, 4 Dec 2008 16:05:55 UTC in comp.os.os2.programmer.porting,
>m...@privacy.net wrote:
>> >pttrace.c: In function `ptt_pthread_detach':
>> >pttrace.c:359: error: void value not ignored as it ought to be
>To save me from finding and downloading this, what is on line 359 of
>pttrace.c? Quote about 10 lines either side of it too
>DLL_EXPORT int ptt_pthread_join(pthread_t tid, void **value, char *file, int line)
>{
>int result;
>
> PTTRACE ("join before", (void *)tid, value ? *value : NULL, file, line, PTT_MAGIC);
> result = pthread_join(tid,value);
> PTTRACE ("join after", (void *)tid, value ? *value : NULL, file, line, result);
> return result;
>}
>
>DLL_EXPORT int ptt_pthread_detach(pthread_t tid, char *file, int line)
>{
>int result;
>
> PTTRACE ("dtch before", (void *)tid, NULL, file, line, PTT_MAGIC);
> result = pthread_detach(tid);
> PTTRACE ("dtch after", (void *)tid, NULL, file, line, result);
> return result;
>}
>
>DLL_EXPORT int ptt_pthread_kill(pthread_t tid, int sig, char *file, int line)
>{
> PTTRACE ("kill", (void *)tid, (void *)(long)sig, file, line, PTT_MAGIC);
Line 359 is "result = pthread_detach(tid);" above.
> Line 359 is "result = pthread_detach(tid);" above.
According to a quick google for pthread_detach() it should be returning an int.
If the version you have is returning a void then the error makes sense but the
code doesn't! See if you can find the file where pthread_detach is defined -
fire up the OS/2 Seek and Scan utility and fill it in with a File name to search
for: of '*.h' and fill in the text to search for of 'pthread_detach' then check
the drive letters where you have your compiler headers (U:?) and search. I
found it in \extras\include\pthread.h and it is indeed misdefined as 'void
pthread_detach(pthread_t);'. That doesn't look right to me but I don't know how
it should be fixed.
Yuri's port of pthreads doesn't have pthread_detach, I did find it in an
older pthread package as
int pthread_detach (pthread_t *);
So perhaps just change the void to int
Dave
How is that supposed to work? If the function returns an int, then you
have to specify a 'return ...' statement with an int. For
compatibility's sake, it should return a correct int, not just a 0. To
do the right job, you'll need to find out what the valid return values
are for this function and under which circumstances they are returned.
If you're lazy and want something to build, whether or not it works
correctly, add a "return 0" statement to every place that the function
returns. You definitely DON'T want to let it return a random value,
which some compilers may let you do (with an appropriate warning).
--
[Reverse the parts of the e-mail address to reply.]
A search as suggested by Trevor finds some documentation on it in:
/extras/include/upnp/ithread.h which includes "#define ithread_detach
pthread_detach" and notes "Returns 0 on success, nonzero on failure."
Who is maintaining the OS/2 pthreads library? This sounds like a fix is
in order.
Well I decided to give it a try. I installed OpenWatcom and cribbed the
OS/2 CMD file to set the environment properly and then tried it:
>[U:\usr\src\nars2000\trunk]wmake -ms
>Open Watcom Make Version 1.7
>Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
>Source code is available under the Sybase Open Watcom Public License.
>See http://www.openwatcom.org/ for details.
>SYS1041: The name vdir is not recognized as an
>internal or external command, operable program or batch file.
>Error(E42): Last command making (DIR) returned a bad status
>Error(E02): Make execution terminated
>
>[U:\usr\src\nars2000]wmake
>Open Watcom Make Version 1.7
>Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
>Source code is available under the Sybase Open Watcom Public License.
>See http://www.openwatcom.org/ for details.
>Error(F05): No targets specified
>Error(E02): Make execution terminated
Any further suggestions?
Did you try wmake -ms -f MAKEFILE ?
There is also online help: wmake -?
(or have a look at the very good documentation)
The makefile may be using commands/tools only available
on a specific platform. If that's the case you must adapt
the makefile. There is no way around this then.
The Hercules web page notes to verify you have all required packages
by:
./util/cvslvlck
which I assume translates to:
ash ./util/cvslvlck
But that unfortunately fails as:
[U:\usr\src\hercules-3.06]ash ./util/cvslvlck
use: No such file or directory
./util/cvslvlck: 38: Syntax error: "(" unexpected
Looking at the indicated line I see:
my @req = qw(
cvs 0 1 http://www.cvshome.org
autoconf 2.5 0 http://www.gnu.org/directory/autoconf.html
automake 1.9 0 http://www.gnu.org/directory/automake.html
flex 2.5 0 http://www.gnu.org/directory/flex.html
gawk 3.0 0 http://www.gnu.org/directory/gawk.html
gcc 2.95 0 http://www.gnu.org/directory/gcc.html
gettext 0.11 0 http://www.gnu.org/directory/gettext.html
grep 0 0 http://www.gnu.org/directory/grep.html
libiconv 1.8 1 http://www.gnu.org/directory/libiconv.html
m4 0.0 1 http://www.gnu.org/directory/GNU/gnum4.html
make 3.79 0 http://www.gnu.org/directory/make.html
perl 5.6 1 http://www.gnu.org/directory/perl/html
sed 3.02 0 http://www.gnu.org/directory/sed.html
);
So I assume that this is not valid syntax for ash. I assume this will
either need to be changed to a form ash supports, or I will need a
shell that supports it to run this script. I continued to the next
step by running ./configure via ash and it ran as expected. I then
attempted a make to see how far I would get. Here is the error I
received at the end of the make:
In file included from hstdinc.h:253,
from hsys.c:22:
hostopts.h:333:1: warning: "DLL_EXPORT" redefined
<command line>:18:1: warning: this is the location of the previous
definition
In file included from hercules.h:150,
from hsys.c:26:
hstructs.h:1133: error: field `mtget' has incomplete type
hstructs.h:1147: error: field `stape_getstat_mtget' has incomplete
type
make.exe[2]: *** [hsys.lo] Error 1
make.exe[2]: Leaving directory `U:/usr/src/hercules-3.06'
make.exe[1]: *** [all-recursive] Error 1
make.exe[1]: Leaving directory `U:/usr/src/hercules-3.06'
make: *** [all] Error 2
This appears to be in the SCSI tape support as best I can tell. I
also see no answer to my final post in the thread prior to this one
regarding the pthreads library, so I imagine if I get past this error
there will be more to follow. I would like to get this package built,
as it could provide another platform for us to run VM software on. I
guess I could download a Windows version and run it under V/PC, but it
seems ridiculous to run an emulator under another emulator.
-- Dave
On Fri, 5 Jun 2009 20:18:19 UTC, "David H. Durgee" <m...@privacy.net>
wrote:
> This appears to be in the SCSI tape support as best I can tell. I
> also see no answer to my final post in the thread prior to this one
> regarding the pthreads library, so I imagine if I get past this error
> there will be more to follow. I would like to get this package built,
> as it could provide another platform for us to run VM software on. I
> guess I could download a Windows version and run it under V/PC, but it
> seems ridiculous to run an emulator under another emulator.
FWIW - my diffs of 3.05 that at least got Hercules compiling are at
http://smedley.info/hercules-3.05.diff
--
Cheers,
Paul.
Thanks again, Paul. I will see if this will help get this to build.
On a related topic, would there be any sense in trying a more recent
compiler than the 3.3.5 compiler distributed with the build
environment for this package? If so, what would be involved in
integrating a newer compiler into the build environment?
-- Dave
I'd advise getting pdksh from Hobbes and using the sh.exe from that for
cases where ash is too minimalistic.
Dave
> [U:\usr\src\hercules-3.06]ash ./util/cvslvlck
> use: No such file or directory
> ./util/cvslvlck: 38: Syntax error: "(" unexpected
>
> Looking at the indicated line I see:
>
> my @req = qw(
That appears to be Perl code. Do you have perl installed?
> On Fri, 5 Jun 2009 20:18:19 UTC in comp.os.os2.programmer.porting, "David H.
> Durgee" <m...@privacy.net> wrote:
>
> > [U:\usr\src\hercules-3.06]ash ./util/cvslvlck
> > use: No such file or directory
> > ./util/cvslvlck: 38: Syntax error: "(" unexpected
> >
> > Looking at the indicated line I see:
> >
> > my @req = qw(
>
> That appears to be Perl code. Do you have perl installed?
I see that it is part of Paul's environment, so I attempted to call
this script with it. The script must make assumptions that don't work
under our version of Perl, or I need to use some additional switches
as I get messages about it not finding such things as gcc on my
system. I guess my best bet is to simply see what it is looking for
and verify it manually at this point.
Thanks for the pointer to Perl, I had not though about that
possibility.
-- Dave
If you look at the first line of the script you will see something like
#!/bin/sh
or
#! /usr/bin/perl -w
This says what interpreter is supposed to run the command. Works best on
*nix
Dave
> On Fri, 5 Jun 2009 20:50:09 UTC, "Paul Smedley"
> <pauld...@despamsmedley.id.au> wrote:
>
> > Hi Dave,
> >
> > On Fri, 5 Jun 2009 20:18:19 UTC, "David H. Durgee" <m...@privacy.net>
> > wrote:
> >
> > > This appears to be in the SCSI tape support as best I can tell. I
> > > also see no answer to my final post in the thread prior to this one
> > > regarding the pthreads library, so I imagine if I get past this error
> > > there will be more to follow. I would like to get this package built,
> > > as it could provide another platform for us to run VM software on. I
> > > guess I could download a Windows version and run it under V/PC, but it
> > > seems ridiculous to run an emulator under another emulator.
> >
> > FWIW - my diffs of 3.05 that at least got Hercules compiling are at
> > http://smedley.info/hercules-3.05.diff
>
> Thanks again, Paul. I will see if this will help get this to build.
>
> On a related topic, would there be any sense in trying a more recent
> compiler than the 3.3.5 compiler distributed with the build
> environment for this package? If so, what would be involved in
> integrating a newer compiler into the build environment?
I have looked over your diffs and applied them as I could match them
to the new release of code. I am now getting an error that appears to
relate to an "os2util.c" that you must have provided as well, as I
don't see it as part of the build environment. Do you have it
available for download as well?
-- Dave
On Tue, 9 Jun 2009 01:47:44 UTC, "David H. Durgee" <m...@privacy.net>
wrote:
There may be some advantages to updating GCC - but unless you have
code that won't compile, it probably won't give you any great
advantages.
I don't remember where I got os2util.c from, but you can get a copy
from http://smedley.info/os2util.c
--
Cheers,
Paul.
I downloaded os2util.c from your site and attempted another make. I
got further this time, but things brok e with the following at the
end:
using piecewise archive linking...
ar.exe cru .libs/herc.a .libs/hconsole.o
: .libs/herc.a
ar.exe cru .libs/herc.a .libs/w32util.o
: .libs/herc.a
ar.exe cru .libs/herc.a .libs/os2util.o
: .libs/herc.a
ar.exe cru .libs/herc.a .libs/strsignal.o
: .libs/herc.a
ar.exe cru .libs/herc.a .libs/impl.o
: .libs/herc.a
ar.exe cru .libs/herc.a .libs/config.o
ar.exe: .libs/herc.a: File truncated
make.exe[2]: *** [libherc.la] Error 1
make.exe[2]: Leaving directory `U:/usr/src/hercules-3.06o'
make.exe[1]: *** [all-recursive] Error 1
make.exe[1]: Leaving directory `U:/usr/src/hercules-3.06o'
make: *** [all] Error 2
Any suggestions? If you need further information from the make output
I will put that up in a zip file.
-- Dave