OS check fails on JDK 1.4 & FreeBSD 5.4R

Scott I. Remick scott at sremick.net
Thu May 26 09:10:54 PDT 2005


On Thu, 26 May 2005 09:54:59 -0600, Greg Lewis wrote:

> That would be your problem then.  The test expects to use -lc_r on 5.x
> and higher:
> 
> .if ${OSVERSION} > 500000
> LINKIT= -lc_r
> .else
> LINKIT= -pthread
> .endif

Isn't that backwards? The default threading library changed from libc_r to
libpthread in 5.3

> However, you should have libc_r on 5.4:
...
> So your machine would seem to be somewhat hosed unless you've
> deliberately removed libc_r.

Well isn't this interesting. I guess I thought it was a "could" instead of
a "should". When I updated from 5.2 -> 5.3 I had all sorts of problems
with stuff being linked to both libc_r AND libpthread. The mailing lists
showed I was one of many. Several people reiterated how you need to be
sure to avoid having anything linked to more than one threading library...
you want it to be ALL libc_r or ALL libpthread. And with libpthread being
the new default, I went with the latter.

DuriDuring this transition all sorts of fixes were offered including using
libmap.conf in order to ease the transition from libc_r -> libpthread and
make everything happy and working again. Some people (myself included)
still has issues with things getting linked to libc_r so in order to force
things to clearly break so we could clean up the old linkage and get them
rebuilt, we deleted /usr/lib/libc_r* which was a step also talked about by
many in the mailing lists as part of the steps (Tim Robbins @freebsd.org
comes to mind). I don't recall anyone saying to NOT do that, that it could
be bad, that libc_r was necessary or anything like that.t.

In fact, it was those steps that finally got my system cleaned up and
sorted out, and I've been running happily on libpthread without any libc_r
references ever since.

Dan: I even saw posts from you on the old thread. There was never any
mention about the deletion of libc_r* back then as a solution being bad.

So I guess I have 2 questions now:

1) If libpthread is the new default, replacing libc_r, and you have to
have all things linked to just one or the other, basically libc_r has been
depreciated. How come the OS version check for JDK 1.4 wants libc_r if the
OS > 5.0?

2) What am I to do now, since the purging of all things libc_r when I
upgraded to 5.3 is what ultimately fixed my system and has kept things
running smoothly ever since?

Sorry for being such a newbie on this, it's just frustrating when you
think you've fixed things in an officially-endorsed way, only to
learn you've done something horribly wrong. :(



More information about the freebsd-java mailing list