Subject: 'ls' (static)

From: Michael Hall <[email-masked]>
Date: Tue, 18 Aug 1998 12:11:21 -0700

Having a problem here trying to compile a 'static' copy of 'compress'.
I'm running Linux, libc 5.4.46, and have tried to use 'compress.tar.gz'
and 'ncompress-4.2.4.tar.gz'. They both normally compile fine but when I
throw in the '-static' option I keep getting this:

# make
gcc -static  -O2 -DUSERMEM=`cat USERMEM` -o compress compress.c
compress.c: In function `main':
compress.c:316: warning: assignment from incompatible pointer type
compress.c:316: warning: comparison of distinct pointer types lacks a cast
compress.c:317: warning: passing arg 2 of `signal' from incompatible pointer type
compress.c:318: warning: passing arg 2 of `signal' from incompatible pointer type
/usr/lib/libc.a(strrchr.o): In function `rindex':
strrchr.o(.text+0x0): multiple definition of `rindex'
/tmp/cca073181.o(.text+0x1430): first defined here
/usr/i486-unknown-linux-gnulibc1/bin/ld: Warning: size of symbol `rindex' changed from 34 to 447 in strrchr.o
make: *** [compress] Error 1

  I'm not much of a programmer so I was wondering if anybody has any pointers
on compiling a 'static' version of 'compress' and/or a different source archive
I could try.
  Thanks.

Umm..  Could you call back?  My house is on fire.  -Tom Waits 
-- 
Mike Hall <[email-masked]> - On the net at http://www.riverside.org
System Administrator (*nix, Perl, CGI hacker, certified OS/2 Specialist)

---

From: Bernhard Rosenkraenzer <[email-masked]>
Date: Wed, 19 Aug 1998 21:06:47 +0200 (CEST)

> strrchr.o(.text+0x0): multiple definition of `rindex'

I haven't actually tried this, but this looks as if a compress tries to
implement the rindex() function (probably in a file called strrchr.c) even
though the C library already has it.
Try removing the definition of rindex() from strrchr.c.

(The definition will probably be
char *rindex(something)
{
	something
}
Make sure you remove all of it)

LLaP
bero

-- 
Windows 98 supports real multitasking - it can boot and crash simultaneously.
***
Anyone sending unwanted advertising e-mail to this address will be charged
$25 for network traffic and computing time. By extracting my address from
this message or its header, you agree to these terms.

---

From: Michael Hall <[email-masked]>
Date: Wed, 19 Aug 1998 23:57:38 -0700

> Try removing the definition of rindex() from strrchr.c.

  I tried playing with it some more after I got your message without
luck. I gave up on it since a kind soul on the list took pity on me
and made his static version available for me to ftp (thanks again !).
I'll play around with it again when I have time since I can't let it
get the best of me :-) but for now I'm alright.

It's mathematical: (uNsTable - NT) = usable.
-- 
Mike Hall <[email-masked]> - On the net at http://www.riverside.org
System Administrator (*nix, Perl, CGI hacker, certified OS/2 Specialist)