From: broeker AT acp3bf DOT knirsch DOT de (Hans-Bernhard Broeker) Newsgroups: comp.os.msdos.djgpp Subject: Re: Errors compiling 'rpp.exe' Date: 23 Nov 1999 12:41:42 +0100 Organization: RWTH Aachen, III. physikalisches Institut B Lines: 37 Message-ID: <81duhm$4bp@acp3bf.knirsch.de> References: <04333971827781 AT kiwi DOT dep DOT anl DOT gov> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 943357308 8530 137.226.32.75 (23 Nov 1999 11:41:48 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 23 Nov 1999 11:41:48 GMT X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Robert S. Peterson (rpeterson AT kiwi DOT dep DOT anl DOT gov) wrote: > I've been struggling to compile a SystemRPL developer for a HP48 called. > 'rpp.exe'. The program compiles cleanly on my Linux OS (Slackware), but for > obsure reasons I would like to compile under djgpp. Here's the output: > 1st problem: > C:\RPP\SRC>make > gcc -static -Ic:/rpp/src -Ic:/djgpp/include/asm -s -DNDEBUG -O2 -Wall -c > input.c -o input.o The '-s' (strip) flag in a *compilation* run of gcc? Are you sure that makes any sense? Same goes for the '-static' flag: it makes no sense whatsoever, in DJGPP (it's a no-op, anyway). > input.c:171: warning: implicit declaration of function `mmap' > input.c:171: `MAP_PRIVATE' undeclared (first use this function) > rplcomp.c:458: warning: implicit declaration of function `mmap' > rplcomp.c:458: `MAP_PRIVATE' undeclared (first use this function) > rplcomp.c:464: warning: implicit declaration of function `munmap' The problem is that the program tries to use mmap()/munmap(), a Unix-only system call to access files in a somewhat peculiar way. DJGPP has no emulation of this feature, so you can't use it. Typically, you'll find a #ifdef HAVE_MMAP or similar around those particular parts of the source, if it was really written to be portable, originally. Which means you can and should switch off this flag (in some header file, or via -D/-U in the CFLAGS), and recompile. If there is no such guarding, then the source is probably not portable to non-Unix platforms, as is, and you'll have to put in quite some work if you want to make it work on DJGPP. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.