Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.33k stars 5.28k forks source link

"make" failed to complete #757

Closed BlaqOps closed 5 years ago

BlaqOps commented 5 years ago

After my Raspberry Pi Model 3 B+ failed to start due to a corrupt SD card, I did a full OS reinstall. Now I'm experiencing trouble building the firmware to flash the mcu. This is the on the latest version of OctoPi. Output is as follows:

pi@octopi:~/klipper $ make
  Build Kconfig config file
  Creating symbolic link out/board
  Compiling out/src/sched.o
  Compiling out/src/command.o
  Compiling out/src/basecmd.o
  Compiling out/src/debugcmds.o
  Compiling out/src/gpiocmds.o
  Compiling out/src/stepper.o
  Compiling out/src/endstop.o
  Compiling out/src/adccmds.o
  Compiling out/src/spicmds.o
  Compiling out/src/thermocouple.o
  Compiling out/src/pwmcmds.o
  Compiling out/src/lcd_st7920.o
  Compiling out/src/lcd_hd44780.o
  Compiling out/src/buttons.o
  Compiling out/src/tmcuart.o
  Compiling out/src/avr/main.o
  Compiling out/src/avr/timer.o
  Compiling out/src/avr/gpio.o
  Compiling out/src/avr/watchdog.o
  Compiling out/src/avr/serial.o
  Compiling out/src/generic/serial_irq.o
  Building out/compile_time_request.o
Version: v0.6.0-509-g909eef3-20181008_110803-octopi
  Linking out/klipper.elf
