# Building fails: undefined reference to \`\_fini'

**URL:** https://forum.amebaiot.com/t/building-fails-undefined-reference-to-fini/1770
**Category:** SDK
**Tags:** rtl8735b
**Created:** [March 25, 2023, 3:52pm UTC](https://forum.amebaiot.com/t/building-fails-undefined-reference-to-fini/1770 "2023-03-25T15:52:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Jaszczyk](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/robert_jaszczyk/32/1334_2.png) [@Robert\_Jaszczyk](https://forum.amebaiot.com/u/Robert_Jaszczyk)
#### Post date: [March 25, 2023, 3:52pm UTC](https://forum.amebaiot.com/t/building-fails-undefined-reference-to-fini/1770/1 "2023-03-25T15:52:22Z")

</div>

I am using 9.5c SDK for Ameba Pro 2. I am using 10.3.1 toolchain and all was working for 9.4. After update to 9.5c I am getting below at the end of the building:

```auto
[99%] Building C object application/CMakeFiles/application.ntz.dir/D_/RTL8735/sdk-ameba-v9.5c/project/realtek_amebapro2_v0_example/src/test_model/svm/fastlz/fastlz.c.obj
[99%] Linking CXX executable application.ntz
e:/msys2/mingw64/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: section `.ddr.bss' type changed to PROGBITS
e:/msys2/mingw64/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: e:/msys2/mingw64/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+fp/softfp\libc.a(lib_a-fini.o): in function `__libc_fini_array':
fini.c:(.text.__libc_fini_array+0x20): undefined reference to `_fini'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [application/CMakeFiles/application.ntz.dir/build.make:2418: application/application.ntz] Error 1
make[2]: *** [CMakeFiles/Makefile2:391: application/CMakeFiles/application.ntz.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:267: CMakeFiles/flash.dir/rule] Error 2
make: *** [Makefile:189: flash] Error 2

```

Any thoughts?

---

<div class="post-metadata">

### Author: ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)
#### Post date: [March 28, 2023, 3:15am UTC](https://forum.amebaiot.com/t/building-fails-undefined-reference-to-fini/1770/2 "2023-03-28T03:15:06Z")

</div>

can you provide more information on you system, what you are compiling?

Using 10.3.0 toolchain, I am unable to recreate the error. From where did you receive your 9.5c SDK?
