Topic: WolfSSL arm-none-eabi, openr.c:(.text._open_r+0x14): undefined referen

Hi,

I am trying to integrate WolfSSL in my embedded project.

I am configuring WolfSSL with these flags:

./configure --host=arm-none-eabi CC=arm-none-eabi-gcc LD=arm-none-eabi-ld AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib CFLAGS="-DNO_WOLFSSL_DIR -DWOLFSSL_USER_IO -DNO_WRITEV -mtune=cortex-m7 -mthumb -march=armv7e-m+fp.dp -specs=rdimon.specs -mfloat-abi=hard -DSTM32 -DSTM32H7 -DSTM32H743ZITx -DCPP_FREERTOS_NO_EXCEPTIONS -D__VFP_FP__ -D__FPU_PRESENT=1 -mfpu=fpv5-d16 -Wall -Wextra -fno-common -ffunction-sections -fdata-sections -fmessage-length=0 -ffreestanding -fno-builtin" CXXFLAGS="-DNO_WOLFSSL_DIR -DWOLFSSL_USER_IO -DNO_WRITEV -mtune=cortex-m7 -mthumb -march=armv7e-m+fp.dp -specs=rdimon.specs -mfloat-abi=hard -DSTM32 -DSTM32H7 -DSTM32H743ZITx -DCPP_FREERTOS_NO_EXCEPTIONS -D__VFP_FP__ -D__FPU_PRESENT=1 -mfpu=fpv5-d16 -Wall -Wextra -fno-common -ffunction-sections -fdata-sections -fmessage-length=0 -ffreestanding -fno-builtin" CPPFLAGS="-I./" CCAS=arm-none-eabi-as CCASFLAGS="-mthumb -march=armv7e-m+fp.dp -mtune=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16" LDFLAGS="-lm"

when I am compiling it in my project I get this error:

[build] /home/mua37025/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /home/mua37025/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-openr.o): in function `_open_r':
[build] openr.c:(.text._open_r+0x14): undefined reference to `_open'

That is my current sourcecode:

    /*create new WolfSSL context*/
    WOLFSSL_CTX* ctx;

    /*new WolfSSL-session*/
    WOLFSSL* ssl;

    /*wolfSSL initialisieren*/
    wolfSSL_Init();

    /*create the context with the highest possible version*/
    ctx = wolfSSL_CTX_new(wolfSSLv23_client_method());

    /*create new WolfSSL-Session*/
    ssl = wolfSSL_new(ctx);

If I uncomment ssl = wolfSSL_new(ctx);, it is working,

Can you tell me how I have to buildt wolfSSL, so that I do not get this error

Thank you for your help,

Share

Re: WolfSSL arm-none-eabi, openr.c:(.text._open_r+0x14): undefined referen

Hi AnMu5962,

Try adding "--disable-filesystem" to disable support for the file system. Cross compiling for a ARM armv7e with arm-none-eabi does not include STDIO file system support.

Thanks,
David Garske, wolfSSL

Share