Mailing List Archive

Building for cubieboard4 with vanilla linux/linaro
Hi

I'm trying to build, via buildroot, for a cubieboard4 on top of their vanilla linux (3.4) / linaro install.

The first thing I hit with configure was :

Error: could not find a distribution template for Linaro/trusty

- I edited: /etc/lsb-release and changed Linaro to Ubuntu - hope this doesn't affect anything later

The next configuration issue was:

ImportError: No module named argcomplete

- looking at /usr/lib I have 3 versions of python available python2.7, python3 and python3.4.
- doing a python -V gives Python 2.7.6

What's the best way of proceeding here?

Cheers
Nick
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
ImportError: No module named argcomplete

- looking at /usr/lib I have 3 versions of python available python2.7, python3 and python3.4.
- doing a python -V gives Python 2.7.6

What's the best way of proceeding here?

- Took a chance here and installed the default python-pip and it turned out to be a 2.7 version, configure completed :)

Cheers
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
- update : I've hit an old nugget:

dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../liblwt-ocaml_2.4.5.orig.tar.{bz2,gz,lzma,xz}
Traceback (most recent call last):
File "/usr/bin/planex-makedeb", line 9, in <module>
load_entry_point('planex==0.6.0', 'console_scripts', 'planex-makedeb')()
File "/usr/lib/python2.7/dist-packages/planex/makedeb.py", line 174, in main
assert res == 0
AssertionError
make: *** [_build/SRPMS/liblwt-ocaml_2.4.8-1.dsc] Error 1

- giving up on this as I've been here before, but have just come across Dave's post using opam :) - https://opam.ocaml.org/blog/opam-in-xenserver/

- here we go ... :)
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
The Linary/trusty problem is generally an annoyance in the xen-arm-builder image, since we can't just use upstream armhf images. I wonder if it's just worth hacking into Ubuntu instead of Linaro, since it's the same image (I think).

-anil

> On 5 Jun 2015, at 02:17, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
> Hi
>
> I'm trying to build, via buildroot, for a cubieboard4 on top of their vanilla linux (3.4) / linaro install.
>
> The first thing I hit with configure was :
>
> Error: could not find a distribution template for Linaro/trusty
>
> - I edited: /etc/lsb-release and changed Linaro to Ubuntu - hope this doesn't affect anything later
>
> The next configuration issue was:
>
> ImportError: No module named argcomplete
>
> - looking at /usr/lib I have 3 versions of python available python2.7, python3 and python3.4.
> - doing a python -V gives Python 2.7.6
>
> What's the best way of proceeding here?
>
> Cheers
> Nick
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org <mailto:Xen-api@lists.xen.org>
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api>
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
The Linary/trusty problem is generally an annoyance in the xen-arm-builder image, since we can't just use upstream armhf images. I wonder if it's just worth hacking into Ubuntu instead of Linaro, since it's the same image (I think).

Hi Anil,

I've already spent quite a lot of time playing with xen-arm-builder, try to coerce the build to work with the A80. I'll have another look. I just need xapi to work with something that has more grunt that an A20. I just wish I had more Linux dev experience.

Cheers
Nick
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
Hi,
I also tried xen-arm-builder on arndale exynos 5250 board with both ubuntu
utopic image and with linaro-trusty image. I also got stuck at the same
liblwt-ocaml_2.4.5.orig.tar issue.

Best regards,
Gautam Malu

On Fri, Jun 5, 2015 at 8:31 PM, Nick Betteridge <buzzheavyyear@hotmail.com>
wrote:

>
>
> The Linary/trusty problem is generally an annoyance in the xen-arm-builder
> image, since we can't just use upstream armhf images. I wonder if it's
> just worth hacking into Ubuntu instead of Linaro, since it's the same image
> (I think).
>
> Hi Anil,
>
> I've already spent quite a lot of time playing with xen-arm-builder, try
> to coerce the build to work with the A80. I'll have another look. I just
> need xapi to work with something that has more grunt that an A20. I just
> wish I had more Linux dev experience.
>
> Cheers
> Nick
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>
>
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
Just found the liblwt-ocaml_2.4.5.orig.tar bug:

edit file : buildroot/SPECS/ocaml-lwt.spec and insert the following as the first entry under %changelog


[%changelog]
* Mon May 12 2014 David Scott <dave.scott@citrix.com> - 2.4.8-1
- Update to 2.4.8

[.* Sun May 11 2014 David Scott <dave.scott@citrix.com> - 2.4.5-1
- Update to 2.4.5]

This now continues but I then hit:


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?

Cheers
Nick


From: gautam.malu@research.iiit.ac.in
Date: Sat, 6 Jun 2015 18:46:23 +0530
Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro
To: buzzheavyyear@hotmail.com
CC: anil@recoil.org; xen-api@lists.xen.org

Hi,
I also tried xen-arm-builder on arndale exynos 5250 board with both ubuntu utopic image and with linaro-trusty image. I also got stuck at the same liblwt-ocaml_2.4.5.orig.tar issue.
Best regards,Gautam Malu

