hey, buddy,
Nowadays, I'm compiling the VPP according to LSDKUG_Rev21.08 for LS1046ARDB<https://docs.nxp.com/bundle/GUID-487B2E69-BB19-42CB-AC38-7EF18C0FE3AE/page/GUID-8A75A4AD-2EB9-4A5A-A...
the steps are really simple, but, as follows I met some errors when executing the cmd "flex-builder -c vpp"
Build Env:
Host: X86 - Ubuntu 20.04
Target: LS1046ARDB
Result of "flex-builder -c vpp":
Build OpenSSL [Done]
Build dpdk [Done]
Build vpp error
==============Error logs==============
make[2]: Leaving directory '/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp'
make[2]: Entering directory '/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root'
make[2]: Leaving directory '/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root'
make[2]: Entering directory '/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root'
@@@@ Creating libdpdk.a in /home/skyler/skyler-hard-disk/1046/ls1046/build/apps/components_arm64_ubuntu_main/usr/local/lib
@@@@ Arch for platform 'dpaa' is aarch64 @@@@
@@@@ Finding source for vpp @@@@
@@@@ Makefile fragment found in /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-data/packages/vpp.mk @@@@
@@@@ Source found in /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/src @@@@
@@@@ Configuring vpp in /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp @@@@
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Cross-compiling - cache line size detection disabled
-- Performing Test compiler_flag_march_core_qdf24xx
-- Performing Test compiler_flag_march_core_qdf24xx - Success
-- Performing Test compiler_flag_march_core_octeontx2
-- Performing Test compiler_flag_march_core_octeontx2 - Success
-- Performing Test compiler_flag_march_thunderx2t99
-- Performing Test compiler_flag_march_thunderx2t99 - Success
-- Performing Test compiler_flag_march_cortexa72
-- Performing Test compiler_flag_march_cortexa72 - Success
-- Performing Test compiler_flag_march_neoversen1
-- Performing Test compiler_flag_march_neoversen1 - Success
-- Looking for ccache
-- Looking for ccache - found
fatal: not a git repository (or any parent up to mount point /home/skyler)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at CMakeLists.txt:35 (string):
string sub-command REPLACE requires at least four arguments.
-- Performing Test compiler_flag_no_address_of_packed_member
-- Performing Test compiler_flag_no_address_of_packed_member - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAVE_MEMFD_CREATE
-- Performing Test HAVE_MEMFD_CREATE - Success
-- Performing Test HAVE_GETCPU
-- Performing Test HAVE_GETCPU - Success
-- Performing Test HAVE_FCNTL64
-- Performing Test HAVE_FCNTL64 - Success
-- Found OpenSSL: /home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/local/lib/libcrypto.so (found version "1.1.1f")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/aarch64-linux-gnu-gcc
-- Looking for libuuid
-- Found uuid in /home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include
-- libbpf headers not found - af_xdp plugin disabled
-- dpdk plugin needs libdpdk.a library - found at /home/skyler/skyler-hard-disk/1046/ls1046/build/apps/components_arm64_ubuntu_main/usr/local/lib/libdpdk.a
-- Found DPDK 20.11.2 in /home/skyler/skyler-hard-disk/1046/ls1046/build/apps/components_arm64_ubuntu_main/usr/local/include CMAKE_PREFIX_PATH = /home/skyler/skyler-hard-disk/1046/ls1046/build/apps/components_arm64_ubuntu_main/usr/local
-- Marvell MUSDK not found - marvell_plugin disabled
-- -- quicly headers not found - QUIC plugin disabled
-- -- libibverbs.a library not found - rdma plugin disabled
-- -- mbedtls library not found - tlsmbedtls plugin disabled
-- Looking for SSL_set_async_callback
-- Looking for SSL_set_async_callback - not found
-- Looking for picotls
-- -- picotls not found
-- Could NOT find Python3 (missing: Interpreter)
-- Configuration:
VPP version :
VPP library version : NOTFOUND
GIT toplevel dir :
Build type : release
C flags : -Wno-address-of-packed-member -g -fPIC -march=armv8-a+crc -g -Ofast -fPIC -march=armv8-a+crc+simd+crypto -ftls-model=local-dynamic -Wno-error=unused-value -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include/aarch64-linux-gnu -mtune=cortex-A72 -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include -L/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/lib -O2 -fstack-protector -DFORTIFY_SOURCE=2 -fno-common
Linker flags (apps) : -pie
Linker flags (libs) : -L/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/lib -L/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/lib/aarch64-linux-gnu -Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 -Wl,-rpath=/usr/lib64 -Wl,-rpath=./.libs -Wl,-rpath=/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/lib
Host processor : x86_64
Target processor : aarch64
Prefix path : /home/skyler/skyler-hard-disk/1046/ls1046/build/apps/components_arm64_ubuntu_main/usr/local
Install prefix : /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/install-dpaa-aarch64/vpp
-- Configuring incomplete, errors occurred!
See also "/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeOutput.log".
See also "/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeError.log".
make[2]: *** [Makefile:644: vpp-configure] Error 1
make[2]: Leaving directory '/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root'
make[1]: *** [/home/skyler/skyler-hard-disk/1046/ls1046/packages/apps/networking/vpp.mk:13: vpp] Error 2
make[1]: Leaving directory '/home/skyler/skyler-hard-disk/1046/ls1046/packages/apps'
make: *** [Makefile:25: vpp] Error 2
make: Leaving directory '/home/skyler/skyler-hard-disk/1046/ls1046'
==============CMakeError.log==============
C compiler IPO check failed with the following output:
Change Dir: /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/_CMakeLTOTest-C/bin
Run Build Command(s):/usr/bin/ninja && [1/4] Building C object CMakeFiles/boo.dir/main.c.o
[2/4] Building C object CMakeFiles/foo.dir/foo.c.o
[3/4] Linking C static library libfoo.a
FAILED: libfoo.a
: && /usr/bin/cmake -E remove libfoo.a && "/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/bin/aarch64-linux-gnu-gcc-ar-9" cr libfoo.a CMakeFiles/foo.dir/foo.c.o && "/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/bin/aarch64-linux-gnu-gcc-ranlib-9" libfoo.a && :
/lib/ld-linux-aarch64.so.1: No such file or directory
ninja: build stopped: subcommand failed.
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_d6029 && [1/2] Building C object CMakeFiles/cmTC_d6029.dir/src.c.o
[2/2] Linking C executable cmTC_d6029
FAILED: cmTC_d6029
: && /usr/bin/aarch64-linux-gnu-gcc --sysroot=/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64 -Wno-address-of-packed-member -g -fPIC -march=armv8-a+crc -g -Ofast -fPIC -march=armv8-a+crc+simd+crypto -ftls-model=local-dynamic -Wno-error=unused-value -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include/aarch64-linux-gnu -mtune=cortex-A72 -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include -L/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/lib -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_d6029.dir/src.c.o -o cmTC_d6029 && :
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/cmTC_d6029.dir/src.c.o: in function `main':
/home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeTmp/src.c:12: undefined reference to `pthread_detach'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeTmp/src.c:13: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function SSL_set_async_callback exists failed with the following output:
Change Dir: /home/skyler/skyler-hard-disk/1046/ls1046/components/apps/networking/vpp/build-root/build-dpaa-aarch64/vpp/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_02eb9 && [1/2] Building C object CMakeFiles/cmTC_02eb9.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_02eb9
FAILED: cmTC_02eb9
: && /usr/bin/aarch64-linux-gnu-gcc --sysroot=/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64 -Wno-address-of-packed-member -g -fPIC -march=armv8-a+crc -g -Ofast -fPIC -march=armv8-a+crc+simd+crypto -ftls-model=local-dynamic -Wno-error=unused-value -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include/aarch64-linux-gnu -mtune=cortex-A72 -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/include -L/home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/lib -DCHECK_FUNCTION_EXISTS=SSL_set_async_callback CMakeFiles/cmTC_02eb9.dir/CheckFunctionExists.c.o -o cmTC_02eb9 -Wl,-rpath,/usr/local/lib /home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/local/lib/libssl.so /home/skyler/skyler-hard-disk/1046/ls1046/build/rfs/rootfs_lsdk2108_ubuntu_main_arm64/usr/local/lib/libcrypto.so && :
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/cmTC_02eb9.dir/CheckFunctionExists.c.o: in function `main':
/usr/share/cmake-3.16/Modules/CheckFunctionExists.c:17: undefined reference to `SSL_set_async_callback'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Please help to check what's wrong, any reply will be helpful.
Thanks!
Solved! Go to Solution.
hey, Oswalag
Thanks for the reply.
You are right.
I have worked out the root cause. It is just because I removed the .git in vpp folder as I wanna record some custom modify in the parent folder.
So don't remove the .git in vpp folder, everything will be ok.
Thanks.
Hello,
I couldn't reproduce your issue, It works on my side.
Please try to follow again the steps below:
To download Flexbuild Go to Downloads tab at www.nxp.com/lsdk. (I know you already have it, please download it again)
Download Layerscape Software Development Kit.
Enter log in details, accept the agreement to download the flexbuild source tarball in the name format flexbuild_lsdk2108_github.tgz, then run the commands below:
$ tar xf flexbuild_lsdk2108_github.tgz
$ cd flexbuild_lsdk2108_github
Change VPP: n to VPP: y in configs/sdk.yml
in flexbuild_lsdk2108_github run: $ source setup.env
after this you should be able to run successfully: $ flex-builder -c vpp
After this step, the debian package files deb would be available in the build/apps/components_LS_arm64/usr/local/vpp/. Then, using the merge-components this would be available in rootfs in /usr/local/vpp
(find the example in my host computer)
hey, Oswalag
Thanks for the reply.
You are right.
I have worked out the root cause. It is just because I removed the .git in vpp folder as I wanna record some custom modify in the parent folder.
So don't remove the .git in vpp folder, everything will be ok.
Thanks.