Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compile error when G29_RETRY_AND_RECOVER and LCD_LANGUAGE_[2345] are selected simultaneously #21819

Closed
ondrada opened this issue May 5, 2021 · 2 comments

Comments

@ondrada
Copy link
Contributor

ondrada commented May 5, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

When there are selected G29_RETRY_AND_RECOVER and LCD_LANGUAGE_2 (or more languages), compilation fails with

Compiling .pio/build/BIGTREE_E3_RRF/src/src/gcode/gcode.cpp.o In file included from Marlin/src/gcode/../inc/../core/language.h:393, from Marlin/src/gcode/../inc/MarlinConfig.h:53, from Marlin/src/gcode/gcode.h:305, from Marlin/src/gcode/gcode.cpp:28: Marlin/src/gcode/gcode.cpp: In static member function 'static void GcodeSuite::event_probe_failure()': Marlin/src/gcode/../inc/../core/multi_language.h:64:5: error: 'ui' was not declared in this scope 64 | ui.language == 0 ? GET_LANG(LCD_LANGUAGE )::MSG : \ | ^~ Marlin/src/gcode/gcode.cpp:237:12: note: in expansion of macro 'GET_TEXT' 237 | kill(GET_TEXT(MSG_LCD_PROBING_FAILED)); | ^~~~~~~~

The problem is in Marlin/src/gcode/gcode.cpp on line 237:

Macro "GET_TEXT" defined in Marlin/src/core/multi_language.h is expanded to a set of ternary operators. Those are containing conditions like ui.language == ... but in the gcode.cpp, there is no #include providing variable ui and compilation fails.

If you replace the GET_TEXT macro in gcode.cpp:237 with simple quotation marks (empty string), the compilation starts to work.

Bug Timeline

Don't know

Expected behavior

Successfull compilation with G29_RETRY_AND_RECOVER and LCD_LANGUAGE_[2345] selected simultaneously

Actual behavior

Compilation fails

Steps to Reproduce

  1. Enable auto bed leveling
  2. Set #define G29_RETRY_AND_RECOVER in Configuration_adv.h
  3. Set #define LCD_LANGUAGE_2 cz in Configuration_adv.h
  4. Set platform to one with UI8Glib display
  5. Try to compile

Version of Marlin Firmware

2.0.x bugfix

Printer model

Ender 3 Pro

Electronics

BTT E3 RRF

Add-ons

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

No response

@thisiskeithb
Copy link
Member

#21907 was merged. Closing.

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants