Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2020-02-10 Thread Dave Barach via Lists.Fd.Io
Sure, I'll add it to the agenda.

D.

From: Juraj Linkeš 
Sent: Monday, February 10, 2020 5:15 AM
To: Juraj Linkeš ; Dave Barach (dbarach) 

Cc: vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I forgot to actually ask to add this item to the agenda - can we talk about 
this tomorrow? :)

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Monday, February 10, 2020 11:12 AM
To: Dave Barach (dbarach) mailto:dbar...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

Hi Dave,

This discussion about cross-compilation didn't go anywhere. We're thinking of 
talking about the cross compilation in the monthly VPP call tomorrow, now that 
latest release is done.. I want to get some agreement on how to properly do the 
cross-compilation - how feasible the qemu emulation is, how much of the current 
ebuild system should (or shouldn't) we use or do we need to do something 
completely different (that would presumably be a lot simpler).

Thanks,
Juraj

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Tuesday, December 17, 2019 10:25 AM
To: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; 
dmar...@me.com<mailto:dmar...@me.com>; Benoit Ganne (bganne) 
mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I tried a more basic thing in my previous patch: 
https://gerrit.fd.io/r/c/vpp/+/21035

The patch has one file with all cross-compile arguments/parameters: 
build-data/platforms/aarch64-generic.mk.

It also modifies the ebuild system to propagate those into both VPP and 
external (dpdk, rdma and such) builds. If we don't want to modify the the 
ebuild system in this way, I can create separate make targets like Damjan did 
here: https://gerrit.fd.io/r/c/vpp/+/23153

If anyone's interested in trying it out, there's a script that builds aarch64 
dpdk and other external libs along with VPP libraries: 
build-root/scripts/aarch64-crossbuild.sh. The binaries should be in the same 
repository.

What do you think about this approach? That is, splitting the cross compilation 
from the environment setup. It seems like a good first step if we're not going 
to do the emulation builds (see my previous e-mail for reasons why I think it's 
inadequate).

Thanks,
Juraj

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Wednesday, December 4, 2019 3:36 PM
To: dmar...@me.com<mailto:dmar...@me.com>; Benoit Ganne (bganne) 
mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I looked into this and there are some problems.

The first problem is the inability to fine tune any parameters we might want to 
for target cpu/microarchitecture (for arm, that would be building packages with 
specifics for ThunderX, McBin, Raspberry PI etc.). I'm not sure how Qemu does 
the emulation, but I doubt there's extensive support for a myriad of cpus. And 
on top of that, it's slow.

The other thing is with using the x86 version of aarch64-linux-gnu-gcc. In that 
case it's just regular cross-compilation (x86 version of aarch64-linux-gnu-gcc 
is the cross-compiler) and what we gain from these target platform containers 
is having the proper libraries that VPP build depends on. For Ubuntu I've found 
that it's actually not worth it - it's easier to have an x86 container and 
install arm dependency packages that to install x86 cross compiler inside an 
aarch64 container. Another thing I've observed (in htop) is that even when 
using the x86 version of aarch64-linux-gnu-gcc inside the aarch64 container, it 
was still going through the emulator, but maybe I did something wrong.

Damjan, you mentioned that my current patch doesn't solve anything. It 
certainly isn't a comprehensive solution, but it does one thing and that is it 
allows users to specify platform specific config args (well, at least some of 
the supported ones in build-data/platforms/.mk) which then get 
propagated to all parts of the build and it's possible to do cross compilation 
given that the environemnt has been already set up. It modifies the current 
ebuild system, but that might not be the appropriate place to do that. However, 
I don't how else would we do this.

I'm not sure what all of this means, but the docker solution is certainly 
incomplete, if not outright unsuitable. Maybe we could use containers for just 
environment setup (e.g. for Ubuntu, installing both host and target packages) 
and then could run cross-compilation in them with a solution that would do 
something like my patch (i.e. cross-compile DPDK and VPP with config args 
defined in one file).

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2020-02-10 Thread Juraj Linkeš
I forgot to actually ask to add this item to the agenda - can we talk about 
this tomorrow? :)

From: Juraj Linkeš 
Sent: Monday, February 10, 2020 11:12 AM
To: Dave Barach (dbarach) 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

Hi Dave,

This discussion about cross-compilation didn't go anywhere. We're thinking of 
talking about the cross compilation in the monthly VPP call tomorrow, now that 
latest release is done.. I want to get some agreement on how to properly do the 
cross-compilation - how feasible the qemu emulation is, how much of the current 
ebuild system should (or shouldn't) we use or do we need to do something 
completely different (that would presumably be a lot simpler).

Thanks,
Juraj

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Tuesday, December 17, 2019 10:25 AM
To: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; 
dmar...@me.com<mailto:dmar...@me.com>; Benoit Ganne (bganne) 
mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I tried a more basic thing in my previous patch: 
https://gerrit.fd.io/r/c/vpp/+/21035

The patch has one file with all cross-compile arguments/parameters: 
build-data/platforms/aarch64-generic.mk.

It also modifies the ebuild system to propagate those into both VPP and 
external (dpdk, rdma and such) builds. If we don't want to modify the the 
ebuild system in this way, I can create separate make targets like Damjan did 
here: https://gerrit.fd.io/r/c/vpp/+/23153

If anyone's interested in trying it out, there's a script that builds aarch64 
dpdk and other external libs along with VPP libraries: 
build-root/scripts/aarch64-crossbuild.sh. The binaries should be in the same 
repository.

What do you think about this approach? That is, splitting the cross compilation 
from the environment setup. It seems like a good first step if we're not going 
to do the emulation builds (see my previous e-mail for reasons why I think it's 
inadequate).

Thanks,
Juraj

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Wednesday, December 4, 2019 3:36 PM
To: dmar...@me.com<mailto:dmar...@me.com>; Benoit Ganne (bganne) 
mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I looked into this and there are some problems.

The first problem is the inability to fine tune any parameters we might want to 
for target cpu/microarchitecture (for arm, that would be building packages with 
specifics for ThunderX, McBin, Raspberry PI etc.). I'm not sure how Qemu does 
the emulation, but I doubt there's extensive support for a myriad of cpus. And 
on top of that, it's slow.

The other thing is with using the x86 version of aarch64-linux-gnu-gcc. In that 
case it's just regular cross-compilation (x86 version of aarch64-linux-gnu-gcc 
is the cross-compiler) and what we gain from these target platform containers 
is having the proper libraries that VPP build depends on. For Ubuntu I've found 
that it's actually not worth it - it's easier to have an x86 container and 
install arm dependency packages that to install x86 cross compiler inside an 
aarch64 container. Another thing I've observed (in htop) is that even when 
using the x86 version of aarch64-linux-gnu-gcc inside the aarch64 container, it 
was still going through the emulator, but maybe I did something wrong.

Damjan, you mentioned that my current patch doesn't solve anything. It 
certainly isn't a comprehensive solution, but it does one thing and that is it 
allows users to specify platform specific config args (well, at least some of 
the supported ones in build-data/platforms/.mk) which then get 
propagated to all parts of the build and it's possible to do cross compilation 
given that the environemnt has been already set up. It modifies the current 
ebuild system, but that might not be the appropriate place to do that. However, 
I don't how else would we do this.

I'm not sure what all of this means, but the docker solution is certainly 
incomplete, if not outright unsuitable. Maybe we could use containers for just 
environment setup (e.g. for Ubuntu, installing both host and target packages) 
and then could run cross-compilation in them with a solution that would do 
something like my patch (i.e. cross-compile DPDK and VPP with config args 
defined in one file).

Thoughts?
Juraj

From: Damjan Marion via Lists.Fd.Io 
mailto:dmarion=me@lists.fd.io>>
Sent: Thursday, October 31, 2019 1:49 PM
To: Benoit Ganne (bganne) mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On 31 Oct 2019,

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2020-02-10 Thread Juraj Linkeš
Hi Dave,

This discussion about cross-compilation didn't go anywhere. We're thinking of 
talking about the cross compilation in the monthly VPP call tomorrow, now that 
latest release is done.. I want to get some agreement on how to properly do the 
cross-compilation - how feasible the qemu emulation is, how much of the current 
ebuild system should (or shouldn't) we use or do we need to do something 
completely different (that would presumably be a lot simpler).

Thanks,
Juraj

From: Juraj Linkeš 
Sent: Tuesday, December 17, 2019 10:25 AM
To: Juraj Linkeš ; dmar...@me.com; Benoit Ganne 
(bganne) 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I tried a more basic thing in my previous patch: 
https://gerrit.fd.io/r/c/vpp/+/21035

The patch has one file with all cross-compile arguments/parameters: 
build-data/platforms/aarch64-generic.mk.

It also modifies the ebuild system to propagate those into both VPP and 
external (dpdk, rdma and such) builds. If we don't want to modify the the 
ebuild system in this way, I can create separate make targets like Damjan did 
here: https://gerrit.fd.io/r/c/vpp/+/23153

If anyone's interested in trying it out, there's a script that builds aarch64 
dpdk and other external libs along with VPP libraries: 
build-root/scripts/aarch64-crossbuild.sh. The binaries should be in the same 
repository.

What do you think about this approach? That is, splitting the cross compilation 
from the environment setup. It seems like a good first step if we're not going 
to do the emulation builds (see my previous e-mail for reasons why I think it's 
inadequate).

Thanks,
Juraj

From: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Sent: Wednesday, December 4, 2019 3:36 PM
To: dmar...@me.com<mailto:dmar...@me.com>; Benoit Ganne (bganne) 
mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I looked into this and there are some problems.

The first problem is the inability to fine tune any parameters we might want to 
for target cpu/microarchitecture (for arm, that would be building packages with 
specifics for ThunderX, McBin, Raspberry PI etc.). I'm not sure how Qemu does 
the emulation, but I doubt there's extensive support for a myriad of cpus. And 
on top of that, it's slow.

The other thing is with using the x86 version of aarch64-linux-gnu-gcc. In that 
case it's just regular cross-compilation (x86 version of aarch64-linux-gnu-gcc 
is the cross-compiler) and what we gain from these target platform containers 
is having the proper libraries that VPP build depends on. For Ubuntu I've found 
that it's actually not worth it - it's easier to have an x86 container and 
install arm dependency packages that to install x86 cross compiler inside an 
aarch64 container. Another thing I've observed (in htop) is that even when 
using the x86 version of aarch64-linux-gnu-gcc inside the aarch64 container, it 
was still going through the emulator, but maybe I did something wrong.

