Topic: ld link failed, memory exhausted

Hi

I'm trying to do a debug version build with

./configure --enable-tlsx --enable-supportedcurves --disable-fastmath C_EXTRA_FLAGS="-DOPENSSL_EXTRA -DWOLFSSL_CALLBACKS" --enable-ocspstapling2  --enable debug and I get the error:

/usr/bin/ld: final link failed: Memory exhausted
collect2: error: ld returned 1 exit status
make[1]: *** [src/libwolfssl.la] Error 1
make[1]: Leaving directory `/home/earlence/ntp/wolfssl-3.9.0'


I'm building on Ubuntu 13.04 and this error comes only when I have the --enable-debug option. If I remove that option, it builds fine. Any idea how to sort this? I saw another post on this forum with the same error, but the solution there was to disable debugging. I do need debugging, so that is not an option

Share

Re: ld link failed, memory exhausted

Hi,

Our understanding is that the memory exhausted error is a bug in some versions of binutils. The forum post you found[1] is the most current research we have done on this issue.

From user reports, adding "-g1" to C_EXTRA_FLAGS fixes the issue on Ubuntu, ie:

./configure <options> C_EXTRA_FLAGS="-g1"

What version of binutils are you using?  You can view this by executing "ld -v" from your terminal.  Are you able to update to a newer version of binutils?  This will also solve the issue.

Thanks,
Chris

[1] https://www.wolfssl.com/forums/topic493 … -flag.html