Help - Search - Members - Calendar
Full Version: Compiling Oe On Freebsd
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Zaurus - Everything Development > Open Embedded
I followed the Getting Started instructions to set up a compilation environment on my FreeBSD 5.4 box yesterday. Since FreeBSD is mentioned at some places, I thought this would work without too much trouble.

I thought I would share the problems I ran into, and the solutions I came up with. Some of them are suggestions to change the description, or the source code. Other are just workarounds that I do not really know how to best handle.

My first build of task-bootstrap is still running, so maybe there will be more trouble, but at least I've now got around the first few obstacles (in the order I encountered them):

- The documentation says to set BUILD_OS to freebsdX, where X is the major version of FreeBSD. The bb file defines an alternative PATCHCMD as PATCHCMD_build-freebsd. (I.e., no trailing version number.) I simply ignored setting BUILD_OS to freebsd5, since it is set to freebsd automatically in bitbake.conf (using uname).

- The build of still failed, however. The bb file also needs the same FreeBSD PATCHCMD extension:
PATCHCMD_build-freebsd = "num='%s'; name='%s'; file='%s'; gpatch -p "$num" -i "$file""

- I believe the same patch is needed in I didn't run into the problem, but found it while searching for places that had the patch command hard coded.

(Both the above are due to the fact that the gnu patch program is typically installed as gpatch on FreeBSD).

- The next problem is also due to the same problem: quilt configure needs "--with-patch=/usr/local/bin/gpatch", and this can be added to by adding the line
EXTRA_OECONF_build-freebsd = "--disable-nls --with-patch=/usr/local/bin/gpatch"

- Quilt also does not compile, since it includes "alloca.h". Removing the include is enough. It seems there is a fix at the quilt bug repository, so this problem will probably go away by itself when quilt is upgraded in the future.

- The Makefile for quilt also uses "chmod --reference ...", which is not supported by FreeBSD. For now, I just removed the chmod statement, since I do not believe it is vital.

- Quilt fails for still one more reason: it uses gnu getopt, which is not installed by default on FreeBSD. Installing the port misc/getopt solves this.

- A lot of the bb files assume that "cp", "tar", "find" are the gnu versions. Since these are called "gcp", "gtar", and "gfind" on FreeBSD, and they were present at a lot of locations, what I did was to create a small local bin directory, containing symlinks to the gnu versions, and added this directory first in my PATH when running bitbake. After doing so, I realize that might have been an easier solution for gpatch as well. (It probably removes the need for most patches above...)

So far, this is it. My build is now at compiling glibc. I hope the rest works out ok!

If you run into troubles, could you sent a mail to Our BSD expert doesn't read these forums.
Ok, I've posted follow-ups to the mailing list. If I do eventually succeed in compiling everything using FreeBSD I'll post here to describe the entire process...
hmmm... for a second I thought you were compiling freebsd using OE. Would be cool if it were possible.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.