Damjan, you mentioned that my current patch doesn't solve anything. It 
certainly isn't a comprehensive solution, but it does one thing and that is it 
allows users to specify platform specific config args (well, at least some of 
the supported ones in build-data/platforms/.mk) which then get 
propagated to all parts of the build and it's possible to do cross compilation 
given that the environemnt has been already set up. It modifies the current 
ebuild system, but that might not be the appropriate place to do that. However, 
I don't how else would we do this.

I'm not sure what all of this means, but the docker solution is certainly 
incomplete, if not outright unsuitable. Maybe we could use containers for just 
environment setup (e.g. for Ubuntu, installing both host and target packages) 
and then could run cross-compilation in them with a solution that would do 
something like my patch (i.e. cross-compile DPDK and VPP with config args 
defined in one file).

Thoughts?
Juraj

From: Damjan Marion via Lists.Fd.Io 
mailto:dmarion=me@lists.fd.io>>
Sent: Thursday, October 31, 2019 1:49 PM
To: Benoit Ganne (bganne) mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On 31 Oct 2019, at 13:18, Benoit Ganne (bganne) 
> mailto:bga...@cisco.com>> wrote:
>
>> I was going to remain silent, but since there's now multiple people saying
>> this sounds good -- I think this sounds horrible. :)
>> To wit, it seems too complex and too much setup/overhead. I'll try and
>> look closer at this soon to see if I can feed back our local changes that
>> seem to be working.
>
> It is not that bad in my opinion [1] :
> 1) add support

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-12-17 Thread Juraj Linkeš
I tried a more basic thing in my previous patch: 
https://gerrit.fd.io/r/c/vpp/+/21035

The patch has one file with all cross-compile arguments/parameters: 
build-data/platforms/aarch64-generic.mk.

It also modifies the ebuild system to propagate those into both VPP and 
external (dpdk, rdma and such) builds. If we don't want to modify the the 
ebuild system in this way, I can create separate make targets like Damjan did 
here: https://gerrit.fd.io/r/c/vpp/+/23153

If anyone's interested in trying it out, there's a script that builds aarch64 
dpdk and other external libs along with VPP libraries: 
build-root/scripts/aarch64-crossbuild.sh. The binaries should be in the same 
repository.

What do you think about this approach? That is, splitting the cross compilation 
from the environment setup. It seems like a good first step if we're not going 
to do the emulation builds (see my previous e-mail for reasons why I think it's 
inadequate).

Thanks,
Juraj

From: Juraj Linkeš 
Sent: Wednesday, December 4, 2019 3:36 PM
To: dmar...@me.com; Benoit Ganne (bganne) 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

I looked into this and there are some problems.

The first problem is the inability to fine tune any parameters we might want to 
for target cpu/microarchitecture (for arm, that would be building packages with 
specifics for ThunderX, McBin, Raspberry PI etc.). I'm not sure how Qemu does 
the emulation, but I doubt there's extensive support for a myriad of cpus. And 
on top of that, it's slow.

The other thing is with using the x86 version of aarch64-linux-gnu-gcc. In that 
case it's just regular cross-compilation (x86 version of aarch64-linux-gnu-gcc 
is the cross-compiler) and what we gain from these target platform containers 
is having the proper libraries that VPP build depends on. For Ubuntu I've found 
that it's actually not worth it - it's easier to have an x86 container and 
install arm dependency packages that to install x86 cross compiler inside an 
aarch64 container. Another thing I've observed (in htop) is that even when 
using the x86 version of aarch64-linux-gnu-gcc inside the aarch64 container, it 
was still going through the emulator, but maybe I did something wrong.

Damjan, you mentioned that my current patch doesn't solve anything. It 
certainly isn't a comprehensive solution, but it does one thing and that is it 
allows users to specify platform specific config args (well, at least some of 
the supported ones in build-data/platforms/.mk) which then get 
propagated to all parts of the build and it's possible to do cross compilation 
given that the environemnt has been already set up. It modifies the current 
ebuild system, but that might not be the appropriate place to do that. However, 
I don't how else would we do this.

I'm not sure what all of this means, but the docker solution is certainly 
incomplete, if not outright unsuitable. Maybe we could use containers for just 
environment setup (e.g. for Ubuntu, installing both host and target packages) 
and then could run cross-compilation in them with a solution that would do 
something like my patch (i.e. cross-compile DPDK and VPP with config args 
defined in one file).

Thoughts?
Juraj

From: Damjan Marion via Lists.Fd.Io 
mailto:dmarion=me@lists.fd.io>>
Sent: Thursday, October 31, 2019 1:49 PM
To: Benoit Ganne (bganne) mailto:bga...@cisco.com>>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On 31 Oct 2019, at 13:18, Benoit Ganne (bganne) 
> mailto:bga...@cisco.com>> wrote:
>
>> I was going to remain silent, but since there's now multiple people saying
>> this sounds good -- I think this sounds horrible. :)
>> To wit, it seems too complex and too much setup/overhead. I'll try and
>> look closer at this soon to see if I can feed back our local changes that
>> seem to be working.
>
> It is not that bad in my opinion [1] :
> 1) add support for multiarch (must be done once after reboot)
> ~# docker run --rm --privileged multiarch/qemu-user-static --reset 
> --persistent yes --credential yes
> 2) create your chroot (must be done once - I am sharing my homedir with my 
> chroot and same UID/GID)
> ~# docker run --name aarch64_u1804 --privileged --net host -v $HOME:$HOME -v 
> /dev:/dev -v/lib/modules:/lib/modules/host:ro -td arm64v8/ubuntu:18.04 
> /bin/bash
> ~# docker container exec aarch64_u1804 sh -c "apt -qy update && apt 
> dist-upgrade -qy && apt install -qy vim sudo make git && groupadd -g $(id 
> -rg) $USER && useradd -u $(id -ru) -g $(id -rg) -M -d $HOME -s /bin/bash 
> $USER && echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && echo 
> aarch64_u1804 > /etc/debian_chroot&q

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-12-04 Thread Juraj Linkeš
I looked into this and there are some problems.

The first problem is the inability to fine tune any parameters we might want to 
for target cpu/microarchitecture (for arm, that would be building packages with 
specifics for ThunderX, McBin, Raspberry PI etc.). I'm not sure how Qemu does 
the emulation, but I doubt there's extensive support for a myriad of cpus. And 
on top of that, it's slow.

The other thing is with using the x86 version of aarch64-linux-gnu-gcc. In that 
case it's just regular cross-compilation (x86 version of aarch64-linux-gnu-gcc 
is the cross-compiler) and what we gain from these target platform containers 
is having the proper libraries that VPP build depends on. For Ubuntu I've found 
that it's actually not worth it - it's easier to have an x86 container and 
install arm dependency packages that to install x86 cross compiler inside an 
aarch64 container. Another thing I've observed (in htop) is that even when 
using the x86 version of aarch64-linux-gnu-gcc inside the aarch64 container, it 
was still going through the emulator, but maybe I did something wrong.

Damjan, you mentioned that my current patch doesn't solve anything. It 
certainly isn't a comprehensive solution, but it does one thing and that is it 
allows users to specify platform specific config args (well, at least some of 
the supported ones in build-data/platforms/.mk) which then get 
propagated to all parts of the build and it's possible to do cross compilation 
given that the environemnt has been already set up. It modifies the current 
ebuild system, but that might not be the appropriate place to do that. However, 
I don't how else would we do this.

I'm not sure what all of this means, but the docker solution is certainly 
incomplete, if not outright unsuitable. Maybe we could use containers for just 
environment setup (e.g. for Ubuntu, installing both host and target packages) 
and then could run cross-compilation in them with a solution that would do 
something like my patch (i.e. cross-compile DPDK and VPP with config args 
defined in one file).

Thoughts?
Juraj

