OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Compiling Oe On Freebsd, Problems/solutions building on FreeBSD
staffanu
post Aug 31 2005, 08:06 AM
Post #1





Group: Members
Posts: 2
Joined: 31-August 05
Member No.: 8,001



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 org.openembedded.dev 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 patcher-native_20040913.bb 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 quilt-native_0.39.bb 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 gawk-native_3.1.4.bb. 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 quilt-native_0.39.bb 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!

Staffan
Go to the top of the page
 
+Quote Post
koen
post Aug 31 2005, 08:40 AM
Post #2





Group: Members
Posts: 1,014
Joined: 4-January 05
From: Enschede, The Netherlands
Member No.: 6,107



If you run into troubles, could you sent a mail to oe@handhelds.org? Our BSD expert doesn't read these forums.
Go to the top of the page
 
+Quote Post
staffanu
post Sep 1 2005, 03:12 PM
Post #3





Group: Members
Posts: 2
Joined: 31-August 05
Member No.: 8,001



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...
Go to the top of the page
 
+Quote Post
adf
post Sep 1 2005, 06:26 PM
Post #4





Group: Members
Posts: 2,821
Joined: 13-September 04
From: Wasilla Ak.
Member No.: 4,572



hmmm... for a second I thought you were compiling freebsd using OE. Would be cool if it were possible.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2014 - 03:28 AM