Make Error, undefined reference to `__exidx_start'

Basic Information:

Printer Model: Ender 5 Plus
MCU / Printerboard: BTT SKR-3
Host / SBC: Unbuntu server, AMD PRO A10-8770E R7
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Cannot make firmware, comes up with errors
Sorry, new to Unbuntu and Klipper.
Setup for 6 instances, four Ender 3 Pro’s and one Ender 5 Plus.
Starting with the E5+ and cannot make firmware.

sm@klippersvr:~ make make: *** No targets specified and no makefile found. Stop. sm@klippersvr:~ cd /klipper
-bash: cd: /klipper: No such file or directory
sm@klippersvr:~ cd ./klipper sm@klippersvr:~/klipper make
Compiling out/src/stm32/stm32h7.o
Building out/compile_time_request.o
Version: v0.12.0-179-g434770ea-dirty-20240513_181254-klippersvr
Linking out/klipper.elf
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-closer.o): in function `_close_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/closer.c:47:(.text+0xc): warning: _close is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-closer.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): in function `_getpid_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/signalr.c:83:(.text+0x2c): warning: _getpid is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): in function `_kill_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/signalr.c:53:(.text+0x12): warning: _kill is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-lseekr.o): in function `_lseek_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/lseekr.c:49:(.text+0x14): warning: _lseek is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-lseekr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-readr.o): in function `_read_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/readr.c:49:(.text+0x14): warning: _read is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-readr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-writer.o): in function `_write_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/writer.c:49:(.text+0x14): warning: _write is not implemented and will always fail

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-writer.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/thumb/v7e-m/nofp/libgcc.a(unwind-arm.o): in function get_eit_entry': /build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1/build/arm-none-eabi/thumb/v7e-m/nofp/libgcc/../../../../../../libgcc/unwind-arm-common.inc:366:(.text+0x134): undefined reference to __exidx_start’

/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1/build/arm-none-eabi/thumb/v7e-m/nofp/libgcc/…/…/…/…/…/…/libgcc/unwind-arm-common.inc:366:(.text+0x138): undefined reference to `__exidx_end’
collect2: error: ld returned 1 exit status
make: *** [Makefile:73: out/klipper.elf] Error 1

sm@klippersvr:~/klipper$
klippy.log (45.8 KB)

First issue is you have a modified version of the C file needed to build the firmware for your board. You need to revert to stock Klipper and try it again.

Git version: 'v0.12.0-180-g79930ed9-dirty'
Modified files: src/stm32/stm32h7.c

OK, that was installed from kiauh
Do I need to uninstall Klipper and re-install with kiauh or install Klipper from git?

I’m going to uninstall and re-install with kiauh and see what that does.

Uninstalled everything, re-installed everything using kiauh.
Same problem.

/=======================================================
| ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~ |
| Klipper Installation And Update Helper |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
=======================================================/

Initializing firmware build …
Checking for the following dependencies:

● build-essential
● dpkg-dev
● make
[✓ OK] Dependencies already met!

Building firmware …