From: Damjan Marion via Lists.Fd.Io 
Sent: Thursday, October 31, 2019 1:49 PM
To: Benoit Ganne (bganne) 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On 31 Oct 2019, at 13:18, Benoit Ganne (bganne) 
> mailto:bga...@cisco.com>> wrote:
>
>> I was going to remain silent, but since there's now multiple people saying
>> this sounds good -- I think this sounds horrible. :)
>> To wit, it seems too complex and too much setup/overhead. I'll try and
>> look closer at this soon to see if I can feed back our local changes that
>> seem to be working.
>
> It is not that bad in my opinion [1] :
> 1) add support for multiarch (must be done once after reboot)
> ~# docker run --rm --privileged multiarch/qemu-user-static --reset 
> --persistent yes --credential yes
> 2) create your chroot (must be done once - I am sharing my homedir with my 
> chroot and same UID/GID)
> ~# docker run --name aarch64_u1804 --privileged --net host -v $HOME:$HOME -v 
> /dev:/dev -v/lib/modules:/lib/modules/host:ro -td arm64v8/ubuntu:18.04 
> /bin/bash
> ~# docker container exec aarch64_u1804 sh -c "apt -qy update && apt 
> dist-upgrade -qy && apt install -qy vim sudo make git && groupadd -g $(id 
> -rg) $USER && useradd -u $(id -ru) -g $(id -rg) -M -d $HOME -s /bin/bash 
> $USER && echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && echo 
> aarch64_u1804 > /etc/debian_chroot"
> 3) compile vpp (I already checked out VPP in $HOME/src/vpp but you can 
> checkout it there too if you prefer)
> ~# docker container exec aarch64_u1804 su "$USER" -l -c "UNATTENTED=y make -C 
> src/vpp install-dep install-ext-deps pkg-deb"
> [...]
> dpkg-deb: building package 'libvppinfra-dev' in 
> '../libvppinfra-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-dbg' in 
> '../vpp-dbg_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'libvppinfra' in 
> '../libvppinfra_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-api-python' in 
> '../vpp-api-python_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp' in 
> '../vpp_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-plugin-dpdk' in 
> '../vpp-plugin-dpdk_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'python3-vpp-api' in 
> '../python3-vpp-api_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-dev' in 
> '../vpp-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-plugin-core' in 
> '../vpp-plugin-core_20.01-rc0~538-gbb41ee925_arm64.deb'.
> make[2]: Leaving directory 
> '

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-11-06 Thread Damjan Marion via Lists.Fd.Io

i think we need to discard this patch, as it doesn’t solve anything and it just 
makes build system more complex to maintain.
Current build system is simply not built to create cross-arch and cross-distro 
packages and this patch doesn’t fix that.

Benoit proposed use of docker, and that seems to be feasible idea, only issue 
is that it is slow, but that may be fixable by using native gcc inside 
container.

— 
Damjan


> On 6 Nov 2019, at 13:28, Dave Barach via Lists.Fd.Io 
>  wrote:
> 
> Dear Stan,
>  
> As part of “make install-dep,” could we create e.g. 
> /etc/apt/sources.list.d/arm64ports.list, or otherwise automate the process?
>  
> Thanks... D.
>  
> From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  <mailto:vpp-dev@lists.fd.io>> On Behalf Of Stanislav Chlebec
> Sent: Wednesday, November 6, 2019 6:08 AM
> To: Dave Barach (dbarach) mailto:dbar...@cisco.com>>; 
> vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation 
> aarch64 Ubuntu support
>  
> Helo Dave
> This issue  with sudo apt-get update
> which results in ignoring ubuntu arm repositories
> I fixed by replacing the records in /etc/apt/sources.list:
> vagrant@ubuntu-bionic:/etc/apt$ cat sources.list | grep arm | grep -v "#"
> deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ 
> <http://ports.ubuntu.com/ubuntu-ports/> bionic multiverse universe main 
> restricted
> deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ 
> <http://ports.ubuntu.com/ubuntu-ports/> bionic-updates multiverse restricted 
> universe main
> deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ 
> <http://ports.ubuntu.com/ubuntu-ports/> bionic-backports main multiverse 
> restricted universe
>  
> Please check that in your /etc/apt/sources.list
> Stan
>  
> From: Dave Barach via Lists.Fd.Io  <mailto:dbarach=cisco@lists.fd.io>> 
> Sent: Wednesday, October 30, 2019 4:00 PM
> To: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
> Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation 
> aarch64 Ubuntu support
>  
> On an ubuntu-18.04 x86_64 system which happily builds x86_64 .debs, I did the 
> following:
>  
> $ clone vpp tree
>  
> $ git review -d 21035
>  
> $ make PLATFORM=aarch64-generic install-dep
>  
> Ign:1 http://dl.google.com/linux/chrome/deb 
> <http://dl.google.com/linux/chrome/deb> stable InRelease
> Hit:2 https://download.docker.com/linux/ubuntu 
> <https://download.docker.com/linux/ubuntu> bionic InRelease
> Hit:3 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic InRelease
> Hit:4 https://deb.nodesource.com/node_12.x 
> <https://deb.nodesource.com/node_12.x> bionic InRelease
> Hit:5 http://dl.google.com/linux/chrome/deb 
> <http://dl.google.com/linux/chrome/deb> stable Release
> Hit:7 http://ppa.launchpad.net/bluetooth/bluez/ubuntu 
> <http://ppa.launchpad.net/bluetooth/bluez/ubuntu> bionic InRelease
> Get:8 http://security.ubuntu.com/ubuntu <http://security.ubuntu.com/ubuntu> 
> bionic-security InRelease [88.7 kB]
> Get:9 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic-backports InRelease [74.6 kB]
> Hit:11 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu 
> <http://ppa.launchpad.net/gezakovacs/ppa/ubuntu> bionic InRelease
> Get:6 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic-updates InRelease [88.7 kB]
> Hit:12 http://ppa.launchpad.net/inkscape.dev/stable/ubuntu 
> <http://ppa.launchpad.net/inkscape.dev/stable/ubuntu> bionic InRelease
> Ign:13 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic/main arm64 Packages
> Hit:14 http://ppa.launchpad.net/ondrej/php/ubuntu 
> <http://ppa.launchpad.net/ondrej/php/ubuntu> bionic InRelease
> Ign:15 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic/restricted arm64 Packages
> Ign:16 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic/universe arm64 Packages
> Ign:17 http://security.ubuntu.com/ubuntu <http://security.ubuntu.com/ubuntu> 
> bionic-security/main arm64 Packages
> Hit:18 http://ppa.launchpad.net/webupd8team/java/ubuntu 
> <http://ppa.launchpad.net/webupd8team/java/ubuntu> bionic InRelease
> Ign:19 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubuntu> bionic/multiverse arm64 Packages
> Ign:20 http://us.archive.ubuntu.com/ubuntu 
> <http://us.archive.ubuntu.com/ubu

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-11-06 Thread Dave Barach via Lists.Fd.Io
Dear Stan,

As part of “make install-dep,” could we create e.g. 
/etc/apt/sources.list.d/arm64ports.list, or otherwise automate the process?

Thanks... D.

From: vpp-dev@lists.fd.io  On Behalf Of Stanislav Chlebec
Sent: Wednesday, November 6, 2019 6:08 AM
To: Dave Barach (dbarach) ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

Helo Dave
This issue  with sudo apt-get update
which results in ignoring ubuntu arm repositories
I fixed by replacing the records in /etc/apt/sources.list:
vagrant@ubuntu-bionic:/etc/apt$ cat sources.list | grep arm | grep -v "#"
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic multiverse 
universe main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates 
multiverse restricted universe main
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main 
multiverse restricted universe

Please check that in your /etc/apt/sources.list
Stan

From: Dave Barach via Lists.Fd.Io 
mailto:dbarach=cisco@lists.fd.io>>
Sent: Wednesday, October 30, 2019 4:00 PM
To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

On an ubuntu-18.04 x86_64 system which happily builds x86_64 .debs, I did the 
following:

$ clone vpp tree

$ git review -d 21035

$ make PLATFORM=aarch64-generic install-dep

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 https://deb.nodesource.com/node_12.x bionic InRelease
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Hit:7 http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic InRelease
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:11 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:12 http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic InRelease
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Hit:14 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Hit:18 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:21 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 
Packages
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 
Packages
Get:27 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 
Packages [985 kB]
Ign:21 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 
Packages
Get:29 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 
Packages [1,017 kB]
Ign:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 
Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 
Packages
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:25 http://us.archive.ubuntu.co

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-11-06 Thread Stanislav Chlebec
Helo Dave
This issue  with sudo apt-get update
which results in ignoring ubuntu arm repositories
I fixed by replacing the records in /etc/apt/sources.list:
vagrant@ubuntu-bionic:/etc/apt$ cat sources.list | grep arm | grep -v "#"
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic multiverse 
universe main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates 
multiverse restricted universe main
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main 
multiverse restricted universe

Please check that in your /etc/apt/sources.list
Stan

From: Dave Barach via Lists.Fd.Io 
Sent: Wednesday, October 30, 2019 4:00 PM
To: vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

On an ubuntu-18.04 x86_64 system which happily builds x86_64 .debs, I did the 
following:

$ clone vpp tree

$ git review -d 21035

$ make PLATFORM=aarch64-generic install-dep

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 https://deb.nodesource.com/node_12.x bionic InRelease
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Hit:7 http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic InRelease
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:11 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:12 http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic InRelease
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Hit:14 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Hit:18 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:21 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 
Packages
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 
Packages
Get:27 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 
Packages [985 kB]
Ign:21 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 
Packages
Get:29 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 
Packages [1,017 kB]
Ign:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 
Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 
Packages
Ign:13 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:15 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Ign:16 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:19 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:17 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:20 http://us.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages
Ign:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:21 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 
Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 
Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 
Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-31 Thread Damjan Marion via Lists.Fd.Io