On Fri, Jun 5, 2015 at 8:31 PM, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:





The Linary/trusty problem is generally an annoyance in the xen-arm-builder image, since we can't just use upstream armhf images. I wonder if it's just worth hacking into Ubuntu instead of Linaro, since it's the same image (I think).

Hi Anil,

I've already spent quite a lot of time playing with xen-arm-builder, try to coerce the build to work with the A80. I'll have another look. I just need xapi to work with something that has more grunt that an A20. I just wish I had more Linux dev experience.

Cheers
Nick


_______________________________________________

Xen-api mailing list

Xen-api@lists.xen.org

http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
If you use ocamlfind 1.5.1 or later (from memory -- check the changelog or the base-bytes package in OPAM), then the 'bytes' package will be made available on 4.01 as well as a virtual package. The intention is that 'bytes' can be used on any OCaml version and an appropriate compatibility shim will be made available on earlier OCaml versions.

-anil

> On 9 Jun 2015, at 05:42, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
> Just found the liblwt-ocaml_2.4.5.orig.tar bug:
>
> edit file : buildroot/SPECS/ocaml-lwt.spec and insert the following as the first entry under %changelog
>
>
> [%changelog]
> * Mon May 12 2014 David Scott <dave.scott@citrix.com <mailto:dave.scott@citrix.com>> - 2.4.8-1
> - Update to 2.4.8
>
> [.* Sun May 11 2014 David Scott <dave.scott@citrix.com <mailto:dave.scott@citrix.com>> - 2.4.5-1
> - Update to 2.4.5]
>
> This now continues but I then hit:
>
>
> 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?
>
> Cheers
> Nick
>
>
> From: gautam.malu@research.iiit.ac.in
> Date: Sat, 6 Jun 2015 18:46:23 +0530
> Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro
> To: buzzheavyyear@hotmail.com
> CC: anil@recoil.org; xen-api@lists.xen.org
>
> Hi,
> I also tried xen-arm-builder on arndale exynos 5250 board with both ubuntu utopic image and with linaro-trusty image. I also got stuck at the same liblwt-ocaml_2.4.5.orig.tar issue.
>
> Best regards,
> Gautam Malu
>
> On Fri, Jun 5, 2015 at 8:31 PM, Nick Betteridge <buzzheavyyear@hotmail.com <mailto:buzzheavyyear@hotmail.com>>wrote:
>
>
> The Linary/trusty problem is generally an annoyance in the xen-arm-builder image, since we can't just use upstream armhf images. I wonder if it's just worth hacking into Ubuntu instead of Linaro, since it's the same image (I think).
>
> Hi Anil,
>
> I've already spent quite a lot of time playing with xen-arm-builder, try to coerce the build to work with the A80. I'll have another look. I just need xapi to work with something that has more grunt that an A20. I just wish I had more Linux dev experience.
>
> Cheers
> Nick
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org <mailto:Xen-api@lists.xen.org>
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api>
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org <mailto:Xen-api@lists.xen.org>
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api>
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
> On 9 Jun 2015, at 13:42, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
> Just found the liblwt-ocaml_2.4.5.orig.tar bug:
>
> edit file : buildroot/SPECS/ocaml-lwt.spec and insert the following as the first entry under %changelog
>
>
> [%changelog]
> * Mon May 12 2014 David Scott <dave.scott@citrix.com> - 2.4.8-1
> - Update to 2.4.8
>
> [.* Sun May 11 2014 David Scott <dave.scott@citrix.com> - 2.4.5-1
> - Update to 2.4.5]


oops — feel free to send a pull request!


> This now continues but I then hit:
>
>
> 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?

Cheers,
Dave


>
> Cheers
> Nick
>
>
> From: gautam.malu@research.iiit.ac.in
> Date: Sat, 6 Jun 2015 18:46:23 +0530
> Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro
> To: buzzheavyyear@hotmail.com
> CC: anil@recoil.org; xen-api@lists.xen.org
>
> Hi,
> I also tried xen-arm-builder on arndale exynos 5250 board with both ubuntu utopic image and with linaro-trusty image. I also got stuck at the same liblwt-ocaml_2.4.5.orig.tar issue.
>
> Best regards,
> Gautam Malu
>
> On Fri, Jun 5, 2015 at 8:31 PM, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
>
> The Linary/trusty problem is generally an annoyance in the xen-arm-builder image, since we can't just use upstream armhf images. I wonder if it's just worth hacking into Ubuntu instead of Linaro, since it's the same image (I think).
>
> Hi Anil,
>
> I've already spent quite a lot of time playing with xen-arm-builder, try to coerce the build to work with the A80. I'll have another look. I just need xapi to work with something that has more grunt that an A20. I just wish I had more Linux dev experience.
>
> Cheers
> Nick
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
> 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?
>

Running on the vanilla cubie4, I've added ppa:avsm/ppa, which gives me ocaml 4.02.1 in /usr/bin. But there is no ocamlfind in /usr/bin. So I added this via opam and this lives in /home/linaro/.opam/system/bin/ocamlfind, which is on the PATH

Doing an 'ocamlfind list' gives:
....
bytes (version: [distributed with OCaml 4.02 or above])
....

Cheers
Nick
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
I've linked /usr/bin/ocamlfind to the opam version and the error is still there, complaining about package 'bytes' not found.

Is there any way I can create the whole bundle using opam (I've read the notes :p) and then somehow create the deb packages for including in the cubie4 image? I really am very keen to get this to work - I'm having problems with the build in http://xenbits.xenproject.org/djs/linaro-xapi-4-4-talex5 as I can't change the hostname on a cubie2.

Cheers
Nick

From: buzzheavyyear@hotmail.com
To: dave.scott@citrix.com; anil@recoil.org
Date: Tue, 9 Jun 2015 13:19:40 +0000
CC: gautam.malu@research.iiit.ac.in; xen-api@lists.xen.org
Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro





> 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?
>

Running on the vanilla cubie4, I've added ppa:avsm/ppa, which gives me ocaml 4.02.1 in /usr/bin. But there is no ocamlfind in /usr/bin. So I added this via opam and this lives in /home/linaro/.opam/system/bin/ocamlfind, which is on the PATH

Doing an 'ocamlfind list' gives:
....
bytes (version: [distributed with OCaml 4.02 or above])
....

Cheers
Nick


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
I would also be interested in an OPAM build of Xapi -- I think turning that into a mega-deb (not suitable for upstream, but very convenient for local deployments) would be quite easy.

-anil

> On 9 Jun 2015, at 07:02, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
> I've linked /usr/bin/ocamlfind to the opam version and the error is still there, complaining about package 'bytes' not found.
>
> Is there any way I can create the whole bundle using opam (I've read the notes :p) and then somehow create the deb packages for including in the cubie4 image? I really am very keen to get this to work - I'm having problems with the build in http://xenbits.xenproject.org/djs/linaro-xapi-4-4-talex5 <http://xenbits.xenproject.org/djs/linaro-xapi-4-4-talex5> as I can't change the hostname on a cubie2.
>
> Cheers
> Nick
>
> From: buzzheavyyear@hotmail.com
> To: dave.scott@citrix.com; anil@recoil.org
> Date: Tue, 9 Jun 2015 13:19:40 +0000
> CC: gautam.malu@research.iiit.ac.in; xen-api@lists.xen.org
> Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro
>
>
> > 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?
> >
>
> Running on the vanilla cubie4, I've added ppa:avsm/ppa, which gives me ocaml 4.02.1 in /usr/bin. But there is no ocamlfind in /usr/bin. So I added this via opam and this lives in /home/linaro/.opam/system/bin/ocamlfind, which is on the PATH
>
> Doing an 'ocamlfind list' gives:
> ....
> bytes (version: [distributed with OCaml 4.02 or above])
> ....
>
> Cheers
> Nick
>
> _______________________________________________ Xen-api mailing list Xen-api@lists.xen.org <mailto:Xen-api@lists.xen.org> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api>
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
I've read https://opam.ocaml.org/blog/opam-in-xenserver but I'm not too sure how to a) make it run as a local deployment or b) package it for an image


I would also be interested in an OPAM build of Xapi -- I think turning that into a mega-deb (not suitable for upstream, but very convenient for local deployments) would be quite easy.
-anil
On 9 Jun 2015, at 07:02, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:I've linked /usr/bin/ocamlfind to the opam version and the error is still there, complaining about package 'bytes' not found.

Is there any way I can create the whole bundle using opam (I've read the notes :p) and then somehow create the deb packages for including in the cubie4 image? I really am very keen to get this to work - I'm having problems with the build in http://xenbits.xenproject.org/djs/linaro-xapi-4-4-talex5 as I can't change the hostname on a cubie2.

Cheers
Nick

From: buzzheavyyear@hotmail.com
To: dave.scott@citrix.com; anil@recoil.org
Date: Tue, 9 Jun 2015 13:19:40 +0000
CC: gautam.malu@research.iiit.ac.in; xen-api@lists.xen.org
Subject: Re: [Xen-API] Building for cubieboard4 with vanilla linux/linaro


> 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?
>

Running on the vanilla cubie4, I've added ppa:avsm/ppa, which gives me ocaml 4.02.1 in /usr/bin. But there is no ocamlfind in /usr/bin. So I added this via opam and this lives in /home/linaro/.opam/system/bin/ocamlfind, which is on the PATH

Doing an 'ocamlfind list' gives:
....
bytes (version: [distributed with OCaml 4.02 or above])
....

Cheers
Nick

_______________________________________________ Xen-api mailing list Xen-api@lists.xen.org http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
> From: Dave.Scott@citrix.com
> > 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?

Cheers
Nick
Re: Building for cubieboard4 with vanilla linux/linaro [ In reply to ]
> On 11 Jun 2015, at 18:17, Nick Betteridge <buzzheavyyear@hotmail.com> wrote:
>
> > From: Dave.Scott@citrix.com
> > > 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@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api