www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/19/04:20:37

Date: Wed, 19 Feb 1997 11:10:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Kay Hayen <kay AT edition DOT bonbit DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Trying to compile 'recode' with djgpp
In-Reply-To: <6R6NHShUccB@jocokko.edition.bonbit.org>
Message-ID: <Pine.SUN.3.91.970219105102.22519R-100000@is>
MIME-Version: 1.0

On 18 Feb 1997, Kay Hayen wrote:

> I've found a makefile.os2 with recode which is said to be useable with  
> emx, which I though could be near to djgpp.

Porting a package to DJGPP is seldom as simple as just using 
configuration files for another system, even if it is close.  You need to 
walk through the Makefile's and config.h files and review them for 
possible incompatibilities with DJGPP.  In this case, I would suggest 
looking into config.os2 (which you didn't post); I suspect that it holds 
a large chunk of the solution to your problems.

Note that DJGPP already comes with <sys/config.h> header that should say 
to GNU packages almost everything they want to know about supported 
features.  You might consider using it instead of config.os2.

> make -f Makefile.os2 all CC="gcc -O -s" O=".obj" LDEFS="-a"
                                          ^^^^^^^^
Problem no. 1: DJGPP uses .o, not .obj as its object file extension.  
While there's nothing magic about .o, and .obj might work in some cases, 
it disables some of the the built-in rules of Make, which could cause 
problems.

> g:/dos_gcc/include/setjmp.h:19: two or more data types in declaration of `jmp_bu
> f'

I would guess that config.os2 or the sources define some macro in the 
case of OS/2 that confuse GCC.  If you cannot figure out what is the 
cause of the problem, add -E to the gcc command line which compiles 
recode.c, run gcc and look inside recode.i to see how does this line look 
after pre-processing.

> recode.c:137: warning: `_stklen' initialized and declared `extern'

Possibly an incompatibility with the DJGPP declaration of `_stklen'.

> recode.c: In function `execute_popen_sequence':
> recode.c:1746: warning: assignment makes pointer from integer without a cast

Can't say without looking at the source line.

> recode.c: In function `execute_sequence':
> recode.c:2094: `O_BINARY' undeclared (first use this function)

In DJGPP, O_BINARY is defined on <fcntl.h>; make sure it is included by 
the source when compiled under DJGPP (its inclusion might be conditioned 
on EMX or OS2 or something similar).

> recode.c:2103: `_fmode' undeclared (first use this function)

`_fmode' is declared on <fcntl.h>.  See above.

> Deleting G:\dos_gcc\tmp\dj160000.err
>      1 file deleted

Are you using Make 3.73?  If so, and if your DJGPP version is v2.01 (not 
v2.0), you should upgrade to Make 3.75.  v3.73 is incompatible with DJGPP 
v2.01 in subtle ways.

> I *quite* irritated on the djgpp include that causes the "two or more  
> data types..." error.

I'd bet that when you look at that line after pre-processing, you stop 
being irritated.  Chances are, gcc got something utterly unrecognizable.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019