> On 31 Oct 2019, at 13:18, Benoit Ganne (bganne)  wrote:
> 
>> I was going to remain silent, but since there's now multiple people saying
>> this sounds good -- I think this sounds horrible. :)
>> To wit, it seems too complex and too much setup/overhead. I'll try and
>> look closer at this soon to see if I can feed back our local changes that
>> seem to be working.
> 
> It is not that bad in my opinion [1] :
> 1) add support for multiarch (must be done once after reboot)
> ~# docker run --rm --privileged multiarch/qemu-user-static --reset 
> --persistent yes --credential yes
> 2) create your chroot (must be done once - I am sharing my homedir with my 
> chroot and same UID/GID)
> ~# docker run --name aarch64_u1804 --privileged --net host -v $HOME:$HOME -v 
> /dev:/dev -v/lib/modules:/lib/modules/host:ro -td arm64v8/ubuntu:18.04 
> /bin/bash
> ~# docker container exec aarch64_u1804 sh -c "apt -qy update && apt 
> dist-upgrade -qy && apt install -qy vim sudo make git && groupadd -g $(id 
> -rg) $USER && useradd -u $(id -ru) -g $(id -rg) -M -d $HOME -s /bin/bash 
> $USER && echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && echo 
> aarch64_u1804 > /etc/debian_chroot"
> 3) compile vpp (I already checked out VPP in $HOME/src/vpp but you can 
> checkout it there too if you prefer)
> ~# docker container exec aarch64_u1804 su "$USER" -l -c "UNATTENTED=y make -C 
> src/vpp install-dep install-ext-deps pkg-deb"
> [...]
> dpkg-deb: building package 'libvppinfra-dev' in 
> '../libvppinfra-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-dbg' in 
> '../vpp-dbg_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'libvppinfra' in 
> '../libvppinfra_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-api-python' in 
> '../vpp-api-python_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp' in 
> '../vpp_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-plugin-dpdk' in 
> '../vpp-plugin-dpdk_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'python3-vpp-api' in 
> '../python3-vpp-api_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-dev' in 
> '../vpp-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
> dpkg-deb: building package 'vpp-plugin-core' in 
> '../vpp-plugin-core_20.01-rc0~538-gbb41ee925_arm64.deb'.
> make[2]: Leaving directory 
> '/home/bganne/src/vpp/build-root/build-vpp-native/vpp'
> dpkg-genbuildinfo --build=binary
> dpkg-genchanges --build=binary >../vpp_20.01-rc0~538-gbb41ee925_arm64.changes
> dpkg-genchanges: info: binary-only upload (no source code included)
> dpkg-source --after-build vpp
> dpkg-buildpackage: info: binary-only upload (no source included)
> make[1]: Leaving directory '/home/bganne/src/vpp/build-root'
> make: Leaving directory '/home/bganne/src/vpp'
> 
> Enjoy :)

This is so cool :) I wanted to invest time to investigate how to do exactly 
this, so thanks for saving my time 

Only nice thing will be to find way to run x86 version of  
aarch64-linux-gnu-gcc instead of aarch64 version of gcc so it runs faster…




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14412): https://lists.fd.io/g/vpp-dev/message/14412
Mute This Topic: https://lists.fd.io/mt/39781289/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-31 Thread Benoit Ganne (bganne) via Lists.Fd.Io
> I was going to remain silent, but since there's now multiple people saying
> this sounds good -- I think this sounds horrible. :)
> To wit, it seems too complex and too much setup/overhead. I'll try and
> look closer at this soon to see if I can feed back our local changes that
> seem to be working.

It is not that bad in my opinion [1] :
 1) add support for multiarch (must be done once after reboot)
~# docker run --rm --privileged multiarch/qemu-user-static --reset --persistent 
yes --credential yes
 2) create your chroot (must be done once - I am sharing my homedir with my 
chroot and same UID/GID)
~# docker run --name aarch64_u1804 --privileged --net host -v $HOME:$HOME -v 
/dev:/dev -v/lib/modules:/lib/modules/host:ro -td arm64v8/ubuntu:18.04 /bin/bash
~# docker container exec aarch64_u1804 sh -c "apt -qy update && apt 
dist-upgrade -qy && apt install -qy vim sudo make git && groupadd -g $(id -rg) 
$USER && useradd -u $(id -ru) -g $(id -rg) -M -d $HOME -s /bin/bash $USER && 
echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && echo aarch64_u1804 > 
/etc/debian_chroot"
 3) compile vpp (I already checked out VPP in $HOME/src/vpp but you can 
checkout it there too if you prefer)
~# docker container exec aarch64_u1804 su "$USER" -l -c "UNATTENTED=y make -C 
src/vpp install-dep install-ext-deps pkg-deb"
[...]
dpkg-deb: building package 'libvppinfra-dev' in 
'../libvppinfra-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp-dbg' in 
'../vpp-dbg_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'libvppinfra' in 
'../libvppinfra_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp-api-python' in 
'../vpp-api-python_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp' in '../vpp_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp-plugin-dpdk' in 
'../vpp-plugin-dpdk_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'python3-vpp-api' in 
'../python3-vpp-api_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp-dev' in 
'../vpp-dev_20.01-rc0~538-gbb41ee925_arm64.deb'.
dpkg-deb: building package 'vpp-plugin-core' in 
'../vpp-plugin-core_20.01-rc0~538-gbb41ee925_arm64.deb'.
make[2]: Leaving directory 
'/home/bganne/src/vpp/build-root/build-vpp-native/vpp'
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../vpp_20.01-rc0~538-gbb41ee925_arm64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build vpp
dpkg-buildpackage: info: binary-only upload (no source included)
make[1]: Leaving directory '/home/bganne/src/vpp/build-root'
make: Leaving directory '/home/bganne/src/vpp'

Enjoy :)

ben

[1] https://github.com/multiarch/qemu-user-static/blob/master/README.md

> > On Oct 30, 2019, at 1:38 PM, Benoit Ganne (bganne) 
> wrote:
> >
> > Yeah I agree it is probably the best way to x-compile. x-compilation
> toolchain is a pain to use with a pile of corner-cases. Using qemu
> emulation, it just becomes native compilation again...
> >
> > ben
> >
> >> -Original Message-
> >> From: Damjan Marion 
> >> Sent: mercredi 30 octobre 2019 18:16
> >> To: Benoit Ganne (bganne) 
> >> Cc: Christian Hopps ; Stanislav Chlebec
> >> ; vpp-dev@lists.fd.io
> >> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation
> >> aarch64 Ubuntu support
> >>
> >>
> >>On 30 Oct 2019, at 16:56, Benoit Ganne (bganne)  >> <mailto:bga...@cisco.com> > wrote:
> >>
> >>I used qemu + chroot + Linux binfmt support with great success for
> >> x-compilation, such as described here:
> >> https://wiki.ubuntu.com/UbuntuDevelopment/Ports
> >>
> >>The basic steps are:
> >>- prepare a chroot mirroring your target (eg. using debootstrap)
> >>- setup Linux binfmt to call qemu-arm-static for ARM binaries and
> >> copy qemu-arm-static into the chroot
> >>- chroot
> >>- compile as usual
> >>
> >>The magic is the kernel will automatically call qemu-arm-static each
> >> time you try to run an ARM binary, so you transparently execute ARM
> >> binaries on your x86 host. That will probably not work to run a full-
> >> fledge VPP but it usually works great for compilation.
> >>
> >>I guess that's what Damjan refers to?
> >>
> >>
> >>
> >> exactly :)
> >>
> >>
> >>
> >>
> >>ben
> >>
> >>
> >>
> >>    -----Original Message-----
> >>    From: vpp-dev@lists.fd.io <mailto:vpp-d

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Christian Hopps
I was going to remain silent, but since there's now multiple people saying this 
sounds good -- I think this sounds horrible. :)

To wit, it seems too complex and too much setup/overhead. I'll try and look 
closer at this soon to see if I can feed back our local changes that seem to be 
working.

Thanks,
Chris.

> On Oct 30, 2019, at 1:38 PM, Benoit Ganne (bganne)  wrote:
> 
> Yeah I agree it is probably the best way to x-compile. x-compilation 
> toolchain is a pain to use with a pile of corner-cases. Using qemu emulation, 
> it just becomes native compilation again...
> 
> ben
> 
>> -Original Message-
>> From: Damjan Marion 
>> Sent: mercredi 30 octobre 2019 18:16
>> To: Benoit Ganne (bganne) 
>> Cc: Christian Hopps ; Stanislav Chlebec
>> ; vpp-dev@lists.fd.io
>> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation
>> aarch64 Ubuntu support
>> 
>> 
>>  On 30 Oct 2019, at 16:56, Benoit Ganne (bganne) > <mailto:bga...@cisco.com> > wrote:
>> 
>>  I used qemu + chroot + Linux binfmt support with great success for
>> x-compilation, such as described here:
>> https://wiki.ubuntu.com/UbuntuDevelopment/Ports
>> 
>>  The basic steps are:
>>  - prepare a chroot mirroring your target (eg. using debootstrap)
>>  - setup Linux binfmt to call qemu-arm-static for ARM binaries and
>> copy qemu-arm-static into the chroot
>>  - chroot
>>  - compile as usual
>> 
>>  The magic is the kernel will automatically call qemu-arm-static each
>> time you try to run an ARM binary, so you transparently execute ARM
>> binaries on your x86 host. That will probably not work to run a full-
>> fledge VPP but it usually works great for compilation.
>> 
>>  I guess that's what Damjan refers to?
>> 
>> 
>> 
>> exactly :)
>> 
>> 
>> 
>> 
>>  ben
>> 
>> 
>> 
>>  -Original Message-
>>  From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  > d...@lists.fd.io <mailto:vpp-dev@lists.fd.io> > On Behalf Of Christian
>>  Hopps
>>      Sent: mercredi 30 octobre 2019 16:48
>>  To: Damjan Marion mailto:dmar...@me.com> >
>>  Cc: Christian Hopps > <mailto:cho...@chopps.org> >; Stanislav Chlebec
>>  > <mailto:stanislav.chle...@pantheon.tech> >; vpp-dev@lists.fd.io
>> <mailto:vpp-dev@lists.fd.io>
>>  Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross
>> compilation
>>  aarch64 Ubuntu support
>> 
>> 
>> 
>> 
>> 
>>  On Oct 30, 2019, at 11:13 AM, Damjan Marion via
>> Lists.Fd.Io
>> 
>> 
>>  > <mailto:dmarion=me@lists.fd.io> > wrote:
>> 
>> 
>> 
>>  On other side it is quite easy to run docker or lxc in
>> cross-arch mode
>> 
>> 
>>  those days and basically
>> 
>> 
>>  have chosen distro inside the container which will
>> produce proper
>> 
>> 
>>  artifacts with close to zero modifications of the build
>> system.
>> 
>> 
>> 
>>  So i’m wondering if we can go into that direction….
>> 
>> 
>> 
>>  We use docker to build our software, but then we are just
>> using docker
>>  running on x86 using the standard x-compile tools (either dpkg
>> --add-arch
>>  under ubuntu or openwrt/buildroot build from source) that I
>> mentioned in a
>>  previous mail. This is just a way for us to have a standard
>> build
>>  environment in place. We aren't doing some sort of simulation
>> of the
>>  foreign architecture.
>> 
>>  Using docker has some drawbacks.. It runs as root (thus the
>> files created
>>  are owned by root), unless you run it as a user. If you run it
>> as a user
>>  you end up needing to create a build container that has that
>> user in it
>>  with the correct id (number) that matches the users id on the
>> host system.
>>  Fetching things from the network using ssh (git clone) can get
>> ugly (it's
>>  doable, and we do it, but...)
>> 
>>  I don't think what we're doing would help much with a project
>> trying to
>>  ena

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Benoit Ganne (bganne) via Lists.Fd.Io
Yeah I agree it is probably the best way to x-compile. x-compilation toolchain 
is a pain to use with a pile of corner-cases. Using qemu emulation, it just 
becomes native compilation again...

