Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-05-03 Thread Stanislav Chlebec
2.
I checked my environment.
For building vpp I use https://github.com/vpp-dev/vpp.git
This version does not contain the specified patch from Ole.
This probably explains the failure to build with qemu...

(At the same time it is succesfully built on Cavium Armv8 (2 x ThunderX)   96 
Cores @ 2.0 GHz128 GB 250 GB)

Stanislav

-Original Message-
From: Stanislav Chlebec [mailto:stanislav.chle...@pantheon.tech] 
Sent: Wednesday, May 2, 2018 9:10 AM
To: Brian Brooks ; Ole Troan 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello Brian
1.
I was able to natively compile VPP.
2.
Cross-platform compilation:
I will try that patch from Ole on my cross platform instance and/or check if 
mentioned patch from Ole is included in my build later and I will report the 
result.

Thanks
Stanislav

-Original Message-
From: Brian Brooks [mailto:brian.bro...@arm.com]
Sent: Thursday, April 26, 2018 4:11 AM
To: Ole Troan 
Cc: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Thanks, Ole.

Stanislav, does this help? Are you able to natively compile on arm64 instead of 
cross?

Brian

-Original Message-
From: Ole Troan 
Sent: Wednesday, April 25, 2018 11:56 AM
To: Brian Brooks 
Cc: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Brian,

> This appears to be related to cross compiling VPP.
> vppapigen is built for the cross target, but then run on the host as part of 
> the build.
>
> Can someone who is familiar with the build system confirm? If so, is it worth 
> fixing a cross build such that vppapigen is compiled for host target and run 
> on host target when cross compiling for the cross target?


vppapigen has been replaced with a PLY based compiler. Which does not need to 
be built.
Would you be able to try with that?

https://gerrit.fd.io/r/#/c/8781/

Best regards,
Ole

