From owner-freebsd-questions@FreeBSD.ORG Sat Apr 19 00:47:33 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2C3106564A for ; Sat, 19 Apr 2008 00:47:33 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id B5EB58FC18 for ; Sat, 19 Apr 2008 00:47:32 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from epia-2.farid-hajji.net (epia-2 [192.168.254.11]) by fw.farid-hajji.net (Postfix) with ESMTP id C378133F2C; Sat, 19 Apr 2008 02:47:30 +0200 (CEST) Date: Fri, 18 Apr 2008 18:47:28 -0600 From: cpghost To: Adam J Richardson Message-ID: <20080418184728.0cb51e60@epia-2.farid-hajji.net> In-Reply-To: <48093BA9.1050800@gmail.com> References: <480938D0.8040100@crackmonkey.us> <48093BA9.1050800@gmail.com> Organization: Cordula's Web X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Where to have my .so files install? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 00:47:33 -0000 On Fri, 18 Apr 2008 20:24:09 -0400 "Aryeh M. Friedman" wrote: > Adam J Richardson wrote: > > Hi all. > > > > I'm writing a program which uses .so files as plugins. Now I need > > to decide where on the filesystem to install the plugins. I don't > > want to clutter the system locations like /lib and /usr/lib. Can > > anyone suggest a decent install location? Google doesn't help much > > with this. > > > > TiA, > > Adam J Richardson > > /usr/local/lib To expand a bit: don't put your own stuff in /lib or /usr/lib, since this is used by FreeBSD's userland itself. On FreeBSD, third party stuff goes into /usr/local/{lib,bin,etc,...}. See hier(7). As to plugins: if you've got many of them, it's better to group them in a subdirectory of /usr/local/lib: /usr/local/lib/${YOUR_PROGNAME}/*.so and dlopen(3) them using this path. -cpghost -- Cordula's Web. http://www.cordula.ws/