ben

> -Original Message-
> From: Damjan Marion 
> Sent: mercredi 30 octobre 2019 18:16
> To: Benoit Ganne (bganne) 
> Cc: Christian Hopps ; Stanislav Chlebec
> ; vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation
> aarch64 Ubuntu support
> 
> 
>   On 30 Oct 2019, at 16:56, Benoit Ganne (bganne)  <mailto:bga...@cisco.com> > wrote:
> 
>   I used qemu + chroot + Linux binfmt support with great success for
> x-compilation, such as described here:
> https://wiki.ubuntu.com/UbuntuDevelopment/Ports
> 
>   The basic steps are:
>   - prepare a chroot mirroring your target (eg. using debootstrap)
>   - setup Linux binfmt to call qemu-arm-static for ARM binaries and
> copy qemu-arm-static into the chroot
>   - chroot
>   - compile as usual
> 
>   The magic is the kernel will automatically call qemu-arm-static each
> time you try to run an ARM binary, so you transparently execute ARM
> binaries on your x86 host. That will probably not work to run a full-
> fledge VPP but it usually works great for compilation.
> 
>   I guess that's what Damjan refers to?
> 
> 
> 
> exactly :)
> 
> 
> 
> 
>   ben
> 
> 
> 
>   -Original Message-
>   From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>   d...@lists.fd.io <mailto:vpp-dev@lists.fd.io> > On Behalf Of Christian
>   Hopps
>   Sent: mercredi 30 octobre 2019 16:48
>   To: Damjan Marion mailto:dmar...@me.com> >
>   Cc: Christian Hopps  <mailto:cho...@chopps.org> >; Stanislav Chlebec
>        <mailto:stanislav.chle...@pantheon.tech> >; vpp-dev@lists.fd.io
> <mailto:vpp-dev@lists.fd.io>
>   Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross
> compilation
>   aarch64 Ubuntu support
> 
> 
> 
> 
> 
>   On Oct 30, 2019, at 11:13 AM, Damjan Marion via
> Lists.Fd.Io
> 
> 
><mailto:dmarion=me@lists.fd.io> > wrote:
> 
> 
> 
>   On other side it is quite easy to run docker or lxc in
> cross-arch mode
> 
> 
>   those days and basically
> 
> 
>   have chosen distro inside the container which will
> produce proper
> 
> 
>   artifacts with close to zero modifications of the build
> system.
> 
> 
> 
>   So i’m wondering if we can go into that direction….
> 
> 
> 
>   We use docker to build our software, but then we are just
> using docker
>   running on x86 using the standard x-compile tools (either dpkg
> --add-arch
>   under ubuntu or openwrt/buildroot build from source) that I
> mentioned in a
>   previous mail. This is just a way for us to have a standard
> build
>   environment in place. We aren't doing some sort of simulation
> of the
>   foreign architecture.
> 
>   Using docker has some drawbacks.. It runs as root (thus the
> files created
>   are owned by root), unless you run it as a user. If you run it
> as a user
>   you end up needing to create a build container that has that
> user in it
>   with the correct id (number) that matches the users id on the
> host system.
>   Fetching things from the network using ssh (git clone) can get
> ugly (it's
>   doable, and we do it, but...)
> 
>   I don't think what we're doing would help much with a project
> trying to
>   enable x-compiling, but what we're doing may not be what your
> referring to
>   as cross-arch mode.
> 
>   Thanks,
>   Chris.
> 
> 
>   -=-=-=-=-=-=-=-=-=-=-=-
>   Links: You receive all messages sent to this group.
> 
>   View/Reply Online (#14393): https://lists.fd.io/g/vpp-
> dev/message/14393
>   Mute This Topic: https://lists.fd.io/mt/39781289/1633896
>   Group Owner: vpp-dev+ow...@lists.fd.io
>   Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub
> [bga...@cisco.com <mailto:bga...@cisco.com> ]
>   -=-=-=-=-=-=-=-=-=-=-=-
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14396): https://lists.fd.io/g/vpp-dev/message/14396
Mute This Topic: https://lists.fd.io/mt/39781289/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Damjan Marion via Lists.Fd.Io

> On 30 Oct 2019, at 16:56, Benoit Ganne (bganne)  wrote:
> 
> I used qemu + chroot + Linux binfmt support with great success for 
> x-compilation, such as described here: 
> https://wiki.ubuntu.com/UbuntuDevelopment/Ports 
> <https://wiki.ubuntu.com/UbuntuDevelopment/Ports>
> 
> The basic steps are:
> - prepare a chroot mirroring your target (eg. using debootstrap)
> - setup Linux binfmt to call qemu-arm-static for ARM binaries and copy 
> qemu-arm-static into the chroot
> - chroot
> - compile as usual
> 
> The magic is the kernel will automatically call qemu-arm-static each time you 
> try to run an ARM binary, so you transparently execute ARM binaries on your 
> x86 host. That will probably not work to run a full-fledge VPP but it usually 
> works great for compilation.
> 
> I guess that's what Damjan refers to?

exactly :)

> 
> ben
> 
>> -Original Message-
>> From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> > <mailto:vpp-dev@lists.fd.io>> On Behalf Of Christian
>> Hopps
>> Sent: mercredi 30 octobre 2019 16:48
>> To: Damjan Marion mailto:dmar...@me.com>>
>> Cc: Christian Hopps mailto:cho...@chopps.org>>; 
>> Stanislav Chlebec
>> mailto:stanislav.chle...@pantheon.tech>>; 
>> vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
>> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation
>> aarch64 Ubuntu support
>> 
>> 
>> 
>>> On Oct 30, 2019, at 11:13 AM, Damjan Marion via Lists.Fd.Io
>>  wrote:
>>> 
>>> On other side it is quite easy to run docker or lxc in cross-arch mode
>> those days and basically
>>> have chosen distro inside the container which will produce proper
>> artifacts with close to zero modifications of the build system.
>>> 
>>> So i’m wondering if we can go into that direction….
>> 
>> We use docker to build our software, but then we are just using docker
>> running on x86 using the standard x-compile tools (either dpkg --add-arch
>> under ubuntu or openwrt/buildroot build from source) that I mentioned in a
>> previous mail. This is just a way for us to have a standard build
>> environment in place. We aren't doing some sort of simulation of the
>> foreign architecture.
>> 
>> Using docker has some drawbacks.. It runs as root (thus the files created
>> are owned by root), unless you run it as a user. If you run it as a user
>> you end up needing to create a build container that has that user in it
>> with the correct id (number) that matches the users id on the host system.
>> Fetching things from the network using ssh (git clone) can get ugly (it's
>> doable, and we do it, but...)
>> 
>> I don't think what we're doing would help much with a project trying to
>> enable x-compiling, but what we're doing may not be what your referring to
>> as cross-arch mode.
>> 
>> Thanks,
>> Chris.
>> 
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> 
>> View/Reply Online (#14393): https://lists.fd.io/g/vpp-dev/message/14393
>> Mute This Topic: https://lists.fd.io/mt/39781289/1633896 
>> <https://lists.fd.io/mt/39781289/1633896>
>> Group Owner: vpp-dev+ow...@lists.fd.io <mailto:vpp-dev+ow...@lists.fd.io>
>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub 
>> <https://lists.fd.io/g/vpp-dev/unsub>  [bga...@cisco.com 
>> <mailto:bga...@cisco.com>]
>> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14395): https://lists.fd.io/g/vpp-dev/message/14395
Mute This Topic: https://lists.fd.io/mt/39781289/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Benoit Ganne (bganne) via Lists.Fd.Io
I used qemu + chroot + Linux binfmt support with great success for 
x-compilation, such as described here: 
https://wiki.ubuntu.com/UbuntuDevelopment/Ports

The basic steps are:
 - prepare a chroot mirroring your target (eg. using debootstrap)
 - setup Linux binfmt to call qemu-arm-static for ARM binaries and copy 
qemu-arm-static into the chroot
 - chroot
 - compile as usual

The magic is the kernel will automatically call qemu-arm-static each time you 
try to run an ARM binary, so you transparently execute ARM binaries on your x86 
host. That will probably not work to run a full-fledge VPP but it usually works 
great for compilation.

