FreeBSD: compiling outside port tree
Hi all,
I've compiled countless ports in the FreeBSD /usr/port tree, as well as packages under Linux which were not available through package managers such as apt or yum. But I've never compiled anything outside the FreeBSD port tree. I see something on GitHub I'd like to run: https://github.com/Grive/grive Can I simply unpack it and run ./configure --prefix=/usr/local or are there also other considerations? I am not asking about dependencies: these are clearly indicated: Quote:
|
Quote:
In a perfect world, code could be compiled on any platform, & it would magically execute as expected. However, this isn't a perfect world. POSIX attempts to identify the lowest common denominator which should be portable on all POSIX-compliant systems, but software found in the wild has rapidly become Linux-centric, & Unix-like platforms support POSIX to varying degrees . Developers are increasingly devaluing the importance of being cross-compatible. Consider this. Not all libraries available on Linux will be found on the *BSD family nor Solaris. Different libraries may exist which provide similar capabilities, but not in a compatible manner. You should also compare the hier(7) manpages between Linux & FreeBSD. You will find that they are not identical. The results of all of this is that software found in the wild today will more probably run on Linux with no changes, but you will likely need to study the source & possibly figure out what patches need to be applied in order to run on FreeBSD. This is one of the values of FreeBSD's officially sanctioned ports tree. Someone else has already gone through the grief of figuring this out before, & the process has since been automated. So to answer your original question, maybe code found on GitHub will compile without changes on FreeBSD, but experience points out that this is likely an unrealistic expectation. The definitive answer is to simply try it yourself & see. |
Thanks for the helpful feedback. I ran into some ugly compile errors with Boost, so I am temporarily flummoxed ;)
|
Quote:
However if you really want to learn, you could build the port to see what has been done before you (by studying the Makefile & whatever patches are necessary...) to get Boost to install. |
All times are GMT -5. The time now is 08:35 PM. |