[comp.os.minix] MINIX sh

paradis@encore.UUCP (05/27/87)

Some time back I posed a question to this newsgroup about
why the sh that comes with MINIX chokes on large shar files.
I received a reply by mail that if I use chmem to up the
maximum data size of sh that would solve the problem.  Well,
the other day I tried just that... and failed.  I was trying
to unpack a shell archive from net.sources, and depending
on the amount of memory I gave to sh it would unpack either
one or two files and then crap out with "out of string space".
I figure sh is doing something REALLY dumb like allocating
memory for the entire redirected input and not freeing it.
So as a first step I decided to try and add printf's to sh
so as to try and find the problem... only to discover that
I couldn't rebuild sh!!  It would compile, but then asld would
complain about "multiple defined symbols".  Before I go too
far down a rathole with this, has ANYONE else out there been
able to successfully rebuild sh?

p.s. I currently have an unshar utility on order from the
simtel20 archives... when it arrives and I port it to MINIX,
I'll either mail it to interested parties or post it if interest
warrants.

   +----------------+  Jim Paradis                  linus--+
+--+-------------+  |  Encore Computer Corp.       necntc--|
|  | E N C O R E |  |  257 Cedar Hill St.           ihnp4--+-encore!paradis
|  +-------------+--+  Marlboro MA 01752           decvax--|
+----------------+     (617) 460-0500             talcott--+
You don't honestly think ENCORE is responsible for this??!!

ast@botter.UUCP (05/29/87)

In article <1642@encore.UUCP> paradis@encore.UUCP (Jim Paradis) writes:
>I couldn't rebuild sh!!  It would compile, but then asld would
>complain about "multiple defined symbols".  Before I go too
>far down a rathole with this, has ANYONE else out there been
>able to successfully rebuild sh?

I guess I never tried.  I did all the development on PC-IX.  But I have an
idea what the problem might be.  For long and complicated reasons, the
MINIX C compiler effectively ignores static declarations.  Thus if you
have a declaration
static int x= 1;
that appears in two files, when you link them you will get multiply defined
symbols.   Take a look at which symbols are multiply defined and see if this
is indeed the problem.  If so, the simplest fix is to systematically change
the conflicting names to nonconflicting names.  It is unfortunate that static
is ignored, but that is a long story and it is not easy to fix.

Andy Tanenbaum (ast@cs.vu.nl)