I guess that's what Damjan refers to?

ben

> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of Christian
> Hopps
> Sent: mercredi 30 octobre 2019 16:48
> To: Damjan Marion 
> Cc: Christian Hopps ; Stanislav Chlebec
> ; vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation
> aarch64 Ubuntu support
> 
> 
> 
> > On Oct 30, 2019, at 11:13 AM, Damjan Marion via Lists.Fd.Io
>  wrote:
> >
> > On other side it is quite easy to run docker or lxc in cross-arch mode
> those days and basically
> > have chosen distro inside the container which will produce proper
> artifacts with close to zero modifications of the build system.
> >
> > So i’m wondering if we can go into that direction….
> 
> We use docker to build our software, but then we are just using docker
> running on x86 using the standard x-compile tools (either dpkg --add-arch
> under ubuntu or openwrt/buildroot build from source) that I mentioned in a
> previous mail. This is just a way for us to have a standard build
> environment in place. We aren't doing some sort of simulation of the
> foreign architecture.
> 
> Using docker has some drawbacks.. It runs as root (thus the files created
> are owned by root), unless you run it as a user. If you run it as a user
> you end up needing to create a build container that has that user in it
> with the correct id (number) that matches the users id on the host system.
> Fetching things from the network using ssh (git clone) can get ugly (it's
> doable, and we do it, but...)
> 
> I don't think what we're doing would help much with a project trying to
> enable x-compiling, but what we're doing may not be what your referring to
> as cross-arch mode.
> 
> Thanks,
> Chris.
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#14393): https://lists.fd.io/g/vpp-dev/message/14393
> Mute This Topic: https://lists.fd.io/mt/39781289/1633896
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [bga...@cisco.com]
> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14394): https://lists.fd.io/g/vpp-dev/message/14394
Mute This Topic: https://lists.fd.io/mt/39781289/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Christian Hopps


> On Oct 30, 2019, at 11:13 AM, Damjan Marion via Lists.Fd.Io 
>  wrote:
> 
> On other side it is quite easy to run docker or lxc in cross-arch mode those 
> days and basically 
> have chosen distro inside the container which will produce proper artifacts 
> with close to zero modifications of the build system.
> 
> So i’m wondering if we can go into that direction….

We use docker to build our software, but then we are just using docker running 
on x86 using the standard x-compile tools (either dpkg --add-arch under ubuntu 
or openwrt/buildroot build from source) that I mentioned in a previous mail. 
This is just a way for us to have a standard build environment in place. We 
aren't doing some sort of simulation of the foreign architecture.

Using docker has some drawbacks.. It runs as root (thus the files created are 
owned by root), unless you run it as a user. If you run it as a user you end up 
needing to create a build container that has that user in it with the correct 
id (number) that matches the users id on the host system. Fetching things from 
the network using ssh (git clone) can get ugly (it's doable, and we do it, 
but...)

I don't think what we're doing would help much with a project trying to enable 
x-compiling, but what we're doing may not be what your referring to as 
cross-arch mode.

Thanks,
Chris.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14393): https://lists.fd.io/g/vpp-dev/message/14393
Mute This Topic: https://lists.fd.io/mt/39781289/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Damjan Marion via Lists.Fd.Io

Current cross-compilation support, even with this patch is far away from being 
right.
It is basically hack from one to another use case.

- it doesn’t work if target distro and/or version != build distro and version
- packaging doesn’t have a clue about target arch and dependencies
- DPDK have multiple targets in ARM land and we don’t deal with that properly

My concern is that every time somebody wants to add new target, we end up with 
another hack of the build system.
that makes cost of maintaining it higher.

On other side it is quite easy to run docker or lxc in cross-arch mode those 
days and basically 
have chosen distro inside the container which will produce proper artifacts 
with close to zero modifications of the build system.

So i’m wondering if we can go into that direction….

— 
Damjan



> On 30 Oct 2019, at 14:49, Stanislav Chlebec  > wrote:
> 
> Well this request to prepare cross compilation support arose from ARM side.
> Surely how it is now made is a big change for current building procedure.
>  
> It is on discussion if we switch to the other way of cross compilation
> I am not quite sure if we go via containers we could avoid of problems 
> connected with the choice of  distro
> As I know current building process support ubuntu and redhat – probably using 
> containers we would not avoid of choice of distro?  
>  
> From: Damjan Marion mailto:dmar...@me.com>> 
> Sent: Wednesday, October 30, 2019 2:34 PM
> To: Stanislav Chlebec  >
> Cc: open...@barachs.net ; 
> guillaume.gaudonvi...@6wind.com ; 
> e...@cisco.com ; vincent.jar...@6wind.com 
> ; andrea.decaro...@telecomitalia.it 
> ; jobbuil...@projectrotterdam.info 
> ; j...@6wind.com 
> ; vrpo...@cisco.com ; 
> nsax...@marvell.com ; syka...@cisco.com 
> ; Juraj Linkeš  >
> Subject: Re: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu 
> support
>  
>  
> Honestly, I don't see lot of value in this kind of cross-compilation support. 
> VPP today is linked against lot of shared libraries provided by the current 
> distro, so effectively you can cross-compile only for same distro, same 
> version, just different target cpu.
>  
> What about using cross-arch build containers instead?
>  
> 
> 
> On 30 Oct 2019, at 14:10, Stanislav Chlebec  > wrote:
>  
> Hello Dave
>  
> I miss in the building procedure make install-ext-deps.
> It could have been a reason why it failed.
>  
> Prerequisites:
> -You are on some x86_64 system
> -Uninstall previous versions of vpp-ext-deps (it could have been 
> compiled for improper platform x86_64)
> -Clean VPP git repo (make clean -qfx)
> -git checkout 6be55648334308d4eaa4a02143b968720bb62078
> -git fetch "https://gerrit.fd.io/r/vpp " 
> refs/changes/35/21035/23 && git checkout FETCH_HEAD
>  
> Then please try:
> make PLATFORM=aarch64-generic install-dep
> make PLATFORM=aarch64-generic install-ext-deps
> make PLATFORM=aarch64-generic pkg-deb
>  
> I repeated the procedure at my system – here is logs (if it helps...)
> https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647 
> 
>  
> Thanks
> Stanislav
>  
> From: Dave Barach (Code Review) mailto:ger...@fd.io>> 
> Sent: Wednesday, October 30, 2019 1:00 PM
> To: Juraj Linkeš  >; Stanislav Chlebec 
> mailto:stanislav.chle...@pantheon.tech>>
> Cc: fd.io  JJB  >; Nitin Saxena  >; Vratko Polak  >; Ed Kern mailto:e...@cisco.com>>
> Subject: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu 
> support
>  
> Downloaded the patch, tried "make install-dep" followed by "make 
> PLATFORM=aarch64-generic build". First, is that the right way to 
> cross-compile an aarch64 debug binary?
> 
> Aside: "make PLATFORM=aarch64-generic install dep" fails:
> .8 kB]
> Ign:27 http://security.ubuntu.com/ubuntu  
> bionic-security/universe arm64 Packages
> Ign:30 http://security.ubuntu.com/ubuntu  
> bionic-security/multiverse arm64 Packages
> Err:23 http://security.ubuntu.com/ubuntu  
> bionic-security/main arm64 Packages
>   404  Not Found [IP: 91.189.88.149 80]
> Ign:24 http://security.ubuntu.com/ubuntu  
> bionic-security/restricted arm64 Packages
> 

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Dave Barach via Lists.Fd.Io
 arm64 Packages
Ign:23 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 
Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 
Packages
Ign:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 
Packages
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Ign:22 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 
Packages
Err:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
  404  Not Found [IP: 91.189.91.14 80]
Ign:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 
Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 
Packages
Ign:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 
Packages
Fetched 252 kB in 5s (46.9 kB/s)
Reading package lists...
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  
404  Not Found [IP: 91.189.91.14 80]
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.91.14 80]
E: Failed to fetch 
http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.91.14 80]
E: Some index files failed to download. They have been ignored, or old ones 
used instead.
Makefile:310: recipe for target 'install-dep' failed
make: *** [install-dep] Error 100

Subsequently, references to openssl fail during “make PLATFORM=aarch64-generic 
install-ext-deps”.

Suggestions?

From: vpp-dev@lists.fd.io  On Behalf Of Dave Barach via 
Lists.Fd.Io
Sent: Wednesday, October 30, 2019 10:49 AM
To: Christian Hopps ; Damjan Marion 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

To Chris’ point: build-root/Makefile and related files in build-data are in the 
“buildroot” camp: cross-compile a toolchain, utilities, etc. etc. then 
cross-compile the desired products.

I’ll try uninstalling the $BUILDHOST version of vpp-ext-deps to see if I can 
cross-compile aarch64 binaries. I don’t think that’s a solution we can merge.

Given the amount of work that the arm community has invested in vpp, and given 
that target self-compilation can be miserably slow – I’ve watched paint dry 
while compiling on a 64-bit rpi-4 - we’ll come up with a solution which we can 
merge.

D.

From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Christian Hopps
Sent: Wednesday, October 30, 2019 10:19 AM
To: Damjan Marion mailto:dmar...@me.com>>
Cc: Christian Hopps mailto:cho...@chopps.org>>; Stanislav 
Chlebec 
mailto:stanislav.chle...@pantheon.tech>>; 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On Oct 30, 2019, at 9:40 AM, Damjan Marion via Lists.Fd.Io 
> mailto:dmarion=me@lists.fd.io>> wrote:
>
> (resending with bogus email addresses removed, added vpp-dev)
>
> Honestly, I don't see lot of value in this kind of cross-compilation support. 
> VPP today is linked against lot of shared libraries provided by the current 
> distro, so effectively you can cross-compile only for same distro, same 
> version, just different target cpu.

