Subject: Re: Question regarding the libc library.
To: Martin Husemann <>
From: Shankar Agarwal <>
List: tech-userlevel
Date: 07/19/2001 09:27:47
Hi Martin,
Thanks a lot for the kind help. I am trying to build libc for sparc64
and i was getting problem with _nsyylval symbol in nsparser.o and
_nsyyparse symbol in nsdispatch.o. It says undefined symbol when i try
to build a binary out of this library. The snapshot that you gave me
uses lex but the lex that we have does not have the -P option so i used
flex instead of that. Also instead of yacc i have used bison because of
the similar problem i.e -o option not available with yacc. So is this
problem because of the different tools that i am using or i am missing
something while compiling. If you can help me i will be really grateful
to you as i am stuck with this problem for past 3 days.
Martin Husemann wrote:
> > I was looking for the snapshot of the make options for nsparser.y and
> > nslexer.l files. I am trying to port these to sparc64. Also i wanted to
> > see what are the options for the Netbsd kernel for these files.
> Sorry, I can't parse that.
> I just build all of usr/src/lib on NetBSD/sparc64, so what are you porting
> where to? What has the kernel got to do with this?
> The "snapshot" you are looking for are the commands invoked by make?
> On -current that is:
>  > make nsparser.o nslexer.o
> yacc  -p_nsyy -d -o nsparser.c /usr/src/lib/libc/net/nsparser.y
> cc -O -pipe -DALL_STATE -DUSG_COMPAT  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized   -D_LIBC -DNLS -DYP -DHESIOD -DLIBC_SCCS -DSYSLIBC_SCCS  -D_REENTRANT -I/usr/src/lib/libc/include -DINET6 -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DWITH_RUNE -DRUNEMOD_MAJOR=3  -D_PATH_LOCALEMODULE=\"/usr/lib/runemodule\" -DRESOLVSORT -I. -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT -c nsparser.c
> lex  -P_nsyy -t /usr/src/lib/libc/net/nslexer.l | sed -e '/YY_BUF_SIZE/s/16384/1024/' >nslexer.c
> cc -O -pipe -DALL_STATE -DUSG_COMPAT  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized   -D_LIBC -DNLS -DYP -DHESIOD -DLIBC_SCCS -DSYSLIBC_SCCS  -D_REENTRANT -I/usr/src/lib/libc/include -DINET6 -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DWITH_RUNE -DRUNEMOD_MAJOR=3  -D_PATH_LOCALEMODULE=\"/usr/lib/runemodule\" -DRESOLVSORT -I. -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT -c nslexer.c
> Martin