Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!ames!sun-barr!texsun!texbell!vector!attctc!chasm From: chasm@attctc.Dallas.TX.US (Charles Marslett) Newsgroups: comp.sources.d Subject: Re: Perl on Microport 286: can't find library routines Summary: here's what I did for 386/ix Message-ID: <9257@attctc.Dallas.TX.US> Date: 7 Sep 89 04:42:04 GMT References: <2869@splut.conmicro.com> Organization: The Unix(R) Connection, Dallas, Texas Lines: 45 In article <2869@splut.conmicro.com>, jay@splut.conmicro.com (Jay "you ignorant splut!" Maynard) writes: > > I'm trying to build perl, despite the warning about small address space > machines. After adding an #include to util.c to get it to > compile, the link step fails trying to find dup2(), rename(), and > lstat(). I'm not sure what dup2() does. The Configure script found > rename(), but it's not documented in the manual. Looking at the code in > doio.c where lstat() is used, it looks like there's an attempt to avoid > calling it if it's not appropriate, but it flat doesn't exist here. In bringing up the posted beta copy of perl 3.0 under Interactive's 386/ix (Version 2.0.1), I ran into the following problems: 1) Signal.h was required in the file "util.c". 2) Interactive Unix does not understand "lstat()", so I just wrote a message to stderr, and invoked "stat()" instead (probably wrong -- please correct my patch here!). 3) Interactive Unix malloc()/realloc()/free() seems to have problems freeing the right stuff, so I used the included malloc.c file (and incidentally declared the saferealloc() and safemalloc() functions to be "char *" and safefree to be "void" in handy.h and util.c. 4) The base Makefile deletes x2p/Makefile before it invokes it to clean x2p (using the "make realclean" option). It now passes the test suite. You may want to do the same or similar changes (and you may not)... As far as dup2() and rename(), they may not be provided -- rename can be built out of a link() and an unlink() call sequence, but I don't remember the details about dup2(). > Help? Maybe? > -- > Jay Maynard, EMT-P, K5ZC, PP-ASEL | Never ascribe to malice that which can > jay@splut.conmicro.com (eieio)| adequately be explained by stupidity. > {attctc,bellcore}!texbell!splut!jay +---------------------------------------- =========================================================================== Charles Marslett STB Systems, Inc. <== Apply all standard disclaimers Wordmark Systems <== No disclaimers required -- that's just me chasm@attctc.dallas.tx.us