I don't know about this patch in particular; however, what you describe above 
(same distro same version different arch) is certainly useful, especially for 
embedded devices for which vpp is a target. We do this.

Is VPP looking to remove or not support this type of cross compilation?

Perhaps this is already known, but for ubuntu/debian it supports installing 
multiple architectures libraries (shared or otherwise) for x-compile support 
using dpkg --add-architecture (see https://wiki.debian.org/Multiarch/HOWTO). 
Openwrt/build-root use a different mechanism x-compiling everything from source 
I believe.

Thanks,
Chris.

>
> What about using cross-arch build containers instead?
>
>
>> On 30 Oct 2019, at 14:10, Stanislav Chlebec 
>> mailto:stanislav.chle...@pantheon.tech>> 
>> wrote:
>>
>> Hello Dave
>>
>> I miss in the building procedure make install-ext-deps.
>> It could have been a reason why it failed.
>>
>> Prerequisites:
>> -You are on some x86_64 system
>> -Uninstall previous versions of vpp-ext-deps (it could have been 
>> compiled for improper platform x86_64)
>> -Clean VPP git repo (make clean -qfx)
>> -git checkout 6be55648334308d4eaa4a02143b968720bb62078
>> -git fetch &q

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Dave Barach via Lists.Fd.Io
To Chris’ point: build-root/Makefile and related files in build-data are in the 
“buildroot” camp: cross-compile a toolchain, utilities, etc. etc. then 
cross-compile the desired products.

I’ll try uninstalling the $BUILDHOST version of vpp-ext-deps to see if I can 
cross-compile aarch64 binaries. I don’t think that’s a solution we can merge.

Given the amount of work that the arm community has invested in vpp, and given 
that target self-compilation can be miserably slow – I’ve watched paint dry 
while compiling on a 64-bit rpi-4 - we’ll come up with a solution which we can 
merge.

D.

From: vpp-dev@lists.fd.io  On Behalf Of Christian Hopps
Sent: Wednesday, October 30, 2019 10:19 AM
To: Damjan Marion 
Cc: Christian Hopps ; Stanislav Chlebec 
; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support



> On Oct 30, 2019, at 9:40 AM, Damjan Marion via Lists.Fd.Io 
> mailto:dmarion=me@lists.fd.io>> wrote:
>
> (resending with bogus email addresses removed, added vpp-dev)
>
> Honestly, I don't see lot of value in this kind of cross-compilation support. 
> VPP today is linked against lot of shared libraries provided by the current 
> distro, so effectively you can cross-compile only for same distro, same 
> version, just different target cpu.

I don't know about this patch in particular; however, what you describe above 
(same distro same version different arch) is certainly useful, especially for 
embedded devices for which vpp is a target. We do this.

Is VPP looking to remove or not support this type of cross compilation?

Perhaps this is already known, but for ubuntu/debian it supports installing 
multiple architectures libraries (shared or otherwise) for x-compile support 
using dpkg --add-architecture (see https://wiki.debian.org/Multiarch/HOWTO). 
Openwrt/build-root use a different mechanism x-compiling everything from source 
I believe.

Thanks,
Chris.

>
> What about using cross-arch build containers instead?
>
>
>> On 30 Oct 2019, at 14:10, Stanislav Chlebec 
>> mailto:stanislav.chle...@pantheon.tech>> 
>> wrote:
>>
>> Hello Dave
>>
>> I miss in the building procedure make install-ext-deps.
>> It could have been a reason why it failed.
>>
>> Prerequisites:
>> -You are on some x86_64 system
>> -Uninstall previous versions of vpp-ext-deps (it could have been 
>> compiled for improper platform x86_64)
>> -Clean VPP git repo (make clean -qfx)
>> -git checkout 6be55648334308d4eaa4a02143b968720bb62078
>> -git fetch "https://gerrit.fd.io/r/vpp; refs/changes/35/21035/23 && 
>> git checkout FETCH_HEAD
>>
>> Then please try:
>> make PLATFORM=aarch64-generic install-dep
>> make PLATFORM=aarch64-generic install-ext-deps
>> make PLATFORM=aarch64-generic pkg-deb
>>
>> I repeated the procedure at my system – here is logs (if it helps...)
>> https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647
>>
>> Thanks
>> Stanislav
>>
>> From: Dave Barach (Code Review) mailto:ger...@fd.io>>
>> Sent: Wednesday, October 30, 2019 1:00 PM
>> To: Juraj Linkeš 
>> mailto:juraj.lin...@pantheon.tech>>; Stanislav 
>> Chlebec 
>> mailto:stanislav.chle...@pantheon.tech>>
>> Cc: fd.io JJB 
>> mailto:jobbuil...@projectrotterdam.info>>; 
>> Nitin Saxena mailto:nsax...@marvell.com>>; Vratko Polak 
>> mailto:vrpo...@cisco.com>>; Ed Kern 
>> mailto:e...@cisco.com>>
>> Subject: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu 
>> support
>>
>> Downloaded the patch, tried "make install-dep" followed by "make 
>> PLATFORM=aarch64-generic build". First, is that the right way to 
>> cross-compile an aarch64 debug binary?
>>
>> Aside: "make PLATFORM=aarch64-generic install dep" fails:
>>
>> .8 kB]
>> Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 
>> Packages
>> Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
>> Packages
>> Err:23 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
>>   404  Not Found [IP: 91.189.88.149 80]
>> Ign:24 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
>> Packages
>> Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 
>> Packages
>> Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
>> Packages
>> Fetched 53.5 kB in 4s (14.2 kB/s)
>> Reading package lists... Done
>> E: Failed to fetch 
>> http://us.archive.ubuntu.com/ubuntu/dis

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Christian Hopps


> On Oct 30, 2019, at 9:40 AM, Damjan Marion via Lists.Fd.Io 
>  wrote:
> 
> (resending with bogus email addresses removed, added vpp-dev)
> 
> Honestly, I don't see lot of value in this kind of cross-compilation support. 
> VPP today is linked against lot of shared libraries provided by the current 
> distro, so effectively you can cross-compile only for same distro, same 
> version, just different target cpu.

I don't know about this patch in particular; however, what you describe above 
(same distro same version different arch) is certainly useful, especially for 
embedded devices for which vpp is a target. We do this.

Is VPP looking to remove or not support this type of cross compilation?

Perhaps this is already known, but for ubuntu/debian it supports installing 
multiple architectures libraries (shared or otherwise) for x-compile support 
using dpkg --add-architecture (see https://wiki.debian.org/Multiarch/HOWTO). 
Openwrt/build-root use a different mechanism x-compiling everything from source 
I believe.

Thanks,
Chris.

> 
> What about using cross-arch build containers instead?
> 
> 
>> On 30 Oct 2019, at 14:10, Stanislav Chlebec 
>>  wrote:
>> 
>> Hello Dave
>>  
>> I miss in the building procedure make install-ext-deps.
>> It could have been a reason why it failed.
>>  
>> Prerequisites:
>> -You are on some x86_64 system
>> -Uninstall previous versions of vpp-ext-deps (it could have been 
>> compiled for improper platform x86_64)
>> -Clean VPP git repo (make clean -qfx)
>> -git checkout 6be55648334308d4eaa4a02143b968720bb62078
>> -git fetch "https://gerrit.fd.io/r/vpp; refs/changes/35/21035/23 && 
>> git checkout FETCH_HEAD
>>  
>> Then please try:
>> make PLATFORM=aarch64-generic install-dep
>> make PLATFORM=aarch64-generic install-ext-deps
>> make PLATFORM=aarch64-generic pkg-deb
>>  
>> I repeated the procedure at my system – here is logs (if it helps...)
>> https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647
>>  
>> Thanks
>> Stanislav
>>  
>> From: Dave Barach (Code Review)  
>> Sent: Wednesday, October 30, 2019 1:00 PM
>> To: Juraj Linkeš ; Stanislav Chlebec 
>> 
>> Cc: fd.io JJB ; Nitin Saxena 
>> ; Vratko Polak ; Ed Kern 
>> 
>> Subject: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu 
>> support
>>  
>> Downloaded the patch, tried "make install-dep" followed by "make 
>> PLATFORM=aarch64-generic build". First, is that the right way to 
>> cross-compile an aarch64 debug binary?
>> 
>> Aside: "make PLATFORM=aarch64-generic install dep" fails:
>> 
>> .8 kB]
>> Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 
>> Packages
>> Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
>> Packages
>> Err:23 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
>>   404  Not Found [IP: 91.189.88.149 80]
>> Ign:24 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
>> Packages
>> Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 
>> Packages
>> Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
>> Packages
>> Fetched 53.5 kB in 4s (14.2 kB/s)
>> Reading package lists... Done
>> E: Failed to fetch 
>> http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  
>> 404  Not Found [IP: 91.189.91.14 80]
>> E: Failed to fetch 
>> http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages
>>   404  Not Found [IP: 91.189.91.14 80]
>> E: Failed to fetch 
>> http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages
>>   404  Not Found [IP: 91.189.88.149 80]
>> E: Failed to fetch 
>> http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages
>>   404  Not Found [IP: 91.189.91.14 80]
>> E: Some index files failed to download. They have been ignored, or old ones 
>> used instead.
>> Makefile:310: recipe for target 'install-dep' failed
>> The vpp compile attempt fails:
>> 
>> -- Performing Test HAVE_MEMFD_CREATE - Success
>> -- Performing Test HAVE_GETCPU
>> -- Performing Test HAVE_GETCPU - Failed
>> CMake Error at cmake/misc.cmake:27 (_message):
>>   Could NOT find OpenSSL, try to set the path to OpenSSL root folder
>>   in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY)
>>   (found version "1.1.1d")
>> Enough said.
>> 
>> View Change
>> 
>> To view, visit change 21035. To unsubscribe, or for help writing mail 
>> filters, visit settings.
>> 
>> Gerrit-Project: vpp 
>> Gerrit-Branch: master 
>> Gerrit-Change-Id: I66cb57f60d1488a459a74964ea65f2502e4633f6 
>> Gerrit-Change-Number: 21035 
>> Gerrit-PatchSet: 23 
>> Gerrit-Owner: Juraj Linkeš 
>> Gerrit-Assignee: Damjan Marion 
>> Gerrit-Reviewer: Damjan Marion 
>> Gerrit-Reviewer: Dave Barach 
>> Gerrit-Reviewer: Ed Kern 
>> Gerrit-Reviewer: Juraj Linkeš 
>> Gerrit-Reviewer: Nitin Saxena 
>> Gerrit-Reviewer: Stanislav Chlebec 
>> Gerrit-Reviewer: 

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Juraj Linkeš
I'm all for a more generic solution. I haven't heard of using cross-arch build 
containers, so we can look into it. Any pointers would be welcome ☺

