[Prev][Next][Index][Thread]

Re: compilation problems



Wouter Coene wrote:
> Hi,
> 
> Compilation of OSKit fails on my debian linux 2.2 system. I get the
> following error message:
> /usr/lib/libc.a(init-first.o)(.data+0x0): multiple definition of `__libc_multiple_libcs'

In unix/linux/sbrk-hack.c, comment out the 'int __libc_multiple_libcs'
line and try again.

After this fix, you'll probably get errors when the examples are
linked, like: "__progname multiply defined" to fix that, apply this
patch to unix/elf/crt1.c.  (While it may not look like much, it turns
__progname into a common symbol in crt1.c).

diff -u -r1.4 -r1.5
--- crt1.c      2000/03/05 00:38:54     1.4
+++ crt1.c      2001/03/27 22:51:09     1.5
@@ -83,7 +83,7 @@
 #endif
 
 char **environ;
-char *__progname = "";
+char *__progname;
 
 void
 _start(char *arguments, ...)
@@ -106,6 +106,8 @@
     environ = env;
     if(argc > 0)
        __progname = argv[0];
+    else
+        __progname = "";
 
     if(&_DYNAMIC != 0)
        atexit(rtld_cleanup);


-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann@cs.utah.edu
	    Research is not just an adventure, its a job.

Follow-Ups: References: