From owner-freebsd-questions@FreeBSD.ORG Thu Mar 10 15:55:02 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AED716A4CF for ; Thu, 10 Mar 2005 15:55:02 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E47FF43D41 for ; Thu, 10 Mar 2005 15:55:01 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j2AFswke018251; Thu, 10 Mar 2005 09:54:58 -0600 (CST) (envelope-from dan) Date: Thu, 10 Mar 2005 09:54:58 -0600 From: Dan Nelson To: Olaf Greve Message-ID: <20050310155458.GE9663@dan.emsphone.com> References: <001c01c5001f$a8fce7a0$7e35c2cb@mafxp> <42301918.5020200@axis.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42301918.5020200@axis.nl> X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: questions@freebsd.org Subject: Re: Native POSIX threads + Java under FreeBSD 5.3 release i386 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2005 15:55:02 -0000 In the last episode (Mar 10), Olaf Greve said: > As is typical, I have once again been given very limited time to get > something running, and there are some interesting things to figure > about about it. :) > > In brief, the application is a distributed one, loosely based on some > CORBA concepts, though differently (fortunately!). The supported > programming languages are C/C++/Java/Ada, of which Java will probably > be the one we would like to use. > > Now, the issue is (or may be), that the recommended (and only tested) > platforms are Solaris and Linux (particularly Red Hat and SuSe - > kernel versions 9). The apparent reason for this, is that the > platform requires the NPTL (Native Posix Threads Library). Why would they require an OS-specific threads library, instead of simply requiring Posix threads? I can tell you right now that Solaris doesn't support NPTL, just the same way Linux doesn't support Solaris's thread library :) If you have limited time, I'd say just use either Solaris 10 or Linux. If you have problems on FreeBSD, they won't help you. If it was a longer-term project where you had time to resolve problems yourself, I'd say spend the time to get it working on FreeBSD. > I'm looking somewhat into the support for NPTL under FreeBSD 5.3 > release i386, and I have come across the following URL: > http://www.unobvious.com/bsd/freebsd-threads.html From this, it > sounds like the LinuxThreads (i.e. > /usr/ports/devel/linuxthreads) should do the trick. That page is 2 years old, and even says right in the middle, before comparing libc_r and linuxthreads: WARNING: The rest of this document does not describe thread support in FreeBSD 5.x . You have been warned. > However, I have no experience with these threads and I wonder whether it > is a good idea to try to get the platform working under FreeBSD (my > favourite Unix), or whether it may be better to install Red Hat or SuSe > this once. :) > > Can anyone tell me something about the following: > 1) Does the linuxthreads library provide 100% NPTL support, as under Linux? Linuxthreads is the Linux 2.4 and below threads package. NPTL is the name for the threads implementation in Linux 2.6 kernels. As far as I know, linuxthreads and NPTL are relatively ABI-compatible. > 2) Does usage of the library incur a kernel recompilation, or will all > scripts of the platform have to be changed such that the linuxthreads > library is linked in? The kernel don't come into the equation. If you want to use Linuxthreads with an existing threaded application, you will need to recompile (take a look at one of the mysql ports to see how to configure a program for linuxthreads). All the native FreeBSD threads libraries (libpthread, libthr, libc_r) are ABI-compatible with each other (so you can switch between them via libmap.conf) but not with Linuxthreads. > 3) A different question: what is the best JDK 1.4.x port to install, > and does one of those perhaps have support for NPTL? The native one (ports/java/jdk14), and no. > I hope anyone can help me out a bit with this, even if it only is > about whether to make the best choice between figuring out how to get > this platform going under FreeBSD (being the Unix with which most > experience I have), or whether to try to go Linux and have a > -perhaps- more straightforward installation of the platform (at the > expense of not knowing the particular intricacies of those Linuxes). > > Help/opinions are very much appreciated. :) -- Dan Nelson dnelson@allantgroup.com