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 GHz 128 GB 250 GB) Stanislav -----Original Message----- From: Stanislav Chlebec [mailto:[email protected]] Sent: Wednesday, May 2, 2018 9:10 AM To: Brian Brooks <[email protected]>; Ole Troan <[email protected]> Cc: [email protected] 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:[email protected]] Sent: Thursday, April 26, 2018 4:11 AM To: Ole Troan <[email protected]> Cc: Stanislav Chlebec <[email protected]>; [email protected] 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 <[email protected]> Sent: Wednesday, April 25, 2018 11:56 AM To: Brian Brooks <[email protected]> Cc: Stanislav Chlebec <[email protected]>; [email protected] 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: [email protected] <[email protected]> On Behalf Of Brian > Brooks > Sent: Friday, April 20, 2018 5:18 PM > To: Stanislav Chlebec <[email protected]>; > [email protected] > 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: [email protected] <[email protected]> On Behalf Of Stanislav > Chlebec > Sent: Friday, April 20, 2018 6:05 AM > To: [email protected] > 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:[email protected]] > Sent: Monday, April 16, 2018 7:51 PM > To: Stanislav Chlebec <[email protected]>; > [email protected] > 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: [email protected] <[email protected]> On Behalf Of Stanislav > Chlebec > Sent: Monday, April 16, 2018 2:27 AM > To: [email protected] > 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 > CPPAS vppinfra/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 Done gcc > -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 Done gcc > -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/vnet/interface.api > [0m[91m 21326 Illegal instruction (core dumped) | ./vppapigen --input > - --output vnet/interface.api.h --show-name vnet/interface.api.h > /dev/null > [0mMakefile:8711: recipe for target 'vnet/interface.api.h' failed > [91mmake[2]: *** [vnet/interface.api.h] Error 132 > [0m[91m/bin/bash: line 3: 21332 Done gcc > -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 > [0m[91m 21333 Illegal instruction (core dumped) | ./vppapigen --input > - --output vlibmemory/memclnt.api.h --show-name vlibmemory/memclnt.api.h > > /dev/null > [0mMakefile:8711: recipe for target 'vlibmemory/memclnt.api.h' failed > [91mmake[2]: *** [vlibmemory/memclnt.api.h] Error 132 > [0mmake[2]: Leaving directory > '/opt/vpp-agent/dev/vpp/build-root/build-vpp_debug-native/vpp' > Makefile:682: recipe for target 'vpp-build' failed > [91mmake[1]: *** [vpp-build] Error 2 > [0mmake[1]: Leaving directory '/opt/vpp-agent/dev/vpp/build-root' > Makefile:322: recipe for target 'build' failed > [91mmake: *** [build] Error 2 > [0m > > > } > > > Could you help me how to solve this situation? > > Thanks > > Ing. Stanislav Chlebec, Software Engineer in Test PANTHEON > technologies s.r.o. > Mlynské Nivy 56, 821 05 Bratislava > Slovakia > > MAIL / [email protected] WEB / https://pantheon.tech > > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9164): https://lists.fd.io/g/vpp-dev/message/9164 View All Messages In Topic (9): https://lists.fd.io/g/vpp-dev/topic/17425286 Mute This Topic: https://lists.fd.io/mt/17425286/21656 New Topic: https://lists.fd.io/g/vpp-dev/post Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656 Group Home: https://lists.fd.io/g/vpp-dev Contact Group Owner: [email protected] Terms of Service: https://lists.fd.io/static/tos Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub -=-=-=-=-=-=-=-=-=-=-=-