Thanks,
Juraj
From: Damjan Marion via Lists.Fd.Io 
Sent: Wednesday, October 30, 2019 2:40 PM
To: Stanislav Chlebec 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 
Ubuntu support

(resending with bogus email addresses removed, added vpp-dev)

Honestly, I don't see lot of value in this kind of cross-compilation support. 
VPP today is linked against lot of shared libraries provided by the current 
distro, so effectively you can cross-compile only for same distro, same 
version, just different target cpu.

What about using cross-arch build containers instead?



On 30 Oct 2019, at 14:10, Stanislav Chlebec 
mailto:stanislav.chle...@pantheon.tech>> wrote:

Hello Dave

I miss in the building procedure make install-ext-deps.
It could have been a reason why it failed.

Prerequisites:
-You are on some x86_64 system
-Uninstall previous versions of vpp-ext-deps (it could have been 
compiled for improper platform x86_64)
-Clean VPP git repo (make clean -qfx)
-git checkout 6be55648334308d4eaa4a02143b968720bb62078
-git fetch "https://gerrit.fd.io/r/vpp; refs/changes/35/21035/23 && git 
checkout FETCH_HEAD

Then please try:
make PLATFORM=aarch64-generic install-dep
make PLATFORM=aarch64-generic install-ext-deps
make PLATFORM=aarch64-generic pkg-deb

I repeated the procedure at my system – here is logs (if it helps...)
https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647

Thanks
Stanislav

From: Dave Barach (Code Review) mailto:ger...@fd.io>>
Sent: Wednesday, October 30, 2019 1:00 PM
To: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; Stanislav 
Chlebec 
mailto:stanislav.chle...@pantheon.tech>>
Cc: fd.io<http://fd.io/> JJB 
mailto:jobbuil...@projectrotterdam.info>>; 
Nitin Saxena mailto:nsax...@marvell.com>>; Vratko Polak 
mailto:vrpo...@cisco.com>>; Ed Kern 
mailto:e...@cisco.com>>
Subject: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

Downloaded the patch, tried "make install-dep" followed by "make 
PLATFORM=aarch64-generic build". First, is that the right way to cross-compile 
an aarch64 debug binary?
Aside: "make PLATFORM=aarch64-generic install dep" fails:

.8 kB]
Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Err:23 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:24 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 
Packages
Ign:27 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 
Packages
Fetched 53.5 kB in 4s (14.2 kB/s)
Reading package lists... Done
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  
404  Not Found [IP: 91.189.91.14 80]
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.91.14 80]
E: Failed to fetch 
http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch 
http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages
  404  Not Found [IP: 91.189.91.14 80]
E: Some index files failed to download. They have been ignored, or old ones 
used instead.
Makefile:310: recipe for target 'install-dep' failed
The vpp compile attempt fails:

-- Performing Test HAVE_MEMFD_CREATE - Success
-- Performing Test HAVE_GETCPU
-- Performing Test HAVE_GETCPU - Failed
CMake Error at cmake/misc.cmake:27 (_message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder
  in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY)
  (found version "1.1.1d")
Enough said.
View Change<https://gerrit.fd.io/r/c/vpp/+/21035>
To view, visit change 21035<https://gerrit.fd.io/r/c/vpp/+/21035>. To 
unsubscribe, or for help writing mail filters, visit 
settings<https://gerrit.fd.io/r/settings>.
Gerrit-Project: vpp
Gerrit-Branch: master
Gerrit-Change-Id: I66cb57f60d1488a459a74964ea65f2502e4633f6
Gerrit-Change-Number: 21035
Gerrit-PatchSet: 23
Gerrit-Owner: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Gerrit-Assignee: Damjan Marion mailto:dmar...@me.com>>
Gerrit-Reviewer: Damjan Marion mailto:dmar...@me.com>>
Gerrit-Reviewer: Dave Barach mailto:open...@barachs.net>>
Gerrit-Reviewer: Ed Kern mailto:e...@cisco.com>>
Gerrit-Reviewer: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>
Gerrit-Reviewer: Nitin Saxena mailto:n

Re: [vpp-dev] Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu support

2019-10-30 Thread Damjan Marion via Lists.Fd.Io
(resending with bogus email addresses removed, added vpp-dev)

Honestly, I don't see lot of value in this kind of cross-compilation support. 
VPP today is linked against lot of shared libraries provided by the current 
distro, so effectively you can cross-compile only for same distro, same 
version, just different target cpu.

What about using cross-arch build containers instead?


> On 30 Oct 2019, at 14:10, Stanislav Chlebec  > wrote:
> 
> Hello Dave
>  
> I miss in the building procedure make install-ext-deps.
> It could have been a reason why it failed.
>  
> Prerequisites:
> -You are on some x86_64 system
> -Uninstall previous versions of vpp-ext-deps (it could have been 
> compiled for improper platform x86_64)
> -Clean VPP git repo (make clean -qfx)
> -git checkout 6be55648334308d4eaa4a02143b968720bb62078
> -git fetch "https://gerrit.fd.io/r/vpp " 
> refs/changes/35/21035/23 && git checkout FETCH_HEAD
>  
> Then please try:
> make PLATFORM=aarch64-generic install-dep
> make PLATFORM=aarch64-generic install-ext-deps
> make PLATFORM=aarch64-generic pkg-deb
>  
> I repeated the procedure at my system – here is logs (if it helps...)
> https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647 
> 
>  
> Thanks
> Stanislav
>  
> From: Dave Barach (Code Review) mailto:ger...@fd.io>> 
> Sent: Wednesday, October 30, 2019 1:00 PM
> To: Juraj Linkeš  >; Stanislav Chlebec 
> mailto:stanislav.chle...@pantheon.tech>>
> Cc: fd.io  JJB  >; Nitin Saxena  >; Vratko Polak  >; Ed Kern mailto:e...@cisco.com>>
> Subject: Change in vpp[master]: ebuild: Cross compilation aarch64 Ubuntu 
> support
>  
> Downloaded the patch, tried "make install-dep" followed by "make 
> PLATFORM=aarch64-generic build". First, is that the right way to 
> cross-compile an aarch64 debug binary?
> 
> Aside: "make PLATFORM=aarch64-generic install dep" fails:
> 
> .8 kB]
> Ign:27 http://security.ubuntu.com/ubuntu  
> bionic-security/universe arm64 Packages
> Ign:30 http://security.ubuntu.com/ubuntu  
> bionic-security/multiverse arm64 Packages
> Err:23 http://security.ubuntu.com/ubuntu  
> bionic-security/main arm64 Packages
>   404  Not Found [IP: 91.189.88.149 80]
> Ign:24 http://security.ubuntu.com/ubuntu  
> bionic-security/restricted arm64 Packages
> Ign:27 http://security.ubuntu.com/ubuntu  
> bionic-security/universe arm64 Packages
> Ign:30 http://security.ubuntu.com/ubuntu  
> bionic-security/multiverse arm64 Packages
> Fetched 53.5 kB in 4s (14.2 kB/s)
> Reading package lists... Done
> E: Failed to fetch 
> http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages 
>  
>  404  Not Found [IP: 91.189.91.14 80]
> E: Failed to fetch 
> http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages
>  
> 
>   404  Not Found [IP: 91.189.91.14 80]
> E: Failed to fetch 
> http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages
>  
> 
>   404  Not Found [IP: 91.189.88.149 80]
> E: Failed to fetch 
> http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages
>  
> 
>   404  Not Found [IP: 91.189.91.14 80]
> E: Some index files failed to download. They have been ignored, or old ones 
> used instead.
> Makefile:310: recipe for target 'install-dep' failed
> The vpp compile attempt fails:
> 
> -- Performing Test HAVE_MEMFD_CREATE - Success
> -- Performing Test HAVE_GETCPU
> -- Performing Test HAVE_GETCPU - Failed
> CMake Error at cmake/misc.cmake:27 (_message):
>   Could NOT find OpenSSL, try to set the path to OpenSSL root folder
>   in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY)
>   (found version "1.1.1d")
> Enough said.
> 
> View Change 
> To view, visit change 21035 . To 
> unsubscribe, or for help writing mail filters, visit settings 
> .
> 
> Gerrit-Project: vpp 
> Gerrit-Branch: master 
> Gerrit-Change-Id: I66cb57f60d1488a459a74964ea65f2502e4633f6 
> Gerrit-Change-Number: 21035 
> Gerrit-PatchSet: 23 
> Gerrit-Owner: Juraj Linkeš