Options to compile WolfSSL/cyaSSL

Asked by Aijaz on 2019-12-09

I'm compiling WolfSSL (formerly cyaSSL) for am335x based board. I am unable to configure the package (which uses autoconf based configuration)

I am using the following command line for the configuration

./configure --host=armel-none CC=arm-none-eabi-gcc AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib CFLAGS="-DWOLFSSL_USER_IO -Os" CPPFLAGS="-I./"

as mentioned in https://www.wolfssl.com/docs/wolfssl-manual/ch2/ (section 2.6.1) and I see this:

checking for armel-none-gcc... arm-none-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/aijazbaig1/Documents/CROSS_COMPILED_SCA/wolfssl':
configure: error: C compiler cannot create executables
See `config.log' for more details

contents of config.log:

  $ ./configure --host=armel-none CC=arm-none-eabi-gcc AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib CFLAGS=-DWOLFSSL_USER_IO -O3 -mcpu=cortex-a8 CPPFLAGS=-I./

## --------- ##
## Platform. ##
## --------- ##

hostname = Ab-PC
uname -m = x86_64
uname -r = 4.15.0-72-generic
uname -s = Linux
uname -v = #81~16.04.1-Ubuntu SMP Tue Nov 26 16:34:21 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /opt/gcc-arm-none-eabi-4_9-2015q3/bin
PATH: /opt/gcc-arm-none-eabi-4_9-2015q3/bin
PATH: /home/AB1/bin
PATH: /home/AB1/.local/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:3283: checking for armel-none-gcc
configure:3310: result: arm-none-eabi-gcc
configure:3579: checking for C compiler version
configure:3588: arm-none-eabi-gcc --version >&5
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3599: $? = 0
configure:3588: arm-none-eabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-native --libexecdir=/home/build/work/GCC-4-9-build/install-native/lib --infodir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu --with-gmp=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977] (GNU Tools for ARM Embedded Processors)
configure:3599: $? = 0
configure:3588: arm-none-eabi-gcc -V >&5
arm-none-eabi-gcc: error: unrecognized command line option '-V'
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3599: $? = 1
configure:3588: arm-none-eabi-gcc -qversion >&5
arm-none-eabi-gcc: error: unrecognized command line option '-qversion'
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3599: $? = 1
configure:3619: checking whether the C compiler works
configure:3641: arm-none-eabi-gcc -DWOLFSSL_USER_IO -O3 -mcpu=cortex-a8 -I./ conftest.c >&5
/opt/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x1c): undefined reference to `_exit'
collect2: error: ld returned 1 exit status
configure:3645: $? = 1
configure:3683: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "wolfssl"
| #define PACKAGE_TARNAME "wolfssl"
| #define PACKAGE_VERSION "4.2.0"
| #define PACKAGE_STRING "wolfssl 4.2.0"
| #define PACKAGE_BUGREPORT "https://github.com/wolfssl/wolfssl/issues"
| #define PACKAGE_URL "https://www.wolfssl.com"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3688: error: in `/home/AB1/Documents/CROSS_COMPILED_SCA/wolfssl':
configure:3690: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-none-eabi-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-DWOLFSSL_USER_IO -O3 -mcpu=cortex-a8'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-I./
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=armel-none
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_CC=arm-none-eabi-gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMINCLUDE=''
AMTAR=''
AM_BACKSLASH=''
AM_CCASFLAGS=''
AM_CFLAGS=''
AM_CPPFLAGS=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_LDFLAGS=''
AM_V=''
AR='arm-none-eabi-ar'
AS=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BUILD_AESCCM_FALSE=''
BUILD_AESCCM_TRUE=''
BUILD_AESGCM_FALSE=''
BUILD_AESGCM_TRUE=''
BUILD_AESNI_FALSE=''
BUILD_AESNI_TRUE=''
BUILD_AES_FALSE=''
BUILD_AES_TRUE=''
BUILD_AFALG_FALSE=''
BUILD_AFALG_TRUE=''
BUILD_ALL_FALSE=''
BUILD_ALL_TRUE=''
BUILD_ARMASM_FALSE=''
BUILD_ARMASM_TRUE=''
BUILD_ASN_FALSE=''
BUILD_ASN_TRUE=''
BUILD_ASYNCCRYPT_FALSE=''
BUILD_ASYNCCRYPT_TRUE=''
BUILD_BLAKE2S_FALSE=''
BUILD_BLAKE2S_TRUE=''
BUILD_BLAKE2_FALSE=''
BUILD_BLAKE2_TRUE=''
BUILD_CAMELLIA_FALSE=''
BUILD_CAMELLIA_TRUE=''
BUILD_CAVIUM_FALSE=''
BUILD_CAVIUM_TRUE=''
BUILD_CAVIUM_V_FALSE=''
BUILD_CAVIUM_V_TRUE=''
BUILD_CHACHA_FALSE=''
BUILD_CHACHA_TRUE=''
BUILD_CMAC_FALSE=''
BUILD_CMAC_TRUE=''
BUILD_CODING_FALSE=''
BUILD_CODING_TRUE=''
BUILD_CRL_FALSE=''
BUILD_CRL_MONITOR_FALSE=''
BUILD_CRL_MONITOR_TRUE=''
BUILD_CRL_TRUE=''
BUILD_CRYPTOAUTHLIB_FALSE=''
BUILD_CRYPTOAUTHLIB_TRUE=''
BUILD_CRYPTOCB_FALSE=''
BUILD_CRYPTOCB_TRUE=''
BUILD_CRYPTONLY_FALSE=''
BUILD_CRYPTONLY_TRUE=''
BUILD_CURVE25519_FALSE=''
BUILD_CURVE25519_SMALL_FALSE=''
BUILD_CURVE25519_SMALL_TRUE=''
BUILD_CURVE25519_TRUE=''
BUILD_DES3_FALSE=''
BUILD_DES3_TRUE=''
BUILD_DEVCRYPTO_FALSE=''
BUILD_DEVCRYPTO_TRUE=''
BUILD_DH_FALSE=''
BUILD_DH_TRUE=''
BUILD_DISTRO_FALSE=''
BUILD_DISTRO_TRUE=''
BUILD_DSA_FALSE=''
BUILD_DSA_TRUE=''
BUILD_ECC_FALSE=''
BUILD_ECC_TRUE=''
BUILD_ED25519_FALSE=''
BUILD_ED25519_SMALL_FALSE=''
BUILD_ED25519_SMALL_TRUE=''
BUILD_ED25519_TRUE=''
BUILD_EXAMPLE_CLIENTS_FALSE=''
BUILD_EXAMPLE_CLIENTS_TRUE=''
BUILD_EXAMPLE_SERVERS_FALSE=''
BUILD_EXAMPLE_SERVERS_TRUE=''
BUILD_FASTMATH_FALSE=''
BUILD_FASTMATH_TRUE=''
BUILD_FAST_RSA_FALSE=''
BUILD_FAST_RSA_TRUE=''
BUILD_FEMATH_FALSE=''
BUILD_FEMATH_TRUE=''
BUILD_FIPS_FALSE=''
BUILD_FIPS_RAND_FALSE=''
BUILD_FIPS_RAND_TRUE=''
BUILD_FIPS_TRUE=''
BUILD_FIPS_V1_FALSE=''
BUILD_FIPS_V1_TRUE=''
BUILD_FIPS_V2_FALSE=''
BUILD_FIPS_V2_TRUE=''
BUILD_GEMATH_FALSE=''
BUILD_GEMATH_TRUE=''
BUILD_HASHFLAGS_FALSE=''
BUILD_HASHFLAGS_TRUE=''
BUILD_HC128_FALSE=''
BUILD_HC128_TRUE=''
BUILD_IDEA_FALSE=''
BUILD_IDEA_TRUE=''
BUILD_INLINE_FALSE=''
BUILD_INLINE_TRUE=''
BUILD_INTELASM_FALSE=''
BUILD_INTELASM_TRUE=''
BUILD_INTEL_QA_FALSE=''
BUILD_INTEL_QA_SYNC_FALSE=''
BUILD_INTEL_QA_SYNC_TRUE=''
BUILD_INTEL_QA_TRUE=''
BUILD_IPV6_FALSE=''
BUILD_IPV6_TRUE=''
BUILD_LEANPSK_FALSE=''
BUILD_LEANPSK_TRUE=''
BUILD_LEANTLS_FALSE=''
BUILD_LEANTLS_TRUE=''
BUILD_LIBZ_FALSE=''
BUILD_LIBZ_TRUE=''
BUILD_LOWMEM_FALSE=''
BUILD_LOWMEM_TRUE=''
BUILD_MCAPI_FALSE=''
BUILD_MCAPI_TRUE=''
BUILD_MCAST_FALSE=''
BUILD_MCAST_TRUE=''
BUILD_MD2_FALSE=''
BUILD_MD2_TRUE=''
BUILD_MD4_FALSE=''
BUILD_MD4_TRUE=''
BUILD_MD5_FALSE=''
BUILD_MD5_TRUE=''
BUILD_MEMORY_FALSE=''
BUILD_MEMORY_TRUE=''
BUILD_NTRU_FALSE=''
BUILD_NTRU_TRUE=''
BUILD_OCSP_FALSE=''
BUILD_OCSP_STAPLING_FALSE=''
BUILD_OCSP_STAPLING_TRUE=''
BUILD_OCSP_STAPLING_V2_FALSE=''
BUILD_OCSP_STAPLING_V2_TRUE=''
BUILD_OCSP_TRUE=''
BUILD_OCTEON_SYNC_FALSE=''
BUILD_OCTEON_SYNC_TRUE=''
BUILD_PKCALLBACKS_FALSE=''
BUILD_PKCALLBACKS_TRUE=''
BUILD_PKCS11_FALSE=''
BUILD_PKCS11_TRUE=''
BUILD_PKCS12_FALSE=''
BUILD_PKCS12_TRUE=''
BUILD_PKCS7_FALSE=''
BUILD_PKCS7_TRUE=''
BUILD_PKI_FALSE=''
BUILD_PKI_TRUE=''
BUILD_POLY1305_FALSE=''
BUILD_POLY1305_TRUE=''
BUILD_PSK_FALSE=''
BUILD_PSK_TRUE=''
BUILD_PWDBASED_FALSE=''
BUILD_PWDBASED_TRUE=''
BUILD_RABBIT_FALSE=''
BUILD_RABBIT_TRUE=''
BUILD_RC4_FALSE=''
BUILD_RC4_TRUE=''
BUILD_RIPEMD_FALSE=''
BUILD_RIPEMD_TRUE=''
BUILD_RNG_FALSE=''
BUILD_RNG_TRUE=''
BUILD_RSA_FALSE=''
BUILD_RSA_TRUE=''
BUILD_SCRYPT_FALSE=''
BUILD_SCRYPT_TRUE=''
BUILD_SCTP_FALSE=''
BUILD_SCTP_TRUE=''
BUILD_SELFTEST_FALSE=''
BUILD_SELFTEST_TRUE=''
BUILD_SHA224_FALSE=''
BUILD_SHA224_TRUE=''
BUILD_SHA3_FALSE=''
BUILD_SHA3_TRUE=''
BUILD_SHA512_FALSE=''
BUILD_SHA512_TRUE=''
BUILD_SHA_FALSE=''
BUILD_SHA_TRUE=''
BUILD_SLOWMATH_FALSE=''
BUILD_SLOWMATH_TRUE=''
BUILD_SNIFFER_FALSE=''
BUILD_SNIFFER_TRUE=''
BUILD_SNIFFTEST_FALSE=''
BUILD_SNIFFTEST_TRUE=''
BUILD_SP_ARM32_FALSE=''
BUILD_SP_ARM32_TRUE=''
BUILD_SP_ARM64_FALSE=''
BUILD_SP_ARM64_TRUE=''
BUILD_SP_ARM_CORTEX_FALSE=''
BUILD_SP_ARM_CORTEX_TRUE=''
BUILD_SP_ARM_THUMB_FALSE=''
BUILD_SP_ARM_THUMB_TRUE=''
BUILD_SP_C_FALSE=''
BUILD_SP_C_TRUE=''
BUILD_SP_FALSE=''
BUILD_SP_INT_FALSE=''
BUILD_SP_INT_TRUE=''
BUILD_SP_TRUE=''
BUILD_SP_X86_64_FALSE=''
BUILD_SP_X86_64_TRUE=''
BUILD_SRP_FALSE=''
BUILD_SRP_TRUE=''
BUILD_TESTS_FALSE=''
BUILD_TESTS_TRUE=''
BUILD_THREADED_EXAMPLES_FALSE=''
BUILD_THREADED_EXAMPLES_TRUE=''
BUILD_TLS13_FALSE=''
BUILD_TLS13_TRUE=''
BUILD_TRUST_PEER_CERT_FALSE=''
BUILD_TRUST_PEER_CERT_TRUE=''
BUILD_USER_CRYPTO_FALSE=''
BUILD_USER_CRYPTO_TRUE=''
BUILD_USER_RSA_FALSE=''
BUILD_USER_RSA_TRUE=''
BUILD_WNR_FALSE=''
BUILD_WNR_TRUE=''
BUILD_WOLFCRYPT_TESTS_FALSE=''
BUILD_WOLFCRYPT_TESTS_TRUE=''
BUILD_WOLFEVENT_FALSE=''
BUILD_WOLFEVENT_TRUE=''
BUILD_XILINX_FALSE=''
BUILD_XILINX_TRUE=''
CC='arm-none-eabi-gcc'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS='-DWOLFSSL_USER_IO -O3 -mcpu=cortex-a8'
CFLAG_VISIBILITY=''
CPP=''
CPPFLAGS='-I./'
CYGPATH_W=''
DEBUG_FALSE=''
DEBUG_TRUE=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GENERIC_CONFIG=''
GREP=''
HAVE_OPENSSL_CMD=''
HAVE_VALGRIND=''
HAVE_VISIBILITY=''
HEX_VERSION=''
INC_AMINCLUDE=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
IPPHEADERS=''
IPPLIBS=''
IPPLINK=''
IS_VCS_CHECKOUT_FALSE=''
IS_VCS_CHECKOUT_TRUE=''
LD=''
LDFLAGS=''
LIBM=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIB_ADD=''
LIB_STATIC_ADD=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAKEINFO=''
MANIFEST_TOOL=''
MCHECK=''
MKDIR_P=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT='https://github.com/wolfssl/wolfssl/issues'
PACKAGE_NAME='wolfssl'
PACKAGE_STRING='wolfssl 4.2.0'
PACKAGE_TARNAME='wolfssl'
PACKAGE_URL='https://www.wolfssl.com'
PACKAGE_VERSION='4.2.0'
PATH_SEPARATOR=':'
PTHREAD_CC=''
PTHREAD_CFLAGS=''
PTHREAD_LIBS=''
RANLIB='arm-none-eabi-ranlib'
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
USE_VALGRIND_FALSE=''
USE_VALGRIND_TRUE=''
VERSION=''
WOLFSSL_LIBRARY_VERSION=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
ax_pthread_config=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='armel-none'
host_alias='armel-none'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "wolfssl"
#define PACKAGE_TARNAME "wolfssl"
#define PACKAGE_VERSION "4.2.0"
#define PACKAGE_STRING "wolfssl 4.2.0"
#define PACKAGE_BUGREPORT "https://github.com/wolfssl/wolfssl/issues"
#define PACKAGE_URL "https://www.wolfssl.com"

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Aijaz
Solved:
2019-12-09
Last query:
2019-12-09
Last reply:
Aijaz (aijazbaig1) said : #2

I actually went through that one but my cross compiler already IS in the path

which which arm-none-eabi-gcc gives:

/opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc

I was able to configure it just now using the following:

./configure --host=arm-non-eabi CC=arm-none-eabi-gcc AR=arm-none-eabi-ar STRIP=arm-none-eabi-strip RANLIB=arm-none-eabi-ranlib --prefix=$(CROSS_COMPILED_CA)/WolfSSL-Installation/ --enable-opensslall --enable-opensslextra CFLAGS="-mcpu=cortex-a8 --specs=nosys.specs -DHAVE_PK_CALLBACKS -DWOLFSSL_USER_IO -DNO_WRITEV" --disable-filesystem --enable-fastmath --disable-shared