From owner-freebsd-java@FreeBSD.ORG Thu May 26 16:34:29 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15CCF16A41C for ; Thu, 26 May 2005 16:34:29 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C57543D53 for ; Thu, 26 May 2005 16:34:28 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.3/8.13.3) with ESMTP id j4QGYPMh099792; Thu, 26 May 2005 10:34:26 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.3/8.13.3/Submit) id j4QGYPnN099791; Thu, 26 May 2005 10:34:25 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Thu, 26 May 2005 10:34:24 -0600 From: Greg Lewis To: "Scott I. Remick" Message-ID: <20050526163424.GA99627@misty.eyesbeyond.com> References: <200505221342.19274.vizion@vizion.occoxmail.com> <200505251623.55084.vizion@vizion.occoxmail.com> <20050526052502.GA90963@misty.eyesbeyond.com> <20050526145459.GA98285@misty.eyesbeyond.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-java@freebsd.org Subject: Re: OS check fails on JDK 1.4 & FreeBSD 5.4R X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 16:34:29 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 26, 2005 at 12:04:36PM -0400, Scott I. Remick wrote: > 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 I don't know that its backwards, but it could probably use some help. -lc_r became the official way early on in 5.x, but was reverted to -pthread after 5.2.1. So it was correct for a time, but is now out of date. I suspect that the variable should just go away and ${PTHREAD_LIBS} should take its place. > > 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. [explanation of removing libc_r snipped] > 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? Because its old (see above). > 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? You can do one of the following: 1. Try the attached patch. This would be my preference since if it works I'll try and get it committed. 2. Turn on SKIP_OS_CHECK and eliminate the test altogether. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Makefile.diff" Index: Makefile =================================================================== RCS file: /var/fcvs/ports/java/jdk14/Makefile,v retrieving revision 1.90 diff -u -r1.90 Makefile --- Makefile 11 May 2005 21:18:39 -0000 1.90 +++ Makefile 26 May 2005 16:31:42 -0000 @@ -184,17 +184,11 @@ TESTPROG=testos -.if ${OSVERSION} > 500000 -LINKIT= -lc_r -.else -LINKIT= -pthread -.endif - check-os: .if !defined(SKIP_OS_TEST) -@mkdir -p ${WRKDIR} ; \ rm -f ${WRKDIR}/${TESTPROG} ; \ - gcc ${LINKIT} -o ${WRKDIR}/${TESTPROG} \ + gcc ${PTHREAD_LIBS} -o ${WRKDIR}/${TESTPROG} \ ${FILESDIR}/${TESTPROG}.c > /dev/null 2>&1 @if [ ! -f ${WRKDIR}/${TESTPROG} ] ; \ then \ --1yeeQ81UyVL57Vl7--