Why this linking fail?

Unga unga888 at yahoo.com
Thu Jul 17 03:49:42 UTC 2008


--- On Thu, 7/17/08, Unga <unga888 at yahoo.com> wrote:

> From: Unga <unga888 at yahoo.com>
> Subject: Why this linking fail?
> To: freebsd-questions at freebsd.org
> Date: Thursday, July 17, 2008, 11:28 AM
> Hi all
> 
> I have compiled and installed following libraries
> separately:
> /usr/src/lib/csu
> /usr/src/lib/libc
> /usr/src/lib/msun
> 
> When I link to them, I get following errors:
> /usr/lib/libc.so: undefined reference to `_nsyylex'
> /usr/lib/libc.so: undefined reference to `_nsyyin'
> /usr/lib/libc.so: undefined reference to `_nsyytext'
> /usr/lib/libc.so: undefined reference to `_nsyyerror'
> /usr/lib/libc.so: undefined reference to `_nsyylineno'
> collect2: ld returned 1 exit status
> 
> Search for those names shows following:
> cd /usr/src/
> 
> grep -lr _nsyylex .
> ./include/nsswitch.h
> ./lib/libc/net/Symbol.map
> 
> grep -lr _nsyyin .
> ./lib/libc/net/nsdispatch.c
> 
> grep -lr _nsyytext .
> ./lib/libc/net/nsparser.y
> 
> grep -lr _nsyyerror .
> ./include/nsswitch.h
> ./lib/libc/net/Symbol.map
> ./lib/libc/net/nslexer.l
> 
> grep -lr _nsyylineno .
> ./include/nsswitch.h
> ./lib/libc/net/Symbol.map
> ./lib/libc/net/nsparser.y
> 
> That is, they are all from /usr/src/lib/libc/net. Does this
> means the /usr/src/lib/libc/net is not in the new libc.so.7?
> What does above errors shows?
> 
> Appreciate your help in this regard. Many thanks in
> advance.
>

Sorry guys, I have found an issue. In the libc compile log shows following error:
lex  -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l |  sed -e '/YY_BUF_SIZE/s/16384/1024/' >nslexer.c
lex: fatal internal error, exec failed

Let me check why the lex failed.

Unga


      


More information about the freebsd-questions mailing list