undefined reference to `_getopt_internal' when doing 'make buildw orld'

Loh John Wu ljwu at sandvine.com
Tue Nov 11 10:26:23 PST 2003


Hello,

I'm getitng this error when I try to a make buildworld on a 4.7-RELEASE
tree.
It's very strange because both getopt.c and getopt1.c have the same
reference to _getopt_internal
but only getopt1.c has an undefined reference to it, see below:

/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib -I/src/gnu/usr.bin/gperf
-static -o gperf b
ool-array.o gen-perf.o hash-table.o iterator.o key-list.o list-node.o main.o
new
.o options.o read-line.o trace.o vectors.o version.o hash.o getopt.o
getopt1.o
getopt1.o: In function `getopt_long':
/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/getopt1.c(.text+0x22):
undefined reference to `_getopt_internal'
getopt1.o: In function `getopt_long_only':
/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/getopt1.c(.text+0x52):
undefined reference to `_getopt_internal'
*** Error code 1

Stop in /src/gnu/usr.bin/gperf.

*** Error code 1

Stop in /src.
*** Error code 1

any help would be greatly appreciated.
Thanks,
John


More information about the freebsd-questions mailing list