LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 10-02-2012, 03:35 PM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
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:
You need the following libraries:

- json-c
- libcurl
- libstdc++
- libgcrypt
- Boost (Boost filesystem and program_option are required)

There are also some optional dependencies:
- CppUnit (for unit tests)
- libbfd (for backtrace)
- binutils (for libiberty, required for compilation in OpenSUSE & ubuntu)
TIA
 
Old 10-05-2012, 02:07 PM   #2
ocicat
Member
 
Registered: May 2007
Posts: 208

Rep: Reputation: 48
Quote:
Originally Posted by Kropotkin View Post
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?
First of all, I don't run FreeBSD, but I am conversant enough in other members of the *BSD family to give you the correct answer.

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.
 
Old 10-06-2012, 02:55 AM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
Thanks for the helpful feedback. I ran into some ugly compile errors with Boost, so I am temporarily flummoxed
 
Old 10-08-2012, 01:08 PM   #4
ocicat
Member
 
Registered: May 2007
Posts: 208

Rep: Reputation: 48
Quote:
Originally Posted by Kropotkin View Post
I ran into some ugly compile errors with Boost, so I am temporarily flummoxed
Obviously, it would be easier to simply install the port.

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
about compiling linux and freebsd kernel kusanagiyang Linux - Newbie 1 03-18-2010 02:45 AM
(looks like) memory leak after reinstalling everything in Port Tree. Mr_Shameless *BSD 1 05-25-2007 05:57 AM
Can't update FreeBSD Ports Tree Temujin_12 *BSD 12 06-11-2005 09:04 PM
Mplayer compiling error FreeBSD 4.10 agarfors *BSD 8 09-28-2004 05:30 AM
Compiling FreeBSD 4.5 Enforcer *BSD 2 07-15-2002 01:33 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration