Home/Support/Support Forum/Can't compile when switching from DEBUG to RELEASE
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Can't compile when switching from DEBUG to RELEASE

0 votes
Hi
I'm developing with the NS9215. I have all the latest updated from the package manager.
My project compiles file with DEBUG mode selected. Switching to RELEASE engages stricter checks, but one error has me baffled. I can't find the source to fix it.
...
./../libs/libc.a(malloc.o): definition of malloc
./../libs/libc.a(makebuf.o): In function `__smakebuf':
/usr2/src/xtools-3.4w/newlib/libc/stdio/makebuf.c:97: undefined reference to `isatty'
collect2: ld returned 1 exit status
make[3]: *** [blram.elf] Error 1
...

Any ideas on how to overcome this?
Hoping for a speedy reply
Dave
asked May 29 in NET+OS by davidnorman New to the Community (4 points)

Please log in or register to answer this question.

1 Answer

0 votes
Hello Dave,
Take a look at this forum thread where they are getting the same error. Have you tried compiling from command line?

https://www.digi.com/support/forum/67468/how-add-mx29lv320ebti-70gs-flash-driver-digi-esp-for-ns7520?show=67505#c67505
answered May 29 by Campbell Veteran of the Digi Community (695 points)
Hi Campbell
Thanks for your quick response. Interesting name by the way.

I've not used the command line to build my projects, I just stick with the IDE.

Anyway, I've solved the problem. It's my own fault, but I'll put it here in case it helps anyone else.

I should have included more of the error message:

Compiling ./../gnuCode.c -o
Compiling nainvalidate.c -o
Compiling ./../../../../src/bsp/customize/errhndlr.c -o
./../libs/libc.a(malloc.o): definition of malloc
./../libs/libc.a(makebuf.o): In function `__smakebuf':
/usr2/src/xtools-3.4w/newlib/libc/stdio/makebuf.c:97: undefined reference to `isatty'
collect2: ld returned 1 exit status
make[3]: *** [blram.elf] Error 1
make[3]: Target `all' not remade because of errors.
make[2]: *** [bootloader/ramImage/blram.o] Error 2
make[2]: Target `all' not remade because of errors.
make[1]: *** [mylocalall] Error 2
make[1]: Target `all' not remade because of errors.

In the lines before the error, the compiler is working on 'errhndlr.c'.
Checking this file, I see I'd popped a 'printf' command there when doing some debugging ages ago.
Removing that and the compiler was happy.

Best regards
Dave
...