[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro


  • To: Nick Betteridge <buzzheavyyear@xxxxxxxxxxx>
  • From: Dave Scott <Dave.Scott@xxxxxxxxxx>
  • Date: Thu, 11 Jun 2015 17:31:48 +0000
  • Accept-language: en-GB, en-US
  • Cc: "xen-api@xxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 11 Jun 2015 17:31:56 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>
  • Thread-index: AQHQn3CpuZM3j+bqo0SvZyKlsx6JlZ2d2IYAgAAIJYCAAXTkgIAEraQAgAABUgCAA3AtAIAAA+IA
  • Thread-topic: [Xen-API] Building for cubieboard4 with vanilla linux/linaro

> On 11 Jun 2015, at 18:17, Nick Betteridge <buzzheavyyear@xxxxxxxxxxx> wrote:
> 
> > From: Dave.Scott@xxxxxxxxxx
> > > dpkg-source: info: using source format `3.0 (quilt)'
> > > dpkg-source: info: building liblwt-ocaml using existing 
> > > ./liblwt-ocaml_2.4.8.orig.tar.gz
> > > dpkg-source: info: building liblwt-ocaml in 
> > > liblwt-ocaml_2.4.8-1.debian.tar.gz
> > > dpkg-source: info: building liblwt-ocaml in liblwt-ocaml_2.4.8-1.dsc
> > > debian/rules build
> > > dh build --with ocaml --with python2
> > > dh_testdir
> > > dh_ocamlinit
> > > sed -e 's%@OCamlABI@%4.01.0%g' -e 's%@OCamlStdlibDir@%/usr/lib/ocaml%g' 
> > > -e 's%@OCamlDllDir@%/usr/lib/ocaml/stublibs%g' -e 's/^OPT: //' -e 
> > > '/^BYTE: /d' -e 's/^DYN: //' debian/liblwt-ocaml.install.in > 
> > > debian/liblwt-ocaml.install
> > > sed -e 's%@OCamlABI@%4.01.0%g' -e 's%@OCamlStdlibDir@%/usr/lib/ocaml%g' 
> > > -e 's%@OCamlDllDir@%/usr/lib/ocaml/stublibs%g' -e 's/^OPT: //' -e 
> > > '/^BYTE: /d' -e 's/^DYN: //' debian/liblwt-ocaml-dev.install.in > 
> > > debian/liblwt-ocaml-dev.install
> > > touch ocamlinit-stamp
> > > debian/rules override_dh_auto_build
> > > make[1]: Entering directory `/tmp/buildd/liblwt-ocaml-2.4.8'
> > > debian/build.sh
> > > ocamlfind: Package `bytes' not found
> > > W: Field 'pkg_bytes' is not set: Command ''/usr/bin/ocamlfind' query 
> > > -format %d bytes > '/tmp/oasis-676905.txt'' terminated with error code 2
> > > E: Cannot find findlib package bytes
> > > E: Failure("1 configuration error")
> > > make[2]: Entering directory `/tmp/buildd/liblwt-ocaml-2.4.8'
> > > ocamlopt.opt -o setup.exe setup.ml || ocamlopt -o setup.exe setup.ml || 
> > > ocamlc -o setup.exe setup.ml
> > > rm -f setup.cmx setup.cmi setup.o setup.obj setup.cmo
> > > ./setup.exe -configure 
> > > ocamlfind: Package `bytes' not found
> > > W: Field 'pkg_bytes' is not set: Command ''/usr/bin/ocamlfind' query 
> > > -format %d bytes > '/tmp/oasis-e7da27.txt'' terminated with error code 2
> > > E: Cannot find findlib package bytes
> > > E: Failure("1 configuration error")
> > > make[2]: *** [setup.data] Error 1
> > > 
> > > 
> > > - bytes is only included with ocaml 4.02 and later - this is being 
> > > compiled with 4.01, I think.
> > > 
> > > Could anyone tell be how to change buildroot to use 4.02?
> > 
> > There’s another way — a virtual “bytes” package is included in later 
> > versions of ocamlfind for use by older OCamls IIRC. So you could either 
> > upgrade ocamlfind or ocaml.
> > 
> > Where are you getting your ocamlfind and ocaml from?
> 
> Finally beginning to understand the flow here - all of the debian packages 
> for pbuilder [& cowbuilder?] are being pulled down from ubuntu to 
> /var/cache/pbuilder/aptcache and the following, old packages for 
> findlib/ocamlfind are:
> 
> libfindlib-ocaml_1.4-2_armhf.deb
> libfindlib-ocaml-dev_1.4-2_armhf.deb
> ocaml-findlib_1.4-2_armhf.deb
> 
> and what is needed to deal with 'bytes' issue, I suspect, are the latest:
> 
> libfindlib-ocaml-dev_1.4.1-1_armhf.deb
> libfindlib-ocaml_1.4.1-1_armhf.deb
> ocaml-findlib_1.4.1-1_armhf.deb
> 
> I pulled down the latest ones are cunningly tried to replace the old files, 
> but those canny signatures caused the real packages to be re-downloaded.
> 
> This is a real show-stopper :(
> 
> Can you think of any way that this can be circumvented?

I’m not totally familiar with .deb building but I think ocaml and ocamlfind are 
being downloaded from the configured package repositories. Have a look in 
./scripts/deb/templates/pbuilderrc, particularly the OTHERMIRROR and 
EXTRAPACKAGES lines:

OTHERMIRROR="deb file:@PWD@/RPMS/ ./ |deb 
http://xenbits.xenproject.org/djs/linaro-xen-4-4-talex5/ ./ |deb-src 
file:@PWD@/SRPMS/ ./\
...
EXTRAPACKAGES="apt-utils fakeroot gettext intltool-debian python bsdmainutils 
debhelper dh-apparmor dh-ocaml file gettext-base groff-base man-db"

I think we could either

(1) build a custom ocamlfind with a later version number, put it online and 
mention the repo in OTHERMIRROR; or
(2) make a ‘bytes’ package containing only the fake package metadata, put it 
online and mention it in OTHERMIRROR and EXTRAPACKAGES.

Sorry it’s all a bit ugly!

I suspect later Ubuntu images will be easier since they’ll come with the later 
ocamlfind.

Cheers,
Dave
_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.