out/src/basecmd.o: In function `command_identify':
/home/pi/klipper/src/basecmd.c:323: undefined reference to `__mulsi3'
/home/pi/klipper/src/basecmd.c:323: undefined reference to `__mulsi3'
out/src/gpiocmds.o: In function `soft_pwm_shutdown':
/home/pi/klipper/src/gpiocmds.c:241: undefined reference to `__mulsi3'
out/src/thermocouple.o: In function `thermocouple_task':
/home/pi/klipper/src/thermocouple.c:101: undefined reference to `__bswapsi2'
/home/pi/klipper/src/thermocouple.c:119: undefined reference to `__bswapsi2'
/home/pi/klipper/src/thermocouple.c:138: undefined reference to `__bswapsi2'
/usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr6/libc.a(exit.o): In function `exit':
(.text.avr-libc+0x2): undefined reference to `_exit'
collect2: error: ld returned 1 exit status
Makefile:87: recipe for target 'out/klipper.elf' failed
make: *** [out/klipper.elf] Error 1
povlhp commented 5 years ago

If you google, you will see this error is due to a missing stdlib. Example search result: https://github.com/riscv/riscv-gnu-toolchain/issues/267

Are you compiling for Beaglebone PRU ? It has the -nostdlib option in Makefile.

BlaqOps commented 5 years ago

@povlhp No, I'm trying to compile for the Trigorilla board in the Anycubic Kossel Linear Plus. It's a Atmega2560. I had a working system before the last installation became corrupted, but a much harder going this time around.

KevinOConnor commented 5 years ago

That's an odd error. Try running make clean ; make menuconfig ; make to see if the error clears. If that doesn't help, try rerunning the ./klipper/scripts/install-octopi.sh script again and then the above steps. If that doesn't help it is likely a corrupt octopi installation - try downloading the image again and reflash it to an sd card.

-Kevin

aee74 commented 3 years ago

pi@octopi:~/klipper $ make Creating symbolic link out/board Compiling out/src/sched.o make: arm-none-eabi-gcc: Command not found make: *** [Makefile:64: out/src/sched.o] Error 127

any idea on what I'm missing

kmcken commented 3 years ago

@aee74 I just got the same Error 127 for Atmega 1284p:

pi@octopi:~/klipper $ make make: avr-gcc: Command not found Compiling out/src/sched.o /bin/sh: 1: avr-gcc: not found make: *** [Makefile:64: out/src/sched.o] Error 127

What processor did you select?

ttm2112 commented 3 years ago

I have the same exact problem on Pi 4B

pi@octopi:~/klipper $ make Creating symbolic link out/board Building out/autoconf.h Compiling out/src/sched.o make: arm-none-eabi-gcc: Command not found make: *** [Makefile:64: out/src/sched.o] Error 127 pi@octopi:~/klipper $

menuconfig options

(Top) Klipper Firmware Configuration [*] Enable extra low-level configuration options Micro-controller Architecture (STMicroelectronics STM32) ---> Processor model (STM32F446) ---> Bootloader offset (32KiB bootloader) ---> Clock Reference (12 MHz crystal) ---> Communication interface (USB (on PA11/PA12)) ---> USB ids ---> Quit [ ] Specify a custom step p () GPIO pins to set at mic Save configuration? W)

                         (Y)es  (N)o  (C)ancel

And i think it has something to do with it not running the .sh part correctly.

pi@octopi:~/klipper $ ./klipper/scripts/install-octopi.sh

Running apt-get update...

Hit:1 http://archive.raspberrypi.org/debian buster InRelease Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Reading package lists... Done E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. pi@octopi:~/klipper $

I ran it again and got this

pi@octopi:~ $ ./klipper/scripts/install-octopi.sh

Running apt-get update...

[sudo] password for pi: Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB] Get:2 http://archive.raspberrypi.org/debian buster/main armhf Packages [378 kB] Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Reading package lists... Done E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. pi@octopi:~ $

I have re-imaged several times, tried Putty and Tera Term, same result. Any ideas? Thanks in advance.

One more thing. When i try to remove klipper and try again, I get this...

pi@octopi:~ $ sudo apt-get purge remove Klipper Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package remove E: Unable to locate package Klipper pi@octopi:~ $

===================== This fixed my issues. Run before getting klipper.

sudo apt update --allow-releaseinfo-change

.sh piece worked after that. Hope this helps someone out there.

Drew3164 commented 3 years ago

Any fixes on this I have the same problem?

GITRDUN75 commented 3 years ago

Same problem here. Apparently something has been changed and the old installation instructions are now out of date and missing a new step. I miss the days when your software didnt get updated automatically every other day and screw up half your system. This modern way of doing things is a mess. I thought we left DOS in the '90s, and yet here we are having to use command line operating systems again. Seems like a step backwards for the average user to me. I do appreciate the time and effort invested by the developers at their own expense.

GITRDUN75 commented 3 years ago

The above worked for me as well- "sudo apt update --allow-releaseinfo-change

.sh piece worked after that. Hope this helps someone out there."

. Thanks ttm2112

kmcken commented 3 years ago

@ttm2112 is right. For me, the problem was that I was not running ./klipper/scripts/install-octopi.sh correctly. I wrongly assumed that git clone https://github.com/KevinOConnor/klipper ./klipper/scripts/install-octopi.sh was a single line of code that wrapped to the next line in the instructions webpage.

Make sure that the .sh install works correctly, and then the rest should install properly.

CASHatFOLSOM commented 3 years ago

sudo apt update --allow-releaseinfo-change did it for me as well, thanks.

ChrisAFRcrew commented 3 years ago

I am having the same Issue and I have ran the update and still get the error

JamesMijoc commented 2 years ago

This worked for me, thank you.

maxpcuser commented 2 years ago

jesus glad i found this it was driving me nuts

LittleNyanCat commented 2 years ago

sudo apt update --allow-releaseinfo-change

This just saved me from a big headache. It should be added to the official documentation ASAP.

brokenarrow03 commented 2 years ago

I just used this thread to fix my exact issue! Thank you!

GDRPrint commented 2 years ago

I have the same exact problem on Pi 4B

pi@octopi:~/klipper $ make Creating symbolic link out/board Building out/autoconf.h Compiling out/src/sched.o make: arm-none-eabi-gcc: Command not found make: *** [Makefile:64: out/src/sched.o] Error 127 pi@octopi:~/klipper $

menuconfig options

(Top) Klipper Firmware Configuration [*] Enable extra low-level configuration options Micro-controller Architecture (STMicroelectronics STM32) ---> Processor model (STM32F446) ---> Bootloader offset (32KiB bootloader) ---> Clock Reference (12 MHz crystal) ---> Communication interface (USB (on PA11/PA12)) ---> USB ids ---> Quit [ ] Specify a custom step p () GPIO pins to set at mic Save configuration? W)

                         (Y)es  (N)o  (C)ancel

And i think it has something to do with it not running the .sh part correctly.

pi@octopi:~/klipper $ ./klipper/scripts/install-octopi.sh

Running apt-get update...

Hit:1 http://archive.raspberrypi.org/debian buster InRelease Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Reading package lists... Done E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. pi@octopi:~/klipper $

I ran it again and got this

pi@octopi:~ $ ./klipper/scripts/install-octopi.sh

Running apt-get update...

[sudo] password for pi: Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB] Get:2 http://archive.raspberrypi.org/debian buster/main armhf Packages [378 kB] Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Reading package lists... Done E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. pi@octopi:~ $

I have re-imaged several times, tried Putty and Tera Term, same result. Any ideas? Thanks in advance.

One more thing. When i try to remove klipper and try again, I get this...

pi@octopi:~ $ sudo apt-get purge remove Klipper Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package remove E: Unable to locate package Klipper pi@octopi:~ $

===================== This fixed my issues. Run before getting klipper.

sudo apt update --allow-releaseinfo-change

.sh piece worked after that. Hope this helps someone out there.

Sure helped me, thank you for posting !!

GDRPrint commented 2 years ago

Very Helpful , check this solution if you have that error msg

jordylane commented 2 years ago

Sometimes you feel like a dingus, and then later you realise there are a collection of other dinguses out there being a dingus right there with you. And that makes you feel a little less like a dingus. Thanks for easing my frustration.

Targyen commented 2 years ago

Ok, it looks like im to dumb to do this. Im not sure that i have name of my port correct because I keep gething Error 1.

pi@octo:~/klipper $ ls /dev/serial/by-id/*

/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

How should FLASH command be writen?

Sineos commented 2 years ago

How should FLASH command be writen?

Please do not simply revive some old and closed threads. Post your issue together with relevant information (klippy.log, board, printer type etc) on https://klipper.discourse.group