Author Topic: Help With Bb File  (Read 23004 times)

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« on: July 17, 2006, 12:32:50 am »
Hi all,
I really need some help with this. I am running Suse 10 and have successfully installed bitbake, the OE.db, compiled a gpe-image and mysql. Here is my question. I am trying to compile plutohome orbiter for the zaurus (akita). PlutoHome is a open source home automation suite. It uses an "orbiter" as a remote using either bt or wifi. I would love to get this software running on my c1000. IF I can get it to compile, I'll get another c1000 or two to use in the new home automation setup.

Here is the problem. As I mentioned above, I have the environment setup such that I can compile anything that already has a recipe/BB file. I am trying to compile PlutoOrbiter. It requires SerializeClass, PlutoUtils, DCE and a number of header files from other Pluto specific packages. I am starting with a relatively simple lib from pluto called SerializeClass. I have successfully compiled it on pocketworkstation on my z but I can't seem to figure out how to compile it using bitbake.

One question is: the source for PlutoHome is in svn. How do I write in the recipe to download it from the svn repository?

Here is my BB file:

LICENSE = "GPL"
DESCRIPTION = "PlutoHome SerializeClass for Akita"
SECTION = "base"
PRIORITY = "optional"
MAINTAINER = ""
DEPENDS = ""
PR = "r1"

SRC_URI = "http://svn.plutohome.com/pluto/trunk/src/SerializeClass/"

S = "${WORKDIR}/SerializeClass-${PV}"

inherit gpe-image

ALLOW_EMPTY = "1"

PACKAGES = "${PN}"

FILES_${PN} = "/usr/local/bin/*"  