> From: vpp-dev@lists.fd.io  On Behalf Of Brian 
> Brooks
> Sent: Friday, April 20, 2018 5:18 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Can you copy/paste the compiler or linker error?
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav 
> Chlebec
> Sent: Friday, April 20, 2018 6:05 AM
> To: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Hello Brian
> I have not yet tried to build it in the arm64 VM.
> What I found out more that build fails in the file src/vppinfra/time.h 
> ...
> 
> #elif defined (__aarch64__)
> always_inline u64
> clib_cpu_time_now (void)
> {
>   u64 tsc;
>
>   /* Works on Cavium ThunderX. Other platforms: YMMV */
>   asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));
>
>   return tsc;
> }
> ...
>
> Stanislav
>
>
> From: Brian Brooks [mailto:brian.bro...@arm.com]
> Sent: Monday, April 16, 2018 7:51 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: RE: Trying to build vpp on amd64 platform via qemu static 
> library qemu-aarch64-static in Docker container
>
> Hi Stanislav,
>
> Does the build work if you git clone and make build-release inside the arm64 
> VM (no docker)?
>
> Brian
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav 
> Chlebec
> Sent: Monday, April 16, 2018 2:27 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Hello all
> I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
> which will be vpp compiled and installed.
> I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
> for emulation of arm64 instructions.
>
> (
> I found how to do it here:
> https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
> http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
> )
>
> Everything goes more the less  well but it fails in this Dockerfile step:
> {
> RUN /bin/bash -c "\
> git clone https://github.com/vpp-dev/vpp.git \
> && cd vpp \
> && git checkout ${VPP_COMMIT} \
> && UNATTENDED=y make vpp_configure_args_vpp='--disable-japi 
> --disable-vom' install-dep bootstrap dpdk-install-dev build build-release;"
> }
>
> It seems that build of vpp is complete without errors but the next processes 
> (installing od 

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-05-02 Thread Stanislav Chlebec
Hello Brian
1.
I was able to natively compile VPP.
2.
Cross-platform compilation:
I will try that patch from Ole on my cross platform instance and/or check if 
mentioned patch from Ole is included in my build later and I will report the 
result.

Thanks
Stanislav

-Original Message-
From: Brian Brooks [mailto:brian.bro...@arm.com] 
Sent: Thursday, April 26, 2018 4:11 AM
To: Ole Troan 
Cc: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Thanks, Ole.

Stanislav, does this help? Are you able to natively compile on arm64 instead of 
cross?

Brian

-Original Message-
From: Ole Troan 
Sent: Wednesday, April 25, 2018 11:56 AM
To: Brian Brooks 
Cc: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Brian,

> This appears to be related to cross compiling VPP.
> vppapigen is built for the cross target, but then run on the host as part of 
> the build.
>
> Can someone who is familiar with the build system confirm? If so, is it worth 
> fixing a cross build such that vppapigen is compiled for host target and run 
> on host target when cross compiling for the cross target?


vppapigen has been replaced with a PLY based compiler. Which does not need to 
be built.
Would you be able to try with that?

https://gerrit.fd.io/r/#/c/8781/

Best regards,
Ole

> From: vpp-dev@lists.fd.io  On Behalf Of Brian 
> Brooks
> Sent: Friday, April 20, 2018 5:18 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Can you copy/paste the compiler or linker error?
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav 
> Chlebec
> Sent: Friday, April 20, 2018 6:05 AM
> To: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Hello Brian
> I have not yet tried to build it in the arm64 VM.
> What I found out more that build fails in the file src/vppinfra/time.h 
> ...
> 
> #elif defined (__aarch64__)
> always_inline u64
> clib_cpu_time_now (void)
> {
>   u64 tsc;
>
>   /* Works on Cavium ThunderX. Other platforms: YMMV */
>   asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));
>
>   return tsc;
> }
> ...
>
> Stanislav
>
>
> From: Brian Brooks [mailto:brian.bro...@arm.com]
> Sent: Monday, April 16, 2018 7:51 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: RE: Trying to build vpp on amd64 platform via qemu static 
> library qemu-aarch64-static in Docker container
>
> Hi Stanislav,
>
> Does the build work if you git clone and make build-release inside the arm64 
> VM (no docker)?
>
> Brian
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav 
> Chlebec
> Sent: Monday, April 16, 2018 2:27 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu 
> static library qemu-aarch64-static in Docker container
>
> Hello all
> I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
> which will be vpp compiled and installed.
> I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
> for emulation of arm64 instructions.
>
> (
> I found how to do it here:
> https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
> http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
> )
>
> Everything goes more the less  well but it fails in this Dockerfile step:
> {
> RUN /bin/bash -c "\
> git clone https://github.com/vpp-dev/vpp.git \
> && cd vpp \
> && git checkout ${VPP_COMMIT} \
> && UNATTENDED=y make vpp_configure_args_vpp='--disable-japi 
> --disable-vom' install-dep bootstrap dpdk-install-dev build build-release;"
> }
>
> It seems that build of vpp is complete without errors but the next processes 
> (installing od dpdk ?) will end with error 21326 Illegal instruction:
> {
> ….
> Build complete [arm64-armv8a-linuxapp-gcc] == 
> Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/
> ….
> ….
> ==
>   version vpp 18.01
>   prefix  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
>   libdir  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
>   includedir  ${prefix}/include
>   CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
> -fstack-protector-all -fPIC -Werror
>   CPPFLAGS   

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-25 Thread Brian Brooks
Thanks, Ole.

Stanislav, does this help? Are you able to natively compile on arm64 instead of 
cross?

Brian

-Original Message-
From: Ole Troan 
Sent: Wednesday, April 25, 2018 11:56 AM
To: Brian Brooks 
Cc: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Brian,

> This appears to be related to cross compiling VPP.
> vppapigen is built for the cross target, but then run on the host as part of 
> the build.
>
> Can someone who is familiar with the build system confirm? If so, is it worth 
> fixing a cross build such that vppapigen is compiled for host target and run 
> on host target when cross compiling for the cross target?


vppapigen has been replaced with a PLY based compiler. Which does not need to 
be built.
Would you be able to try with that?

https://gerrit.fd.io/r/#/c/8781/

Best regards,
Ole

> From: vpp-dev@lists.fd.io  On Behalf Of Brian
> Brooks
> Sent: Friday, April 20, 2018 5:18 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu
> static library qemu-aarch64-static in Docker container
>
> Can you copy/paste the compiler or linker error?
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav
> Chlebec
> Sent: Friday, April 20, 2018 6:05 AM
> To: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu
> static library qemu-aarch64-static in Docker container
>
> Hello Brian
> I have not yet tried to build it in the arm64 VM.
> What I found out more that build fails in the file src/vppinfra/time.h
> ...
> 
> #elif defined (__aarch64__)
> always_inline u64
> clib_cpu_time_now (void)
> {
>   u64 tsc;
>
>   /* Works on Cavium ThunderX. Other platforms: YMMV */
>   asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));
>
>   return tsc;
> }
> ...
>
> Stanislav
>
>
> From: Brian Brooks [mailto:brian.bro...@arm.com]
> Sent: Monday, April 16, 2018 7:51 PM
> To: Stanislav Chlebec ;
> vpp-dev@lists.fd.io
> Subject: RE: Trying to build vpp on amd64 platform via qemu static
> library qemu-aarch64-static in Docker container
>
> Hi Stanislav,
>
> Does the build work if you git clone and make build-release inside the arm64 
> VM (no docker)?
>
> Brian
>
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav
> Chlebec
> Sent: Monday, April 16, 2018 2:27 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu
> static library qemu-aarch64-static in Docker container
>
> Hello all
> I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
> which will be vpp compiled and installed.
> I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
> for emulation of arm64 instructions.
>
> (
> I found how to do it here:
> https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
> http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
> )
>
> Everything goes more the less  well but it fails in this Dockerfile step:
> {
> RUN /bin/bash -c "\
> git clone https://github.com/vpp-dev/vpp.git \
> && cd vpp \
> && git checkout ${VPP_COMMIT} \
> && UNATTENDED=y make vpp_configure_args_vpp='--disable-japi 
> --disable-vom' install-dep bootstrap dpdk-install-dev build build-release;"
> }
>
> It seems that build of vpp is complete without errors but the next processes 
> (installing od dpdk ?) will end with error 21326 Illegal instruction:
> {
> ….
> Build complete [arm64-armv8a-linuxapp-gcc] ==
> Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/
> ….
> ….
> ==
>   version vpp 18.01
>   prefix  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
>   libdir  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
>   includedir  ${prefix}/include
>   CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
> -fstack-protector-all -fPIC -Werror
>   CPPFLAGS  
> -I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk
>  -I/usr/include/dpdk
>   LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
> -fstack-protector-all -fPIC -Werror   
> -L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
> -Wl,-rpath 
> -Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib
>
> with:
>   libssl  yes
> …..
> ==
>   Building vpp in
> /opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
> make[2]: Entering 

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-25 Thread Ole Troan
Brian,

> This appears to be related to cross compiling VPP.
> vppapigen is built for the cross target, but then run on the host as part of 
> the build.
> 
> Can someone who is familiar with the build system confirm? If so, is it worth 
> fixing a cross build such that vppapigen is compiled for host target and run 
> on host target when cross compiling for the cross target?


vppapigen has been replaced with a PLY based compiler. Which does not need to 
be built.
Would you be able to try with that?

https://gerrit.fd.io/r/#/c/8781/

Best regards,
Ole

> From: vpp-dev@lists.fd.io  On Behalf Of Brian Brooks
> Sent: Friday, April 20, 2018 5:18 PM
> To: Stanislav Chlebec ; vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
> library qemu-aarch64-static in Docker container
> 
> Can you copy/paste the compiler or linker error?
> 
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav Chlebec
> Sent: Friday, April 20, 2018 6:05 AM
> To: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
> library qemu-aarch64-static in Docker container
> 
> Hello Brian
> I have not yet tried to build it in the arm64 VM.
> What I found out more that build fails in the file src/vppinfra/time.h
> ...
> 
> #elif defined (__aarch64__)
> always_inline u64
> clib_cpu_time_now (void)
> {
>   u64 tsc;
> 
>   /* Works on Cavium ThunderX. Other platforms: YMMV */
>   asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));
> 
>   return tsc;
> }
> ...
> 
> Stanislav
> 
> 
> From: Brian Brooks [mailto:brian.bro...@arm.com]
> Sent: Monday, April 16, 2018 7:51 PM
> To: Stanislav Chlebec ; vpp-dev@lists.fd.io
> Subject: RE: Trying to build vpp on amd64 platform via qemu static library 
> qemu-aarch64-static in Docker container
> 
> Hi Stanislav,
> 
> Does the build work if you git clone and make build-release inside the arm64 
> VM (no docker)?
> 
> Brian
> 
> From: vpp-dev@lists.fd.io  On Behalf Of Stanislav Chlebec
> Sent: Monday, April 16, 2018 2:27 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
> library qemu-aarch64-static in Docker container
> 
> Hello all
> I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
> which will be vpp compiled and installed.
> I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
> for emulation of arm64 instructions.
> 
> (
> I found how to do it here:
> https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
> http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
> )
> 
> Everything goes more the less  well but it fails in this Dockerfile step:
> {
> RUN /bin/bash -c "\
> git clone https://github.com/vpp-dev/vpp.git \
> && cd vpp \
> && git checkout ${VPP_COMMIT} \
> && UNATTENDED=y make vpp_configure_args_vpp='--disable-japi 
> --disable-vom' install-dep bootstrap dpdk-install-dev build build-release;"
> }
> 
> It seems that build of vpp is complete without errors but the next processes 
> (installing od dpdk ?) will end with error 21326 Illegal instruction:
> {
> ….
> Build complete [arm64-armv8a-linuxapp-gcc]
> == Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/
> ….
> ….
> ==
>   version vpp 18.01
>   prefix  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
>   libdir  
> /opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
>   includedir  ${prefix}/include
>   CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
> -fstack-protector-all -fPIC -Werror
>   CPPFLAGS  
> -I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk
>  -I/usr/include/dpdk
>   LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
> -fstack-protector-all -fPIC -Werror   
> -L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
> -Wl,-rpath 
> -Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib
> 
> with:
>   libssl  yes
> …..
> ==
>  Building vpp in 
> /opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
> make[2]: Entering directory 
> '/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp'
>   YACC tools/vppapigen/gram.c
>   CC   vppinfra/socket.lo
>   CC   vppinfra/timer.lo
>   CC   vppinfra/unix-formats.lo
>   CC   vppinfra/unix-misc.lo
>   VERSION  vpp/app/version.h (18.01-rc0~374-g2d36ed2)
>   CC   tools/vppapigen/lex.o
>   CC   tools/vppapigen/gram.o
>   CC   tools/vppapigen/node.o
>   CC   vppinfra/asm_x86.lo
>  CC   

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-25 Thread Brian Brooks
This appears to be related to cross compiling VPP.
vppapigen is built for the cross target, but then run on the host as part of 
the build.

Can someone who is familiar with the build system confirm? If so, is it worth 
fixing a cross build such that vppapigen is compiled for host target and run on 
host target when cross compiling for the cross target?

BB

From: vpp-dev@lists.fd.io  On Behalf Of Brian Brooks
Sent: Friday, April 20, 2018 5:18 PM
To: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Can you copy/paste the compiler or linker error?

From: vpp-dev@lists.fd.io 
> On Behalf Of Stanislav Chlebec
Sent: Friday, April 20, 2018 6:05 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello Brian
I have not yet tried to build it in the arm64 VM.
What I found out more that build fails in the file src/vppinfra/time.h
...

#elif defined (__aarch64__)
always_inline u64
clib_cpu_time_now (void)
{
  u64 tsc;

  /* Works on Cavium ThunderX. Other platforms: YMMV */
  asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));

  return tsc;
}
...

