From owner-freebsd-ports@FreeBSD.ORG Mon Oct 4 00:47:54 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFDCB106566B for ; Mon, 4 Oct 2010 00:47:54 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta11.emeryville.ca.mail.comcast.net (qmta11.emeryville.ca.mail.comcast.net [76.96.27.211]) by mx1.freebsd.org (Postfix) with ESMTP id 951DB8FC08 for ; Mon, 4 Oct 2010 00:47:54 +0000 (UTC) Received: from omta10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by qmta11.emeryville.ca.mail.comcast.net with comcast id EKJj1f0040cQ2SLABQnu93; Mon, 04 Oct 2010 00:47:54 +0000 Received: from comcast.net ([98.203.142.76]) by omta10.emeryville.ca.mail.comcast.net with comcast id EQns1f0021f6R9u8WQnsGi; Mon, 04 Oct 2010 00:47:53 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sun, 03 Oct 2010 17:47:51 -0700 Date: Sun, 3 Oct 2010 17:47:51 -0700 From: Charlie Kester To: freebsd-ports@freebsd.org Message-ID: <20101004004751.GA74984@comcast.net> Mail-Followup-To: freebsd-ports@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Mailer: Mutt 1.5.20 X-Composer: Vim 7.2 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: porting: Linux to Freebsd X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 00:47:55 -0000 On Fri 01 Oct 2010 at 23:42:30 PDT Chetan Shukla wrote: >Hi, >Could someone please outline the steps needed in porting a general >application from Linux to FreeBSD. As others have already pointed out, there are no shortcuts to the righthand side of the learning curve. For most apps, the usual "configure; make; make install" works. It's when it doesn't that you need to be able to draw on the kind of experience that puts you on the righthand side of the curve. In some cases, you really do need to be able to debug and write some code yourself. Apps written in Python or Perl tend to port fairly easily, because the folks who have ported the languages and their main libraries have already done most of the hard work. C and C++ apps, on the other hand, are more likely to surface differences in the Linux and FreeBSD API's. If you're porting one of those, you need to be willing and able to dig in and research those APIs. For a good grounding in the UNIX API's, I'd recommend the Stevens/Rago book "Advanced Programming in the UNIX Environment". The Avoiding Linuxisms article also has a lot of useful information. The Porter's Handbook contains most of what you'll need to know once you've got the app built and running OK and you want to add it to the portstree. (I say "most" because you'll still need to have some profiency with BSD makefiles, and the Handbook doesn't teach you that.)