Topic: Error on Make

./configure seems to work ok but when I do a make I get the following error:

jps@twud:~/Downloads/WolfSSL/wolfssl-4.4.0$ make
make -j5  all-am
make[1]: Entering directory '/home/jps/Downloads/WolfSSL/wolfssl-4.4.0'
  CC       wolfcrypt/benchmark/benchmark.o
  CC       wolfcrypt/src/src_libwolfssl_la-hmac.lo
  CC       wolfcrypt/src/src_libwolfssl_la-hash.lo
  CC       wolfcrypt/src/src_libwolfssl_la-cpuid.lo
  CC       wolfcrypt/src/src_libwolfssl_la-random.lo
  CC       wolfcrypt/src/src_libwolfssl_la-rsa.lo
  CC       wolfcrypt/src/src_libwolfssl_la-sha256.lo
  CC       wolfcrypt/src/src_libwolfssl_la-aes.lo
  CC       wolfcrypt/src/src_libwolfssl_la-sha.lo
  CC       wolfcrypt/src/src_libwolfssl_la-sha512.lo
  CC       wolfcrypt/src/src_libwolfssl_la-logging.lo
  CC       wolfcrypt/src/src_libwolfssl_la-wc_port.lo
  CC       wolfcrypt/src/src_libwolfssl_la-error.lo
  CC       wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo
  CC       wolfcrypt/src/src_libwolfssl_la-signature.lo
  CC       wolfcrypt/src/src_libwolfssl_la-wolfmath.lo
  CC       wolfcrypt/src/src_libwolfssl_la-memory.lo
  CC       wolfcrypt/src/src_libwolfssl_la-dh.lo
  CC       wolfcrypt/src/src_libwolfssl_la-coding.lo
  CC       wolfcrypt/src/src_libwolfssl_la-asn.lo
  CC       wolfcrypt/src/src_libwolfssl_la-poly1305.lo
  CC       wolfcrypt/src/src_libwolfssl_la-md5.lo
  CC       wolfcrypt/src/src_libwolfssl_la-chacha.lo
  CC       wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo
  CC       wolfcrypt/src/src_libwolfssl_la-integer.lo
  CC       wolfcrypt/src/src_libwolfssl_la-ecc.lo
  CC       src/libwolfssl_la-internal.lo
  CC       src/libwolfssl_la-wolfio.lo
  CC       src/libwolfssl_la-keys.lo
  CC       src/libwolfssl_la-ssl.lo
  CC       src/libwolfssl_la-tls.lo
  CC       wolfcrypt/test/test.o
  CC       examples/benchmark/tls_bench.o
  CC       examples/client/client.o
  CC       examples/echoclient/echoclient.o
  CC       examples/echoserver/echoserver.o
  CC       examples/server/server.o
  CC       wolfcrypt/test/testsuite_testsuite_test-test.o
  CC       examples/client/testsuite_testsuite_test-client.o
  CC       examples/echoclient/testsuite_testsuite_test-echoclient.o
  CC       examples/echoserver/testsuite_testsuite_test-echoserver.o
  CC       examples/server/testsuite_testsuite_test-server.o
  CC       testsuite/testsuite_test-testsuite.o
  CC       tests/unit_test-unit.o
  CC       tests/unit_test-api.o
  CC       tests/unit_test-suites.o
  CC       tests/unit_test-hash.o
  CC       tests/unit_test-srp.o
  CC       examples/client/tests_unit_test-client.o
  CCLD     src/libwolfssl.la
  CC       examples/server/tests_unit_test-server.o
  CCLD     examples/benchmark/tls_bench
  CCLD     wolfcrypt/test/testwolfcrypt
  CCLD     examples/client/client
  CCLD     wolfcrypt/benchmark/benchmark
  CCLD     examples/echoclient/echoclient
examples/client/client.o: In function `tcp_select_ex':
client.c:(.text+0x27e): undefined reference to `__fdelt_chk'
client.c:(.text+0x2b8): undefined reference to `__fdelt_chk'
client.c:(.text+0x2f2): undefined reference to `__fdelt_chk'
client.c:(.text+0x30a): undefined reference to `__fdelt_chk'
collect2: error: ld returned 1 exit status
  CCLD     examples/echoserver/echoserver
Makefile:3807: recipe for target 'examples/client/client' failed
make[1]: *** [examples/client/client] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/jps/Downloads/WolfSSL/wolfssl-4.4.0'
Makefile:3195: recipe for target 'all' failed
make: *** [all] Error 2
jps@twud:~/Downloads/WolfSSL/wolfssl-4.4.0$

Share

Re: Error on Make

Hi weaver4,

You need to use the `--with-sysroot=` with your ./configure. Do some google searches for "undefined reference to `__fdelt_chk'" and you'll see some tips.

For example this cross-compile for a HiFive Unleashed board running Linux:

./configure --host=riscv64 \
    CC="/home/davidgarske/GitHub/freedom-u-sdk/work/buildroot_initramfs/host/bin/riscv64-sifive-linux-gnu-gcc" \
    --with-sysroot="/home/davidgarske/GitHub/freedom-u-sdk/work/buildroot_initramfs_sysroot/" \
    --disable-shared \
    --enable-sp \
    CFLAGS="-mabi=lp64d -march=rv64imafdc"
make

You can see the use of `--with-sysroot=`.

The sysroot is required because you are cross-compiling to an ARM system running Linux. If you want to cross-compile for bare-metal.

If you want to use a custom Makefile see example here:
https://github.com/wolfSSL/wolfssl/tree … DE/GCC-ARM

Or you can use CMake with an experimental PR here:
https://github.com/wolfSSL/wolfssl/pull/2746

Thanks,
David Garske, wolfSSL

Share

Re: Error on Make

I did use --with-sysroot here is my ./configure statement:

./configure --host=arm-linux-gnueabihf --with-sysroot='/home/jps/Development/Platypus/common-deb7/rootfs_of_arm/' CC=/usr/bin/arm-linux-gnueabihf-gcc-4.7 CFLAGS="-mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mvectorize-with-neon-quad -mfpu=neon -mfloat-abi=hard -Wno-write-strings -Wno-deprecated" LDFLAGS='--sysroot=/home/jps/Development/Platypus/common-deb7/rootfs_of_arm'

One of the things I do not understand is why do I need to have both --with-sysroot and LDFLAGS='--sysroot=/home/jps/Development/Platypus/common-deb7/rootfs_of_arm' for ./configure to work.

Share