Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2007 11:11:23 -0600
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        bv@wjv.com
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 6.2 buildworld fails with NO_SHARED
Message-ID:  <790a9fff0701260911h7137c777p82376b633190718b@mail.gmail.com>
In-Reply-To: <20070126161022.GB29530@wjv.com>
References:  <20070126161022.GB29530@wjv.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/26/07, Bill Vermillion <bv@wjv.com> wrote:
> I had wanted to build static binaries in /bin and /sbin - so
> I set NO_SHARED.  The man pages says "... this can be bad. If set
> every utility that uses bsd.prog.mk will be linked statically."
>
> I have problems in the past - on other platforms - where having
> statically linked tools in /bin saved the day. [Fixing things that
> some other SA's had no clue about as to what they were doing].
>
Since FreeBSD went to dynamically linked binaries, there is the
/rescue directory which contains static binaries of the programs you
would need to recover from a failure.

> There really is nothing to indicated what 'bad' may be - other than
> statically linking these.
>
> I took the NO_SHARED out and the buildworld went just fine.
>
> Is this a bug?  I would think if the variable is set and useable
> things should work.
>
Seems to be a bug, as their appears to be missing libraries in the
NO_SHARED case.

> Here is the tail end of the output of make buildworld as I mailed
> it to me from the machine I was bringing up as we start to replace
> all the 4.11 servers.
>
> The verison is 6.2-STABLE with the tag in the cvsup set
> as RELENG_6_2.  So this is exact with the release on Jan 19.
>
> Do I need to send this to anyone to look at.  Any hints? Or should
> I just 'fugidaboudid'
>

> > cc -O2 -fno-strict-aliasing -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter  -static -o gstat gstat.o -lgeom -ldevstat -lbsdxml -lcurses -ledit

sbuf(9) - sbuf_new, sbuf_clear, sbuf_setpos, sbuf_bcat, sbuf_bcopyin,
sbuf_bcpy, sbuf_cat, sbuf_copyin, sbuf_cpy, sbuf_printf, sbuf_vprintf,
sbuf_putc, sbuf_trim, sbuf_overflowed, sbuf_finish, sbuf_data,
sbuf_len, sbuf_delete - safe string formatting

> > : undefined reference to `sbuf_new'
> > : undefined reference to `sbuf_finish'
> > : undefined reference to `sbuf_data'
> > : undefined reference to `sbuf_delete'
> > : undefined reference to `sbuf_bcat'

Not sure which library has the above function in them.

The following functions seem to be defined in libkvm.
> > : undefined reference to `kvm_read'
> > : undefined reference to `kvm_geterr'
> > : undefined reference to `kvm_nlist'
> > : undefined reference to `kvm_geterr'

curs_termcap (3X) - tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs
- direct curses interface to the terminfo capability database
> > : undefined reference to `tgoto'
> > : undefined reference to `tgetstr'
> > : undefined reference to `tgetent'
> > : undefined reference to `tgetflag'
> > : undefined reference to `tgetnum'

These seem to come from curses, but are not in your libcurses library.
 Is there another library these functions come from?

Scot
-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0701260911h7137c777p82376b633190718b>