MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.14k stars 19.2k forks source link

Compiling fails on linux with ENABLE_AUTO_BED_LEVELING #712

Closed tommil closed 10 years ago

tommil commented 10 years ago

When I try to compile Marlin on Raspberry (with Arduino 1.0.5) I get this error:

CC    /usr/share/arduino/hardware/arduino/cores/arduino/wiring.c
CC    /usr/share/arduino/hardware/arduino/cores/arduino/wiring_analog.c
CC    /usr/share/arduino/hardware/arduino/cores/arduino/wiring_digital.c
CC    /usr/share/arduino/hardware/arduino/cores/arduino/wiring_pulse.c
CC    /usr/share/arduino/hardware/arduino/cores/arduino/wiring_shift.c
CC    /usr/share/arduino/hardware/arduino/cores/arduino/WInterrupts.c
CXX   /usr/share/arduino/hardware/arduino/cores/arduino/WMath.cpp
CXX   /usr/share/arduino/hardware/arduino/cores/arduino/WString.cpp
CXX   /usr/share/arduino/hardware/arduino/cores/arduino/Print.cpp
CXX   Marlin_main.cpp
CXX   MarlinSerial.cpp
CXX   Sd2Card.cpp
CXX   SdBaseFile.cpp
CXX   SdFatUtil.cpp
CXX   SdFile.cpp
CXX   SdVolume.cpp
CXX   motion_control.cpp
CXX   planner.cpp
CXX   stepper.cpp
CXX   temperature.cpp
CXX   cardreader.cpp
CXX   ConfigurationStore.cpp
CXX   watchdog.cpp
CXX   /usr/share/arduino/libraries/SPI/SPI.cpp
CXX   Servo.cpp
CXX   /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp
CXX   ultralcd.cpp
CXX   /usr/share/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp
CXX   /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp
CXX   applet/Marlin.elf
applet/Marlin_main.o: In function `run_z_probe()':
Marlin_main.cpp:(.text._ZL11run_z_probev+0x30): undefined reference to `matrix_3x3::set_to_identity()'
applet/Marlin_main.o: In function `process_commands()':
Marlin_main.cpp:(.text._Z16process_commandsv+0x172): undefined reference to `matrix_3x3::set_to_identity()'
Marlin_main.cpp:(.text._Z16process_commandsv+0x770): undefined reference to `matrix_3x3::set_to_identity()'
Marlin_main.cpp:(.text._Z16process_commandsv+0xc32): undefined reference to `qr_solve(int, int, double*, double*)'
Marlin_main.cpp:(.text._Z16process_commandsv+0xd02): undefined reference to `vector_3::vector_3(float, float, float)'
Marlin_main.cpp:(.text._Z16process_commandsv+0xd10): undefined reference to `vector_3::debug(char*)'
Marlin_main.cpp:(.text._Z16process_commandsv+0xd62): undefined reference to `matrix_3x3::create_look_at(vector_3)'
Marlin_main.cpp:(.text._Z16process_commandsv+0xecc): undefined reference to `apply_rotation_xyz(matrix_3x3, float&, float&, float&)'
applet/planner.o: In function `plan_buffer_line(float, float, float, float const&, float, unsigned char const&)':
planner.cpp:(.text._Z16plan_buffer_linefffRKffRKh+0xca): undefined reference to `apply_rotation_xyz(matrix_3x3, float&, float&, float&)'
applet/planner.o: In function `plan_get_position()':
planner.cpp:(.text._Z17plan_get_positionv+0x52): undefined reference to `vector_3::vector_3(float, float, float)'
planner.cpp:(.text._Z17plan_get_positionv+0x7e): undefined reference to `matrix_3x3::transpose(matrix_3x3)'
planner.cpp:(.text._Z17plan_get_positionv+0xb4): undefined reference to `vector_3::apply_rotation(matrix_3x3)'
applet/planner.o: In function `plan_set_position(float, float, float, float const&)':
planner.cpp:(.text._Z17plan_set_positionfffRKf+0x74): undefined reference to `apply_rotation_xyz(matrix_3x3, float&, float&, float&)'
collect2: error: ld returned 1 exit status
make: *** [applet/Marlin.elf] Error 1

In windows the same code and config files compile without any problem. Also if I disable ENABLE_AUTO_BED_LEVELING code compiles in linux.

Cylindric commented 10 years ago

Sounds like a difference in the version of the Arduino IDE. I get some problems now when using older versions. What version are you using? Can you try with the latest? Also, just try again now, many changes have come through in the last month regarding bed leveling.

nothinman commented 10 years ago

show me your Makefile?

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.