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 <stanislav.chle...@pantheon.tech 
> <mailto:stanislav.chle...@pantheon.tech>> 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 <dmar...@me.com <mailto:dmar...@me.com>> 
> Sent: Wednesday, October 30, 2019 2:34 PM
> To: Stanislav Chlebec <stanislav.chle...@pantheon.tech 
> <mailto:stanislav.chle...@pantheon.tech>>
> Cc: open...@barachs.net <mailto:open...@barachs.net>; 
> guillaume.gaudonvi...@6wind.com <mailto:guillaume.gaudonvi...@6wind.com>; 
> e...@cisco.com <mailto:e...@cisco.com>; vincent.jar...@6wind.com 
> <mailto:vincent.jar...@6wind.com>; andrea.decaro...@telecomitalia.it 
> <mailto:andrea.decaro...@telecomitalia.it>; jobbuil...@projectrotterdam.info 
> <mailto:jobbuil...@projectrotterdam.info>; j...@6wind.com 
> <mailto:j...@6wind.com>; vrpo...@cisco.com <mailto:vrpo...@cisco.com>; 
> nsax...@marvell.com <mailto:nsax...@marvell.com>; syka...@cisco.com 
> <mailto:syka...@cisco.com>; Juraj Linkeš <juraj.lin...@pantheon.tech 
> <mailto:juraj.lin...@pantheon.tech>>
> 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 <stanislav.chle...@pantheon.tech 
> <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 <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 
> <https://gist.github.com/stanislav-chlebec/3042a0eeb56819aea8217dfaf5e60647>
>  
> Thanks
> Stanislav
>  
> From: Dave Barach (Code Review) <ger...@fd.io <mailto:ger...@fd.io>> 
> Sent: Wednesday, October 30, 2019 1:00 PM
> To: Juraj Linkeš <juraj.lin...@pantheon.tech 
> <mailto:juraj.lin...@pantheon.tech>>; Stanislav Chlebec 
> <stanislav.chle...@pantheon.tech <mailto:stanislav.chle...@pantheon.tech>>
> Cc: fd.io <http://fd.io/> JJB <jobbuil...@projectrotterdam.info 
> <mailto:jobbuil...@projectrotterdam.info>>; Nitin Saxena <nsax...@marvell.com 
> <mailto:nsax...@marvell.com>>; Vratko Polak <vrpo...@cisco.com 
> <mailto:vrpo...@cisco.com>>; Ed Kern <e...@cisco.com <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 <http://security.ubuntu.com/ubuntu> 
> bionic-security/universe arm64 Packages
> Ign:30 http://security.ubuntu.com/ubuntu <http://security.ubuntu.com/ubuntu> 
> bionic-security/multiverse arm64 Packages
> Err:23 http://security.ubuntu.com/ubuntu <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 <http://security.ubuntu.com/ubuntu> 
> bionic-security/restricted arm64 Packages
> Ign:27 http://security.ubuntu.com/ubuntu <http://security.ubuntu.com/ubuntu> 
> bionic-security/universe arm64 Packages
> Ign:30 http://security.ubuntu.com/ubuntu <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 
> <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
>  
> <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
>  
> <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
>  
> <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š <juraj.lin...@pantheon.tech 
> <mailto:juraj.lin...@pantheon.tech>>
> Gerrit-Assignee: Damjan Marion <dmar...@me.com <mailto:dmar...@me.com>>
> Gerrit-Reviewer: Damjan Marion <dmar...@me.com <mailto:dmar...@me.com>>
> Gerrit-Reviewer: Dave Barach <open...@barachs.net 
> <mailto:open...@barachs.net>>
> Gerrit-Reviewer: Ed Kern <e...@cisco.com <mailto:e...@cisco.com>>
> Gerrit-Reviewer: Juraj Linkeš <juraj.lin...@pantheon.tech 
> <mailto:juraj.lin...@pantheon.tech>>
> Gerrit-Reviewer: Nitin Saxena <nsax...@marvell.com 
> <mailto:nsax...@marvell.com>>
> Gerrit-Reviewer: Stanislav Chlebec <stanislav.chle...@pantheon.tech 
> <mailto:stanislav.chle...@pantheon.tech>>
> Gerrit-Reviewer: Vratko Polak <vrpo...@cisco.com <mailto:vrpo...@cisco.com>>
> Gerrit-Reviewer: fd.io <http://fd.io/> JJB <jobbuil...@projectrotterdam.info 
> <mailto:jobbuil...@projectrotterdam.info>>
> Gerrit-Comment-Date: Wed, 30 Oct 2019 11:59:11 +0000 
> Gerrit-HasComments: No 
> Gerrit-Has-Labels: No 
> Gerrit-MessageType: comment

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

View/Reply Online (#14392): https://lists.fd.io/g/vpp-dev/message/14392
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to