From owner-freebsd-threads@FreeBSD.ORG Thu Dec 22 23:01:40 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62C8A16A41F for ; Thu, 22 Dec 2005 23:01:40 +0000 (GMT) (envelope-from steven@lugaru.com) Received: from smtp04.nauticom.net (smtp04-pix.nauticom.net [209.195.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id C329B43D5C for ; Thu, 22 Dec 2005 23:01:37 +0000 (GMT) (envelope-from steven@lugaru.com) Received: from DELL4700 (10.pisq2.xdsl.nauticom.net [209.195.183.203]) by smtp04.nauticom.net (8.12.11/8.12.11) with SMTP id jBMN1aB2054447 for ; Thu, 22 Dec 2005 18:01:36 -0500 (EST) Message-Id: <3.0.5.32.20051222180129.0222e8c0@mailer> X-Sender: steven1:lugaru.com@mailer X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Thu, 22 Dec 2005 18:01:29 -0500 To: freebsd-threads@freebsd.org From: Steven Doerfler Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: pthread binary compatibility with FreeBSD 4 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2005 23:01:40 -0000 I need to build a binary under FreeBSD 5.4 that will run under FreeBSD 4.11 without recompiling. Dynamically linked binaries are out since FreeBSD 4.11 lacks the appropriate libraries, but a statically linked binary from FreeBSD 5.4 seems to work fine under 4.11, as long as it doesn't link with a threading library. Linking with -lpthread or -pthread produces an error immediately at startup: Fatal error 'Can't allocate initial kse.' at line 267 in file /usr/src/lib/libpthread/thread/thr_init.c (errno = 45) Segmentation fault (core dumped) I'm guessing this is because FreeBSD 4.11 lacks KSE's, and support for such older kernels has been removed from pthread? Is there any workaround for this? Maybe a threading library that doesn't depend on KSE's and works under 4.11 too? (I tried libc_r and libthr briefly but without success.) Or a way to build a version of pthread that doesn't use KSE's? Or is there a way to build with FreeBSD 4.11 libraries under FreeBSD 5.4? Thanks for any suggestions. Steven Doerfler