Issue : Cross compilation for ARM #3695
pallavsingh
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am getting following error with cross compiling kafka . Please let me know correct way to cross compile it for ARM
How we are including it in our project for cross compilation (Its Native company compiler)
OS : Ubuntu 20.04
include(ExternalProject)
ExternalProject_Add(OSS-Librdkafka
PREFIX OSS-Librdkafka
SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/OSS-Librdkafka"
CONFIGURE_COMMAND ./configure
--prefix=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux
--cc=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-gcc
--cxx=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-g++
--arch=aarch64
BUILD_IN_SOURCE 1
BUILD_ALWAYS 0
BUILD_COMMAND make
)
Error we are getting
Error we are getting
cd /root/30JAN/Azure-Compute-AzPubSub/src/client/external/OSS-Librdkafka && ./configure --prefix=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux --cc=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-gcc --cxx=/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-g++ --arch=aarch64
using cache file config.cache
checking for OS or distribution... ok (ubuntu)
checking for C compiler from CC env... ok
checking for C++ compiler from CXX env... ok
checking executable ld... failed (disable)
checking executable nm... ok
checking executable objdump... ok
checking executable strip... ok
checking executable libtool... failed (disable)
checking executable ranlib... ok
checking for pkgconfig (by command)... ok
checking for install (by command)... ok
checking for PIC (by compile)... failed (disable)
checking for GNU-compatible linker options... failed
checking for OSX linker options... failed
checking for GNU linker-script ld flag... failed
checking for Solaris linker-script ld flag... failed (ignore)
checking for __atomic_32 (by compile)... failed
checking for __atomic_32_lib (by compile)... failed
checking for __sync_32 (by compile)... failed (disable)
checking for __atomic_64 (by compile)... failed
checking for __atomic_64_lib (by compile)... failed
checking for __sync_64 (by compile)... failed (disable)
checking for socket (by compile)... failed
checking for socket_nsl (by compile)... failed (fail)
parsing version '0x010800ff'... ok (1.8.0)
checking for librt (by pkg-config)... failed
checking for librt (by compile)... failed
checking for libpthread (by pkg-config)... failed
checking for libpthread (by compile)... failed (fail)
checking for c11threads (by pkg-config)... failed
checking for c11threads (by compile)... failed (disable)
checking for libdl (by pkg-config)... failed
checking for libdl (by compile)... failed (disable)
checking for zlib (by pkg-config)... failed
checking for zlib (by compile)... failed (disable)
checking for libcrypto (by pkg-config)... failed
checking for libcrypto (by compile)... failed (disable)
checking for libsasl2 (by pkg-config)... failed
checking for libsasl2 (by compile)... failed (disable)
checking for libsasl (by pkg-config)... failed
checking for libsasl (by compile)... failed (disable)
checking for libzstd (by pkg-config)... failed
checking for libzstd (by compile)... failed (disable)
checking for libm (by pkg-config)... failed
checking for libm (by compile)... failed (disable)
checking for liblz4 (by pkg-config)... failed
checking for liblz4 (by compile)... failed (disable)
checking for syslog (by compile)... failed (disable)
checking for rapidjson (by compile)... failed (disable)
checking for crc32chw (by compile)... failed (disable)
checking for regex (by compile)... failed (disable)
checking for rand_r (by compile)... failed (disable)
checking for strndup (by compile)... failed (disable)
checking for strlcpy (by compile)... failed (disable)
checking for strerror_r (by compile)... failed (disable)
checking for strcasestr (by compile)... failed (disable)
checking for pthread_setname_gnu (by compile)... failed (disable)
checking for pthread_setname_darwin (by compile)... failed (disable)
checking for pthread_setname_freebsd (by compile)... failed (disable)
checking for nm (by env NM)... ok (cached)
checking for getrusage (by compile)... failed (disable)
###########################################################
Configure failed
###########################################################
Accumulated failures:
###########################################################
socket_nsl ()
module: socket
action: fail
reason:
compile check failed:
CC: CC
flags:
/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-gcc -O2 -pipe -g -feliminate-unused-debug-types -g -O2 -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wall -Werror _mkltmpDajUlj.c -o _mkltmpDajUlj.c.o -lsocket -lnsl -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now :
_mkltmpDajUlj.c:2:10: fatal error: sys/types.h: No such file or directory
2 | #include <sys/types.h>
| ^~~~~~~~~~~~~
compilation terminated.
source:
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
void foo (void) {
int s = socket(0, 0, 0);
close(s);
}
libpthread ()
module: self
action: fail
reason:
compile check failed:
CC: CC
flags: -lpthread
/opt/msft/overlake/sysroots/x86_64-msftsdk-linux/usr/bin/aarch64-msft-linux/aarch64-msft-linux-gcc -O2 -pipe -g -feliminate-unused-debug-types -g -O2 -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wall -Werror _mkltmpGs5NNy.c -o _mkltmpGs5NNy.c.o -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -lpthread:
_mkltmpGs5NNy.c:1:10: fatal error: pthread.h: No such file or directory
1 | #include <pthread.h>
| ^~~~~~~~~~~
compilation terminated.
source: #include <pthread.h>
make[2]: *** [CMakeFiles/OSS-Librdkafka.dir/build.make:110: OSS-Librdkafka/src/OSS-Librdkafka-stamp/OSS-Librdkafka-configure] Error 1
make[2]: Leaving directory '/root/30JAN/Azure-Compute-AzPubSub/src/client/OUTPUT'
make[1]: *** [CMakeFiles/Makefile2:320: CMakeFiles/OSS-Librdkafka.dir/all] Error 2
Beta Was this translation helpful? Give feedback.
All reactions