Here is the result of "bitbake SerializeClass_SVN"
oc60174:/home/oc60174/crosscompileOE/stuff/build # bitbake SerializeClass_SVN
NOTE: Psyco JIT Compiler (http://psyco.sf.net) not available. Install it to increase performance.
NOTE: Using cache in '/home/oc60174/crosscompileOE/stuff/build/tmp/cache'
NOTE: Parsing finished. 2649 cached, 1 parsed, 35 skipped, 0 masked.
NOTE: build 200607162222: started

OE Build Configuration:
BB_VERSION     = "1.4.2"
OE_REVISION    = "e1e2c14d38a8ce5263bb95e2c150225a0a822a6b"
TARGET_ARCH    = "arm"
TARGET_OS      = "linux"
MACHINE        = "akita"
DISTRO         = "openzaurus"
DISTRO_VERSION = "3.5.4.1"
TARGET_FPU     = "soft"

ERROR: Nothing provides dependency SerializeClass_SVN
NOTE:

Here is my local.conf file:
DL_DIR = "${HOME}/crosscompileOE/stuff/sources"
BBFILES = "/home/oc60174/crosscompileOE/stuff/org.openembedded.oz354x/packages/*/*.bb"
BBMASK = ""
PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-qpe"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
MACHINE = "akita"
TARGET_ARCH = "arm"
TARGET_OS = "linux"
DISTRO = "openzaurus-3.5.4.1"
KERNEL_VERSION = "2.6"
INHERIT = "package_ipk"
IMAGE_FSTYPES = "jffs2 tar"
BBINCLUDELOGS = "yes"
CVS_TARBALL_STASH = "http://www.oesources.org/source/current/"
#added because qemu-native puked on make
ASSUME_PROVIDED +="qemu-native"

Any and all help is very much appreciated.

Rob
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #1 on: July 17, 2006, 06:38:23 am »
Grep the packages directory, there are a number of other packages which use svn as their source.

E.g.:

SRC_URI = "svn://svn.minisip.org/var/svn/minisip/trunk;module=libmnetutil"

Also, you'll get more OE devs looking at stuff if you post it to the oe mailing list, or ask in #oe.

I don't think you want this either: inherit gpe-image

Try basing it on a simple .bb like the one for octave, but remove the FILES_${PN}-dev line.

The .bb can contain almost nothing, other than the header info, as long as the package is cross-compiler friendly,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #2 on: July 17, 2006, 10:58:23 am »
lardman,
Thanks for the quick reply. I'll give it a shot. I didn't want to go to the mailing list until I could get it to do something. At this point, I don't even think it is finding the .bb file

Rob
« Last Edit: July 17, 2006, 11:58:51 am by DoTheDog »
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #3 on: July 17, 2006, 06:45:05 pm »
This Pluto thing looks pretty cool.

Let me know how you're getting on (can you use irc - #openzaurus is a good place). In any case I'll take a look at it tomorrow if I've got a bit of free time.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #4 on: July 17, 2006, 11:19:05 pm »
Quote
This Pluto thing looks pretty cool.

Let me know how you're getting on (can you use irc - #openzaurus is a good place). In any case I'll take a look at it tomorrow if I've got a bit of free time.


Si
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

lardman,
I appreciate the help. I got some help on the #openzaurus channel and moved forward, I got the source to download, but now I need help with the static makefile.

I posted it here:  [a href=\"http://pastebin.ca/90877]http://pastebin.ca/90877[/url]

It requires another package for the make.rules file. It also tries to install the .so file to .../lib. I'm pretty sure it should go somewhere else

Is there a way to have bitbake just download the source for PlutoUtils (where the make.rules file lives) not compile it (because I'm sure that it requires more dependencies), then compile SerializeClass based on the PlutoUtils make.rules?

Looks like you are in the U.K. I'll try the #openzaurus channel tomorrow morning (evening your time?)

Thanks again for your help.

Rob
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #5 on: July 18, 2006, 08:03:20 am »
I note that there's a download directory which does work here:

http://debsarge.plutohome.com/download/source/

Which may eliminate your svn issues.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #6 on: July 18, 2006, 08:07:14 am »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #7 on: July 18, 2006, 08:24:00 am »
Quote
Is there a way to have bitbake just download the source for PlutoUtils (where the make.rules file lives) not compile it (because I'm sure that it requires more dependencies), then compile SerializeClass based on the PlutoUtils make.rules?

It could be done, but are you sure it's not required in compiled form?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #8 on: July 18, 2006, 08:43:37 am »
lardman,
I finally figured out (with the help of someone on #openzaurus) how to get the source through svn. I needed to add proto=http at the end of the line:)

Anyway, you are right, I do need to eventually compile PlutoUtils (along with DCE and SerializeClass) however I need the source e.g. headers and such from about 5 more packages (utilities, RA, plutomain, etc.) to build the PlutoOrbiter. I've been working with a Dev over at PlutoHome.com to get it to compile native in Pocketworkstation (Sharp Rom). http://plutohome.com/support/phpbb2/viewtopic.php?t=788

I almost have it.  However, it will be very hard to replicate if I get another zaurus for a second orbiter. I was thinking if I could get it working in OE then I could build packages to install which everyone could use...

So back to the question, I think that the OE build for SerializeClass fails because it is looking for the make.rules file in the PlutoUtils source. I think it is also looking for stuff in Gen_Devices which is another package I just need header files from. The Makefile uses relative paths to all of this. I think it assumes the package folders are all on the same level. e.g. Gen_Devices is at ../Gen_Devices etc.

Anyway, I'm on my way to work. I'll see if I can catch you on #openzaurus later.
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #9 on: July 18, 2006, 08:49:10 am »
Quote
So back to the question, I think that the OE build for SerializeClass fails because it is looking for the make.rules file in the PlutoUtils source. I think it is also looking for stuff in Gen_Devices which is another package I just need header files from. The Makefile uses relative paths to all of this. I think it assumes the package folders are all on the same level. e.g. Gen_Devices is at ../Gen_Devices etc.

Yes, it looks that way - you can manually set the root build directory for the files though, so this shouldn't be the end of the world, though it won't work if people remove the source after building each component (I'm assuming libplutoutils is required and that you'll have to build it at some point anyway).

In which case I'm not so sure, and you might ask in #oe or on the oe mailing list as to the best approach - whether to copy this file to staging, or to download this file directly (assuming it's only this one that's needed) from SVN (which might be easier) and patch the makefile in both cases.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #10 on: July 18, 2006, 03:45:11 pm »
lardman,
Sorry I had to bail on you, but I had a bunch of people gathering in my office for a meeting. Work bites  I'll try you again tomorrow.

Thanks again for all  of your help!

Rob
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help With Bb File
« Reply #11 on: July 18, 2006, 04:57:28 pm »
Rob,

No worries, I was starting to see double anyway - something to do with 33C all day in my office. My toolchain build should be done overnight (my night) so post your current .bb and I'll take a look at it tomorrow before you come online,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #12 on: July 18, 2006, 10:48:50 pm »
lardman,
So here is the last .bb file I tried:

Code: [Select]
LICENSE = "GPL"
DESCRIPTION = "SerializeClass try 1"
SECTION = "console/util"
MAINTAINER = "me"
SRC_URI = "svn://svn.plutohome.com/pluto/trunk/src;module=SerializeClass;proto=http \
           svn://svn.plutohome.com/pluto/trunk/src;module=PlutoUtils;proto=http"

S = "${WORKDIR}/${PN}"

inherit autotools

It's called ~/crosscompileOE/stuff/org.openembedded.oz354x/packages/SerializeClass/SerializeClass_1.1.1.bb

It threw the following error:
Code: [Select]
oc60174@oc60174:~/crosscompileOE/stuff/build> bitbake SerializeClass
NOTE: Psyco JIT Compiler (http://psyco.sf.net) not available. Install it to increase performance.
NOTE: Using cache in '/home/oc60174/crosscompileOE/stuff/build/tmp/cache'
NOTE: Parsing finished. 2650 cached, 1 parsed, 35 skipped, 0 masked.
NOTE: build 200607182013: started

OE Build Configuration:
BB_VERSION     = "1.4.2"
OE_REVISION    = "e1e2c14d38a8ce5263bb95e2c150225a0a822a6b"
TARGET_ARCH    = "arm"
TARGET_OS      = "linux"
MACHINE        = "akita"
DISTRO         = "openzaurus"
DISTRO_VERSION = "3.5.4.1"
TARGET_FPU     = "soft"

NOTE: package SerializeClass-1.1.1: started
NOTE: package SerializeClass-1.1.1-r0: task do_fetch: started
NOTE: package SerializeClass-1.1.1-r0: task do_fetch: completed
NOTE: package SerializeClass-1.1.1-r0: task do_package: started
ERROR: function do_install failed
ERROR: log data follows (/home/oc60174/crosscompileOE/stuff/build/tmp/work/SerializeClass-1.1.1-r0/temp/log.do_install.7500)
| NOTE: make DESTDIR=/home/oc60174/crosscompileOE/stuff/build/tmp/work/SerializeClass-1.1.1-r0/image install
| make: *** No rule to make target `install'.  Stop.
| FATAL: oe_runmake failed
NOTE: Task failed: /home/oc60174/crosscompileOE/stuff/build/tmp/work/SerializeClass-1.1.1-r0/temp/log.do_install.7500
NOTE: package SerializeClass-1.1.1-r0: task do_package: failed
ERROR: TaskFailed event exception, aborting
NOTE: package SerializeClass-1.1.1: failed
ERROR: Build of SerializeClass failed

Here is the Makefile for SerializeClass
Code: [Select]
ROOT = ..
VIP = ../VIPShared
GDEV = ./Gen_Devices
CXXFLAGS = -Wall -g -ggdb3 -D_GNU_SOURCE
CPPFLAGS = -I./ -I../../ -I../ -I../DCE/ -I../../DCE -I../VIPShared/ -I../../VIPShared -I
/usr/include/mysql -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_DEVEL_DEFINES -DUSE_LZO_
DATAGRID
CXX = g++

sources = SerializeClass.cpp

all: libSerializeClass.so all-recursive

libSerializeClass.so: $(sources:.cpp=.o)
        $(CXX) -shared $(CXXFLAGS) $(CPPFLAGS) -o $@ $(call cpath,$+)
        cp $@ ../lib

libSerializeClass.a: $(sources:.cpp=.o)
        $(AR) rc $@ $(call cpath,$+)
        cp $@ ../lib

clean:
        rm -f $(call cpath,$(sources:.cpp=.o) $(sources:.cpp=.d)) libSerializeClass.so libSerializeClass.a >/dev/null

#include $(ROOT)/PlutoUtils/make.rules
include /home/oc60174/crosscompileOE/stuff/build/tmp/work/PlutoUtils-1.0-r0/PlutoUtils/make.rules
-include $(sources:.cpp=.d)

It looks like it wants the $(ROOT)/PlutoUtils/make.rules. It may also want ../Gen_Devices. VIPShared isn't required.

I've been trying to compile it native in PocketWorkstation (Sharp ROM) using gcc-2.95. I had to download from svn the following:

CreateDevice, DCE, Gen_Devices, Orbiter, pluto_main, PlutoUtils,RA, SerializeClass, Splitter, utilities

I compiled SerializeClass first, PlutoUtils, DCE, then Orbiter. I'm trying to compile Orbiter now, it is throwing out of memory errors, but I think I have that beat. It is taking a long time.

Some other dependencies: I used apt-get
libhttpfetcher-dev
mysql-server
libsdl1.2-dev
libsdl-sge-dev
libsdl-ttf2.0-dev
libxtst-dev
libxmu-dev
libsdl-gfx1.2-dev

it would be very cool to get this going. I want to use this for my home automation software.

Again, Thanks for your help lardman!

Rob
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Help With Bb File
« Reply #13 on: July 19, 2006, 03:28:48 am »
Quote
It's called ~/crosscompileOE/stuff/org.openembedded.oz354x/packages/SerializeClass/SerializeClass_1.1.1.bb

[div align=\"right\"][a href=\"index.php?act=findpost&pid=135634\"][{POST_SNAPBACK}][/a][/div]

package names can only contain [a-z][0-9], so the use of capitals will blow up in your face at packaging time.
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

DoTheDog

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help With Bb File
« Reply #14 on: July 19, 2006, 10:36:20 am »
Koen,
Thanks for that. Unfortunately, the source directories use uppercase letters. There are a number of packages at PlutoHome that do (e.g. PlutoUtils, DCE, SerializeClass, etc.) in that case how do you handle that?

Rob
Z sl-c3100, Planex GW-CF11X Wifi, Home made docking station (4 port powered hub, 60GB 2.5" HD, Belkin Wired USB 10/100 Ethernet card), Belkin F8T003 ver 2.11 BT USB Dongle
Stock Sharp ROM, Tetsu's special kernel v18b, Lots of stuff gleaned off of Meanie's Incredible Site! Debian PocketWorkstation.
Z2 sl-c1000, OZ 3.5.4.1 GPE - Trying to make it a PlutoHome Orbiter