Creating symbolic link out/board
Loaded configuration ‘/home/sm/klipper/.config’
No changes to save (for ‘/home/sm/klipper/.config’)
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/spi_software.o
Compiling out/src/i2c_software.o
Compiling out/src/thermocouple.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/sensor_lis2dw.o
Compiling out/src/sensor_ldc1612.o
Compiling out/src/sensor_bulk.o
Compiling out/src/stm32/watchdog.o
Compiling out/src/stm32/gpio.o
Compiling out/src/stm32/clockline.o
Compiling out/src/stm32/dfu_reboot.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/armcm_reset.o
Compiling out/src/…/lib/stm32h7/system_stm32h7xx.o
Compiling out/src/stm32/stm32h7.o
Compiling out/src/generic/armcm_timer.o
Compiling out/src/stm32/gpioperiph.o
Compiling out/src/stm32/stm32h7_adc.o
Compiling out/src/stm32/stm32f0_i2c.o
Compiling out/src/stm32/stm32h7_spi.o
Compiling out/src/stm32/usbotg.o
Compiling out/src/stm32/chipid.o
Compiling out/src/generic/usb_cdc.o
Compiling out/src/stm32/hard_pwm.o
Building out/compile_time_request.o
Version: v0.12.0-190-gdae8b8ca
Preprocessing out/src/generic/armcm_link.ld
Linking out/klipper.elf
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-closer.o): in function _close_r': /build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib/libc/reent/closer.c:47:(.text+0xc): warning: _close is not implemented and will always fail /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-closer.o): note: the message above does not take linker garbage collection into account /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): in function _getpid_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/signalr.c:83:(.text+0x2c): warning: _getpid is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): in function _kill_r': /build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib/libc/reent/signalr.c:53:(.text+0x12): warning: _kill is not implemented and will always fail /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-lseekr.o): in function _lseek_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/lseekr.c:49:(.text+0x14): warning: _lseek is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-lseekr.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-readr.o): in function _read_r': /build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib/libc/reent/readr.c:49:(.text+0x14): warning: _read is not implemented and will always fail /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-readr.o): note: the message above does not take linker garbage collection into account /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-writer.o): in function _write_r’:
/build/newlib-38V0JC/newlib-4.4.0.20231231/build_nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/…/…/…/…/…/…/newlib/libc/reent/writer.c:49:(.text+0x14): warning: _write is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-writer.o): note: the message above does not take linker garbage collection into account
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.2.1/thumb/v7e-m/nofp/libgcc.a(unwind-arm.o): in function get_eit_entry': /build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1/build/arm-none-eabi/thumb/v7e-m/nofp/libgcc/../../../../../../libgcc/unwind-arm-common.inc:366:(.text+0x134): undefined reference to __exidx_start’
/usr/lib/gcc/arm-none-eabi/13.2.1/…/…/…/arm-none-eabi/bin/ld: /build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1/build/arm-none-eabi/thumb/v7e-m/nofp/libgcc/…/…/…/…/…/…/libgcc/unwind-arm-common.inc:366:(.text+0x138): undefined reference to `__exidx_end’
collect2: error: ld returned 1 exit status
make: *** [Makefile:73: out/klipper.elf] Error 1
sm@klippersvr:~$

klippy.log (2.5 KB)

Do me a favor and run

arm-none-eabi-gcc --version

I think your build environment is getting confused somewhere, It’s trying to build with a bunch of different system calls it shouldn’t be.

arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009

Nothing after that? Like this…?

If not I think you’re trying to build with standard GCC which doesn’t have certain binaries needed for building for embedded systems.

Confirm for me that there is no text after your arm gcc version though first.

sm@klippersvr:~$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sm@klippersvr:~$

This in on a Lenov mini pc with AMD R7 processor

Try this…

sudo apt update
sudo apt install libnewlib-arm-none-eabi
sudo apt install binutils-arm-none-eabi
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 pkg-config

Those should have already been installed when you installed Klipper but I think you’re missing newlib at the very minimum.

After that try reflashing

sm@klippersvr:~ sudo apt update [sudo] password for sm: Hit:1 http://us.archive.ubuntu.com/ubuntu noble InRelease Get:2 http://us.archive.ubuntu.com/ubuntu noble-updates InRelease [89.7 kB] Hit:3 http://security.ubuntu.com/ubuntu noble-security InRelease Hit:4 http://us.archive.ubuntu.com/ubuntu noble-backports InRelease Get:5 http://us.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [31.7 kB] Fetched 121 kB in 1s (98.7 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. sm@klippersvr:~ sudo apt install libnewlib-arm-none-eabi
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
libnewlib-arm-none-eabi is already the newest version (4.4.0.20231231-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sm@klippersvr:~ sudo apt install binutils-arm-none-eabi Reading package lists... Done Building dependency tree... Done Reading state information... Done binutils-arm-none-eabi is already the newest version (2.42-1ubuntu1+23). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. sm@klippersvr:~ sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 pkg-configReading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package libusb-1.0
E: Couldn’t find any package by glob ‘libusb-1.0’
sm@klippersvr:~$

Same problem trying to make

Is your board the H723 of H743 version?
And will you be using CAN or USB to connect?

You’ve got a GCC discrepancy somewhere but I’m no build system expert, easier for me to just compile the firmware for you and drop it here.

Kevin or someone more knowledgeable than me might drop along and fix the core issue, but I can get you up and running before then.

Please put such (long) code snippets between Preformatted Text tags!
That keeps the posts/thread more readable and clear.

2 Likes

H743 and usb

Thanks

Here you go, Let me know if it doesn’t work for some reason.

klipper.zip (22.3 KB)

IIRC we have to use newlib v4.2 at most to compile current Klipper. I had the issue a couple days ago and had to downgrade.

OK, how do I downgrade to the 4.2 version?

It doesn’t show up on USB port
With Marlin firmware in it, it will show up by port or by ID
With the Klipper firmware it won’t show any ports or ID’s

I also have the BTT TFF50 touchscreen, it’s blank.
From what I understand it should show a menu in Marlin emulate mode from the BTT screen configuration.

It’s taking the firmware and saving it as .CUR file but acts doa. BTT had a two year old Klipper firmware on their site that acted the same. I assumed it was because the versions did not match up.

Which Ubuntu version are you using?

Generally speaking:

  • KIAUH installs all required packages to successfully compile and run Klipper on Debian-flavored Linux OS, e.g. Debian, Ubuntu, Armbian etc
  • If it does not, then something is very likely amiss on OS level
  • Personally, I would not try to continue until this is fixed. A corrupted OS can create so many reasons for the whole system to fail that a proper diagnosis is virtually impossible.