Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Oct 2010 17:47:51 -0700
From:      Charlie Kester <corky1951@comcast.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: porting: Linux to Freebsd
Message-ID:  <20101004004751.GA74984@comcast.net>
In-Reply-To: <DF735188ED91BD458FA0E0C17929339F9553CA27@GUREXMB01.ASIAN.AD.ARICENT.COM>
References:  <DF735188ED91BD458FA0E0C17929339F9553CA27@GUREXMB01.ASIAN.AD.ARICENT.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
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.)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101004004751.GA74984>