From owner-freebsd-hackers Fri Mar 10 15:28:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from voyager.fisicc-ufm.edu (ip-198-202.guate.net [209.198.197.202]) by hub.freebsd.org (Postfix) with ESMTP id B309337B926; Fri, 10 Mar 2000 15:28:06 -0800 (PST) (envelope-from obonilla@voyager.fisicc-ufm.edu) Received: (from obonilla@localhost) by voyager.fisicc-ufm.edu (8.9.3/8.9.3) id RAA93748; Fri, 10 Mar 2000 17:27:06 -0600 (CST) (envelope-from obonilla) Date: Fri, 10 Mar 2000 17:27:06 -0600 From: Oscar Bonilla To: Alfred Perlstein Cc: Oscar Bonilla , Kris Kennaway , freebsd-hackers@FreeBSD.ORG Subject: Re: inner workings of the C compiler Message-ID: <20000310172706.A93660@fisicc-ufm.edu> References: <20000308163057.W14279@fw.wintelcom.net> <20000310164428.A89006@fisicc-ufm.edu> <20000310152737.J14279@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i In-Reply-To: <20000310152737.J14279@fw.wintelcom.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 10, 2000 at 03:27:37PM -0800, Alfred Perlstein wrote: > I think you'll want LD_LIBRARY_PATH to be: > /home/obonilla/freebsd/nss/libc/:/usr/lib:/usr/local/lib I don't see why since the only library I use is libc. Anyway, I tried just for kicks and still got the same error. $ echo $LD_LIBRARY_PATH /home/obonilla/freebsd/nss/libc:/usr/lib:/usr/local/lib $ echo $LD_PRELOAD /home/obonilla/freebsd/nss/libc/libc.so.4 $ make cc -g -DYP -DFreeBSD -Wall -pedantic -ansi -o nss-test -I../../libc/include nss-test.c /tmp/ccE93722.o: In function `main': /home/obonilla/freebsd/nss/tests/libc/nss-test.c(.text+0xb0): undefined reference to `nsdispatch' *** Error code 1 Stop in /usr/home/obonilla/freebsd/nss/tests/libc. > please use the dynamic, it's a hell of a lot easier. sure, as soon as it works I'll use it ;) > probably, but without a traceback it's going to be hard to find > out exactly what. > $ cp Makefile.static Makefile $ make cc -g -DYP -DFreeBSD -Wall -pedantic -ansi -c -I../../libc/include nss-test.c cc -g -nostdlib -static -L../../libc -o nss-test nss-test.o ../../csu/i386-elf/crt1.o ../../csu/i386-elf/crti.o -lc $ ./nss-test files called files called retval = 1 NS_SUCCESS Bus error (core dumped) $ gdb nss-test nss-test.core GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... Core was generated by `nss-test'. Program terminated with signal 10, Bus error. #0 0x80528e4 in ?? () (gdb) where #0 0x80528e4 in ?? () #1 0x80481ff in _start () at crt1.c:95 (gdb) as I said in the first mail, this has to do with crt1.c calling atexit() with a valid address (0x80528e4) and somehow the argument to atexit() getting to be NULL once inside atexit()... I'd really like to use the dynamic stuff but I can't seem to make it compile. > Of course we are, please file a PR when you think it's pretty much > completed or email -hackers if you need/want advice. :) Ok, I'll start firing questions about NIS at -hackers regards, -oscar -- pgp public key: finger obonilla@fisicc-ufm.edu pgp fingerprint: 6D 18 8C 90 4C DF F0 4B DF 35 1F 69 A1 33 C7 BC To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message