# Distributing binaries in a portable manner



## kpedersen (Jul 26, 2014)

Hi all,

I am in the position to port some software over to FreeBSD and am wondering how I am going to distribute it in the most portable way possible. The catch is that unfortunately the program is effectively proprietary so I am looking at ways to keep the binary usable for as long as possible. Or at least until the source code is openly available.

I was thinking of compiling it all up into a static .a file and then providing a Makefile that will then perform the final linking step (into an executable) and most importantly link it against the versions of the libraries that are currently installed. This should effectively eliminate issues such as libpng.so.4 not being found because I have libpng.so.5.

I have looked into compiling it against static versions of the library and this will work well enough but I feel distributing it as .a or even .o files will still provide greater flexibility (similar to how NVIDIA distributed the binary blob graphics driver). This software is a big candidate for "bit rot" so I am basically looking for a way to keep it as fresh as possible for as long as possible  

Will this work? Has anyone had experience with doing this in such a "nonstandard" way?

(For those of you (including myself) who dislike proprietary software, don't worry. This software is for controlling a pig feeding system so you are not missing out on much haha.)


----------



## NewGuy (Aug 9, 2014)

You might want to look into building a PBI bundle. PBIs work on PC-BSD/FreeBSD and contain all of the files/libraries needed to run the application. http://wiki.pcbsd.org/index.php/EasyPBI


----------