Stanislav


From: Brian Brooks [mailto:brian.bro...@arm.com]
Sent: Monday, April 16, 2018 7:51 PM
To: Stanislav Chlebec 
>; 
vpp-dev@lists.fd.io
Subject: RE: Trying to build vpp on amd64 platform via qemu static library 
qemu-aarch64-static in Docker container

Hi Stanislav,

Does the build work if you git clone and make build-release inside the arm64 VM 
(no docker)?

Brian

From: vpp-dev@lists.fd.io 
> On Behalf Of Stanislav Chlebec
Sent: Monday, April 16, 2018 2:27 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello all
I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
which will be vpp compiled and installed.
I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
for emulation of arm64 instructions.

(
I found how to do it here:
https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
)

Everything goes more the less  well but it fails in this Dockerfile step:
{
RUN /bin/bash -c "\
git clone https://github.com/vpp-dev/vpp.git \
&& cd vpp \
&& git checkout ${VPP_COMMIT} \
&& UNATTENDED=y make vpp_configure_args_vpp='--disable-japi --disable-vom' 
install-dep bootstrap dpdk-install-dev build build-release;"
}

It seems that build of vpp is complete without errors but the next processes 
(installing od dpdk ?) will end with error 21326 Illegal instruction:
{

Build complete [arm64-armv8a-linuxapp-gcc]
== Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/


==
  version vpp 18.01
  prefix  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
  libdir  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
  includedir  ${prefix}/include
  CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror
  CPPFLAGS  
-I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk 
-I/usr/include/dpdk
  LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror   
-L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
-Wl,-rpath 
-Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib

with:
  libssl  yes
.
==
 Building vpp in 
/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
make[2]: Entering directory 
'/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp'
  YACC tools/vppapigen/gram.c
  CC   vppinfra/socket.lo
  CC   vppinfra/timer.lo
  CC   vppinfra/unix-formats.lo
  CC   vppinfra/unix-misc.lo
  VERSION  vpp/app/version.h (18.01-rc0~374-g2d36ed2)
  CC   tools/vppapigen/lex.o
  CC   tools/vppapigen/gram.o
  CC   tools/vppapigen/node.o
  CC   vppinfra/asm_x86.lo
 CC   vppinfra/backtrace.lo
  CC   vppinfra/cpu.lo
  CC   vppinfra/elf.lo
  CC   vppinfra/elog.lo
  CC   vppinfra/error.lo
  CC   vppinfra/fifo.lo
  CC   vppinfra/fheap.lo
  

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-20 Thread Brian Brooks
Can you copy/paste the compiler or linker error?

From: vpp-dev@lists.fd.io  On Behalf Of Stanislav Chlebec
Sent: Friday, April 20, 2018 6:05 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello Brian
I have not yet tried to build it in the arm64 VM.
What I found out more that build fails in the file src/vppinfra/time.h
...

#elif defined (__aarch64__)
always_inline u64
clib_cpu_time_now (void)
{
  u64 tsc;

  /* Works on Cavium ThunderX. Other platforms: YMMV */
  asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));

  return tsc;
}
...

Stanislav


From: Brian Brooks [mailto:brian.bro...@arm.com]
Sent: Monday, April 16, 2018 7:51 PM
To: Stanislav Chlebec 
>; 
vpp-dev@lists.fd.io
Subject: RE: Trying to build vpp on amd64 platform via qemu static library 
qemu-aarch64-static in Docker container

Hi Stanislav,

Does the build work if you git clone and make build-release inside the arm64 VM 
(no docker)?

Brian

From: vpp-dev@lists.fd.io 
> On Behalf Of Stanislav Chlebec
Sent: Monday, April 16, 2018 2:27 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello all
I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
which will be vpp compiled and installed.
I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
for emulation of arm64 instructions.

(
I found how to do it here:
https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
)

Everything goes more the less  well but it fails in this Dockerfile step:
{
RUN /bin/bash -c "\
git clone https://github.com/vpp-dev/vpp.git \
&& cd vpp \
&& git checkout ${VPP_COMMIT} \
&& UNATTENDED=y make vpp_configure_args_vpp='--disable-japi --disable-vom' 
install-dep bootstrap dpdk-install-dev build build-release;"
}

It seems that build of vpp is complete without errors but the next processes 
(installing od dpdk ?) will end with error 21326 Illegal instruction:
{

Build complete [arm64-armv8a-linuxapp-gcc]
== Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/


==
  version vpp 18.01
  prefix  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
  libdir  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
  includedir  ${prefix}/include
  CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror
  CPPFLAGS  
-I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk 
-I/usr/include/dpdk
  LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror   
-L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
-Wl,-rpath 
-Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib

with:
  libssl  yes
.
==
 Building vpp in 
/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
make[2]: Entering directory 
'/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp'
  YACC tools/vppapigen/gram.c
  CC   vppinfra/socket.lo
  CC   vppinfra/timer.lo
  CC   vppinfra/unix-formats.lo
  CC   vppinfra/unix-misc.lo
  VERSION  vpp/app/version.h (18.01-rc0~374-g2d36ed2)
  CC   tools/vppapigen/lex.o
  CC   tools/vppapigen/gram.o
  CC   tools/vppapigen/node.o
  CC   vppinfra/asm_x86.lo
 CC   vppinfra/backtrace.lo
  CC   vppinfra/cpu.lo
  CC   vppinfra/elf.lo
  CC   vppinfra/elog.lo
  CC   vppinfra/error.lo
  CC   vppinfra/fifo.lo
  CC   vppinfra/fheap.lo
  CC   vppinfra/format.lo
  CC   vppinfra/pool.lo
  CC   vppinfra/graph.lo
  CC   vppinfra/hash.lo
  CC   vppinfra/heap.lo
  CPPASvppinfra/longjmp.lo
  CC   vppinfra/macros.lo
  CC   vppinfra/mhash.lo
  CC   vppinfra/mheap.lo
  CC   vppinfra/md5.lo
  CC   vppinfra/mem_mheap.lo
  CC   vppinfra/ptclosure.lo
  CC   vppinfra/random.lo
  CC   vppinfra/random_buffer.lo
  CC   vppinfra/random_isaac.lo
  CC   vppinfra/serialize.lo
  CC   vppinfra/slist.lo
  CC   vppinfra/std-formats.lo
  CC   vppinfra/string.lo
  CC   vppinfra/time.lo
  CC   vppinfra/timing_wheel.lo
  CC   vppinfra/tw_timer_2t_1w_2048sl.lo
  CC   vppinfra/tw_timer_16t_2w_512sl.lo
  CC   

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-20 Thread Stanislav Chlebec
Hello Brian
I have not yet tried to build it in the arm64 VM.
What I found out more that build fails in the file src/vppinfra/time.h
...

#elif defined (__aarch64__)
always_inline u64
clib_cpu_time_now (void)
{
  u64 tsc;

  /* Works on Cavium ThunderX. Other platforms: YMMV */
  asm volatile ("mrs %0, cntvct_el0":"=r" (tsc));

  return tsc;
}
...

Stanislav


From: Brian Brooks [mailto:brian.bro...@arm.com]
Sent: Monday, April 16, 2018 7:51 PM
To: Stanislav Chlebec ; vpp-dev@lists.fd.io
Subject: RE: Trying to build vpp on amd64 platform via qemu static library 
qemu-aarch64-static in Docker container

Hi Stanislav,

Does the build work if you git clone and make build-release inside the arm64 VM 
(no docker)?

Brian

From: vpp-dev@lists.fd.io 
> On Behalf Of Stanislav Chlebec
Sent: Monday, April 16, 2018 2:27 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello all
I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
which will be vpp compiled and installed.
I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
for emulation of arm64 instructions.

(
I found how to do it here:
https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
)

Everything goes more the less  well but it fails in this Dockerfile step:
{
RUN /bin/bash -c "\
git clone https://github.com/vpp-dev/vpp.git \
&& cd vpp \
&& git checkout ${VPP_COMMIT} \
&& UNATTENDED=y make vpp_configure_args_vpp='--disable-japi --disable-vom' 
install-dep bootstrap dpdk-install-dev build build-release;"
}

It seems that build of vpp is complete without errors but the next processes 
(installing od dpdk ?) will end with error 21326 Illegal instruction:
{

Build complete [arm64-armv8a-linuxapp-gcc]
== Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/


==
  version vpp 18.01
  prefix  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
  libdir  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
  includedir  ${prefix}/include
  CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror
  CPPFLAGS  
-I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk 
-I/usr/include/dpdk
  LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror   
-L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
-Wl,-rpath 
-Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib

with:
  libssl  yes
.
==
 Building vpp in 
/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
make[2]: Entering directory 
'/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp'
  YACC tools/vppapigen/gram.c
  CC   vppinfra/socket.lo
  CC   vppinfra/timer.lo
  CC   vppinfra/unix-formats.lo
  CC   vppinfra/unix-misc.lo
  VERSION  vpp/app/version.h (18.01-rc0~374-g2d36ed2)
  CC   tools/vppapigen/lex.o
  CC   tools/vppapigen/gram.o
  CC   tools/vppapigen/node.o
  CC   vppinfra/asm_x86.lo
 CC   vppinfra/backtrace.lo
  CC   vppinfra/cpu.lo
  CC   vppinfra/elf.lo
  CC   vppinfra/elog.lo
  CC   vppinfra/error.lo
  CC   vppinfra/fifo.lo
  CC   vppinfra/fheap.lo
  CC   vppinfra/format.lo
  CC   vppinfra/pool.lo
  CC   vppinfra/graph.lo
  CC   vppinfra/hash.lo
  CC   vppinfra/heap.lo
  CPPASvppinfra/longjmp.lo
  CC   vppinfra/macros.lo
  CC   vppinfra/mhash.lo
  CC   vppinfra/mheap.lo
  CC   vppinfra/md5.lo
  CC   vppinfra/mem_mheap.lo
  CC   vppinfra/ptclosure.lo
  CC   vppinfra/random.lo
  CC   vppinfra/random_buffer.lo
  CC   vppinfra/random_isaac.lo
  CC   vppinfra/serialize.lo
  CC   vppinfra/slist.lo
  CC   vppinfra/std-formats.lo
  CC   vppinfra/string.lo
  CC   vppinfra/time.lo
  CC   vppinfra/timing_wheel.lo
  CC   vppinfra/tw_timer_2t_1w_2048sl.lo
  CC   vppinfra/tw_timer_16t_2w_512sl.lo
  CC   vppinfra/tw_timer_16t_1w_2048sl.lo
  CC   vppinfra/tw_timer_4t_3w_256sl.lo
  CC   vppinfra/tw_timer_1t_3w_1024sl_ov.lo
  CC   vppinfra/unformat.lo
  CC   vppinfra/vec.lo
  CC   vppinfra/vector.lo
  CC   vppinfra/zvec.lo
  CC   vppinfra/elf_clib.lo
  CC   vppinfra/linux/mem.lo
  CC   vppinfra/linux/sysfs.lo
  CCLD libvppinfra.la
  CCLD vppapigen
  APIGEN 

Re: [vpp-dev] Trying to build vpp on amd64 platform via qemu static library qemu-aarch64-static in Docker container

2018-04-16 Thread Brian Brooks
Hi Stanislav,

Does the build work if you git clone and make build-release inside the arm64 VM 
(no docker)?

Brian

From: vpp-dev@lists.fd.io  On Behalf Of Stanislav Chlebec
Sent: Monday, April 16, 2018 2:27 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Trying to build vpp on amd64 platform via qemu static 
library qemu-aarch64-static in Docker container

Hello all
I am trying to prepare arm64 docker image (based on arm64v8/ubuntu:latest) in 
which will be vpp compiled and installed.
I  do it on amd64 platform using qemu static library for qemu-aarch64-static 
for emulation of arm64 instructions.

(
I found how to do it here:
https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
http://www.hotblackrobotics.com/en/blog/2018/01/22/docker-images-arm/
)

Everything goes more the less  well but it fails in this Dockerfile step:
{
RUN /bin/bash -c "\
git clone https://github.com/vpp-dev/vpp.git \
&& cd vpp \
&& git checkout ${VPP_COMMIT} \
&& UNATTENDED=y make vpp_configure_args_vpp='--disable-japi --disable-vom' 
install-dep bootstrap dpdk-install-dev build build-release;"
}

It seems that build of vpp is complete without errors but the next processes 
(installing od dpdk ?) will end with error 21326 Illegal instruction:
{

Build complete [arm64-armv8a-linuxapp-gcc]
== Installing /opt/vpp-agent/dev/vpp/dpdk/deb/debian/tmp/usr/


==
  version vpp 18.01
  prefix  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp
  libdir  
/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/vpp/lib64
  includedir  ${prefix}/include
  CFLAGS   -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror
  CPPFLAGS  
-I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk 
-I/usr/include/dpdk
  LDFLAGS  -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 
-fstack-protector-all -fPIC -Werror   
-L/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib 
-Wl,-rpath 
-Wl,/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib

with:
  libssl  yes
.
==
 Building vpp in 
/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp 
make[2]: Entering directory 
'/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp'
  YACC tools/vppapigen/gram.c
  CC   vppinfra/socket.lo
  CC   vppinfra/timer.lo
  CC   vppinfra/unix-formats.lo
  CC   vppinfra/unix-misc.lo
  VERSION  vpp/app/version.h (18.01-rc0~374-g2d36ed2)
  CC   tools/vppapigen/lex.o
  CC   tools/vppapigen/gram.o
  CC   tools/vppapigen/node.o
  CC   vppinfra/asm_x86.lo
 CC   vppinfra/backtrace.lo
  CC   vppinfra/cpu.lo
  CC   vppinfra/elf.lo
  CC   vppinfra/elog.lo
  CC   vppinfra/error.lo
  CC   vppinfra/fifo.lo
  CC   vppinfra/fheap.lo
  CC   vppinfra/format.lo
  CC   vppinfra/pool.lo
  CC   vppinfra/graph.lo
  CC   vppinfra/hash.lo
  CC   vppinfra/heap.lo
  CPPASvppinfra/longjmp.lo
  CC   vppinfra/macros.lo
  CC   vppinfra/mhash.lo
  CC   vppinfra/mheap.lo
  CC   vppinfra/md5.lo
  CC   vppinfra/mem_mheap.lo
  CC   vppinfra/ptclosure.lo
  CC   vppinfra/random.lo
  CC   vppinfra/random_buffer.lo
  CC   vppinfra/random_isaac.lo
  CC   vppinfra/serialize.lo
  CC   vppinfra/slist.lo
  CC   vppinfra/std-formats.lo
  CC   vppinfra/string.lo
  CC   vppinfra/time.lo
  CC   vppinfra/timing_wheel.lo
  CC   vppinfra/tw_timer_2t_1w_2048sl.lo
  CC   vppinfra/tw_timer_16t_2w_512sl.lo
  CC   vppinfra/tw_timer_16t_1w_2048sl.lo
  CC   vppinfra/tw_timer_4t_3w_256sl.lo
  CC   vppinfra/tw_timer_1t_3w_1024sl_ov.lo
  CC   vppinfra/unformat.lo
  CC   vppinfra/vec.lo
  CC   vppinfra/vector.lo
  CC   vppinfra/zvec.lo
  CC   vppinfra/elf_clib.lo
  CC   vppinfra/linux/mem.lo
  CC   vppinfra/linux/sysfs.lo
  CCLD libvppinfra.la
  CCLD vppapigen
  APIGEN   vnet/interface.api.h
  JSON API vlibmemory/memclnt.api.json
  APIGEN   vlibmemory/memclnt.api.h
[91m/bin/bash: line 3: 21320 Donegcc 
-I/opt/vpp-agent/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/dpdk 
-I/usr/include/dpdk -E -P -C -x c 
/opt/vpp-agent/dev/vpp/build-data/../src/vlibmemory/memclnt.api
 21321 Illegal instruction (core dumped) | ./vppapigen --input - --json 
vlibmemory/memclnt.api.json > /dev/null
[0mMakefile:8717: recipe for target 'vlibmemory/memclnt.api.json' failed
[91mmake[2]: *** [vlibmemory/memclnt.api.json] Error 132
[0m[91mmake[2]: *** Waiting for unfinished jobs
[0m[91m/bin/bash: line 3: 21324 Donegcc