Author Topic: Compiling Oe On Freebsd  (Read 4880 times)

staffanu

  • Newbie
  • *
  • Posts: 2
    • View Profile
Compiling Oe On Freebsd
« on: August 31, 2005, 12:06:41 pm »
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
« Last Edit: August 31, 2005, 12:08:56 pm by staffanu »

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Compiling Oe On Freebsd
« Reply #1 on: August 31, 2005, 12:40:49 pm »
If you run into troubles, could you sent a mail to oe@handhelds.org? Our BSD expert doesn't read these forums.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

staffanu

  • Newbie
  • *
  • Posts: 2
    • View Profile
Compiling Oe On Freebsd
« Reply #2 on: September 01, 2005, 07:12:30 pm »
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...

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Compiling Oe On Freebsd
« Reply #3 on: September 01, 2005, 10:26:29 pm »
hmmm... for a second I thought you were compiling freebsd using OE.  Would be cool if it were possible.
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf