Hi, i tried to repro with gcc-10 on ubuntu 21.10 x86_64 and everything works fine. Only caveat is that I had to pass -Wno-stringop-overflow in CFLAGS.
— Damjan > On 10.11.2021., at 08:29, Hrishikesh Karanjikar > <hrishikesh.karanji...@gmail.com> wrote: > > Hi Damjan, > > I upgraded my Unmatched board to run Ubuntu 21.10 from 21.04. > I was able to build VPP on Unmatched. > I am also trying to build it on Qemu with GCC 10. > I am getting following error, > > ======================================================================================== > > ubuntu@ubuntu:~/work/vpp$ make build > make[1]: Entering directory '/home/ubuntu/work/vpp/build-root' > @@@@ Arch for platform 'vpp' is native @@@@ > @@@@ Finding source for external @@@@ > @@@@ Makefile fragment found in > /home/ubuntu/work/vpp/build-data/packages/external.mk <http://external.mk/> > @@@@ > @@@@ Source found in /home/ubuntu/work/vpp/build @@@@ > @@@@ Arch for platform 'vpp' is native @@@@ > @@@@ Finding source for vpp @@@@ > @@@@ Makefile fragment found in > /home/ubuntu/work/vpp/build-data/packages/vpp.mk <http://vpp.mk/> @@@@ > @@@@ Source found in /home/ubuntu/work/vpp/src @@@@ > find: ‘/home/ubuntu/work/vpp/build-root/config.site’: No such file or > directory > @@@@ Configuring external: nothing to do @@@@ > @@@@ Building external: nothing to do @@@@ > @@@@ Installing external: nothing to do @@@@ > find: ‘/home/ubuntu/work/vpp/build-root/config.site’: No such file or > directory > @@@@ Configuring vpp: nothing to do @@@@ > @@@@ Building vpp in > /home/ubuntu/work/vpp/build-root/build-vpp_debug-native/vpp @@@@ > [2/1463] Linking C executable bin/svmtool > FAILED: bin/svmtool > : && ccache /usr/lib/ccache/gcc-10 > CMakeFiles/svm/CMakeFiles/svmtool.dir/svmtool.c.o -o bin/svmtool > -Wl,-rpath,/home/ubuntu/work/vpp/build-root/build-vpp_debug-native/vpp/lib/riscv64-linux-gnu:: > lib/riscv64-linux-gnu/libsvm.so.22.02 > lib/riscv64-linux-gnu/libvppinfra.so.22.02 -lm -lrt -lpthread && : > /usr/bin/ld: lib/riscv64-linux-gnu/libvppinfra.so.22.02: undefined reference > to `__atomic_exchange_1' > collect2: error: ld returned 1 exit status > [3/1463] Linking C executable bin/svmdbtool > FAILED: bin/svmdbtool > : && ccache /usr/lib/ccache/gcc-10 > CMakeFiles/svm/CMakeFiles/svmdbtool.dir/svmdbtool.c.o -o bin/svmdbtool > -Wl,-rpath,/home/ubuntu/work/vpp/build-root/build-vpp_debug-native/vpp/lib/riscv64-linux-gnu:: > lib/riscv64-linux-gnu/libsvmdb.so.22.02 > lib/riscv64-linux-gnu/libsvm.so.22.02 > lib/riscv64-linux-gnu/libvppinfra.so.22.02 -lm -lrt -lpthread && : > /usr/bin/ld: lib/riscv64-linux-gnu/libvppinfra.so.22.02: undefined reference > to `__atomic_exchange_1' > collect2: error: ld returned 1 exit status > [5/1463] Building C object CMakeFiles/vlib/CMakeFiles/vlib_objs.dir/drop.c.o > ninja: build stopped: subcommand failed. > make[1]: *** [Makefile:693: vpp-build] Error 1 > make[1]: Leaving directory '/home/ubuntu/work/vpp/build-root' > make: *** [Makefile:356: build] Error 2 > > ======================================================================================== > Libatomic is present on my machine. > > Can you give me some pointers to resolve the same? > > Thanks, > Hrishikesh > > On Mon, Nov 8, 2021 at 8:19 PM Hrishikesh Karanjikar > <hrishikesh.karanji...@gmail.com <mailto:hrishikesh.karanji...@gmail.com>> > wrote: > Hi, > > This is great. > Thanks a lot. > Let me try that. > > Hrishikesh > > On Mon, Nov 8, 2021 at 8:00 PM Damjan Marion <dmar...@me.com > <mailto:dmar...@me.com>> wrote: > I compiled directly on the Unmatched board. I also submitted series of > patches which are fixing all > issues you are referring to. > > you can use both clang and gcc, problem with clang is that some parts of > VPP unconditionally turn address sanitiser on and there is no ASAN shared > libraries available for risc-v. > You can bypass this temporarely by commenting out test_pnat, test_vat and > test_vat2 targets. > > I also managed to cross-compile vpp on ubuntu system by using debian > multiarch libs. > > # dpkg --add-architecture riscv64 > > Update sources.list: > > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > <http://ports.ubuntu.com/ubuntu-ports/> impish main restricted universe > multiverse > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > <http://ports.ubuntu.com/ubuntu-ports/> impish-updates main restricted > universe multiverse > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > <http://ports.ubuntu.com/ubuntu-ports/> impish-backports main restricted > universe multiverse > > # apt update > > # apt install crossbuild-essential-riscv64 libssl-dev:riscv64 > uuid-dev:riscv64 libnl-3-dev:riscv6 libnl-route-3-dev:riscv64 > libbpf-dev:riscv64 > > > $ cmake \ > -DCMAKE_SYSTEM_NAME=Linux \ > -DCMAKE_SYSTEM_PROCESSOR=riscv64 \ > -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc \ > -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-gcc \ > -DCMAKE_C_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_CXX_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_ASM_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ > -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \ > -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \ > -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ > -DCMAKE_FIND_ROOT_PATH=/usr/riscv64-linux-gnu \ > -DCMAKE_INSTALL_PREFIX=/usr/local \ > -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \ > -DCMAKE_BUILD_TYPE:STRING=debug \ > -G Ninja \ > -S src \ > -B . > > $ ninja > > $ file bin/vpp > bin/vpp: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically > linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, > BuildID[sha1]=51ac741e44727379a0fbb5936acea4d7b8bdd624, for GNU/Linux 4.15.0, > with debug_info, not stripped > > And run with qemu: > > $ qemu-riscv64-static ./bin/vpp unix interactive > buffer [warn ]: numa[0] falling back to non-hugepage backed buffer pool > (vlib_physmem_shared_map_create: pmalloc_map_pages: failed to mmap 19 pages > at 0x404fc00000 fd 4 numa 0 flags 0x11: Invalid argument) > buffer [warn ]: numa[1] falling back to non-hugepage backed buffer pool > (vlib_physmem_shared_map_create: pmalloc_map_pages: failed to set mempolicy > for numa node 1: Function not implemented) > vlib_physmem_shared_map_create: pmalloc_map_pages: failed to set mempolicy > for numa node 1: Function not implementedsvm_queue_init:57: mutex_init: No > such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > vat-plug/load [error ]: vat_plugin_register: oddbuf plugin not loaded... > _______ _ _ _____ ___ > __/ __/ _ \ (_)__ | | / / _ \/ _ \ > _/ _// // / / / _ \ | |/ / ___/ ___/ > /_/ /____(_)_/\___/ |___/_/ /_/ > > DBGvpp# > > > — > Damjan > > > > > On 08.11.2021., at 14:59, Hrishikesh Karanjikar > > <hrishikesh.karanji...@gmail.com <mailto:hrishikesh.karanji...@gmail.com>> > > wrote: > > > > Hi, > > > > Thanks for this patch. I will check it out. Which compile did you use? Did > > you cross compile or locally compiled it on Qemu or any other platform? > > I was able to compile VPP using GCC10 locally on Qemu but I had to do other > > modifications. > > At many places I was able to put RiscV specific code but vector support for > > RiscV is still not available so I had to use stubs for compilation to work. > > > > Thanks, > > Hrishikesh > > > > On Mon, Nov 1, 2021 at 1:53 AM Damjan Marion <dmar...@me.com > > <mailto:dmar...@me.com>> wrote: > > > > Here it is: > > > > https://gerrit.fd.io/r/c/vpp/+/34298 <https://gerrit.fd.io/r/c/vpp/+/34298> > > > > It is early but works for me. > > > > — > > Damjan > > > > > >> On 25.10.2021., at 18:36, Hrishikesh Karanjikar > >> <hrishikesh.karanji...@gmail.com <mailto:hrishikesh.karanji...@gmail.com>> > >> wrote: > >> > >> Hi, > >> > >> Yes. SiFive HiFive boards are available. But they do not support Vector > >> Extension yet. > >> Also Qemu is ready for RiscV. Ubuntu images are available for RIscV. > >> > >> Thanks, > >> Hrishikesh > >> > >> > >> On Mon, Oct 25, 2021 at 9:56 PM Damjan Marion <dmar...@me.com > >> <mailto:dmar...@me.com>> wrote: > >> > >> > >> > >> > On 14.10.2021., at 15:43, Hrishikesh Karanjikar > >> > <hrishikesh.karanji...@gmail.com > >> > <mailto:hrishikesh.karanji...@gmail.com>> wrote: > >> > > >> > > >> > Hi, > >> > > >> > Is VPP ported for the Risc-V processor? > >> > Is there any project going for the same? > >> > > >> > >> I was looking at that a year ago but I was not able to find any suitable > >> dev board. > >> > >> Is there anything new on the market? > >> > >> — > >> Damjan > >> > >> > >> > >> -- > >> > >> Regards, > >> Hrishikesh Karanjikar > >> > >> > >> > > > > > > > > -- > > > > Regards, > > Hrishikesh Karanjikar > > > > -- > > Regards, > Hrishikesh Karanjikar > > > -- > > Regards, > Hrishikesh Karanjikar > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20487): https://lists.fd.io/g/vpp-dev/message/20487 Mute This Topic: https://lists.fd.io/mt/86312689/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-