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] YHCB2004 - undefined reference to `operator delete(void*, unsigned int)' #26571

Open
1 task done
NoahJaehnert opened this issue Dec 25, 2023 · 3 comments
Open
1 task done

Comments

@NoahJaehnert
Copy link

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

Yes, and the problem still exists.

Bug Description

Pulled the latest version of Marlin Bugfix-2.1.x (bb557e5).

Upon compiling, I get the following error:

In file included from .pio/libdeps/mega2560ext/LiquidCrystal/LiquidCrystal_SR1W.cpp:48:0:
.pio/libdeps/mega2560ext/LiquidCrystal/LiquidCrystal_SR1W.h:168:1: warning: multi-line comment [-Wcomment]
 //             |    |      0.1uF            |     \
 ^
/var/folders/3h/zglp2t_141q_7sdtq0d0lf700000gn/T//ccN293xt.ltrans4.ltrans.o: In function `global destructors keyed to 65535_1_HAL.cpp.o.21605':
<artificial>:(.text.exit+0x28): undefined reference to `operator delete(void*, unsigned int)'
collect2: error: ld returned 1 exit status

Per a conversation in #support-chat on Discord, Dust confirmed "enabling #define YHCB2004 on stock ramps configs is sufficient to triggger it" and that the bug was introduced here: ec7ab5a

Also, per Dust: "that library does not like the changes in avr.ini (reverting just changes to avr.ini and it builds again)"

Bug Timeline

New bug

Expected behavior

Expect to be able to successfully compile Marlin

Actual behavior

Unable to successfully compile Marlin

Steps to Reproduce

  1. Pull (bb557e5) version of Marlin Bugfix-2.1.x
  2. Enable/Define YHCB2004 (#define YHCB2004)
  3. Compile Marlin
  4. Receive error as stated above

Version of Marlin Firmware

Marlin bugfix-2.1.x

Printer model

Geeetech A10M

Electronics

Geeetech A10M GT2560_V4.1B board with TMC2208 stepper drivers

LCD/Controller

Geeetech A10M Default (YHCB2004)

Other add-ons

No response

Bed Leveling

UBL Bilinear mesh

Your Slicer

Cura

Host Software

OctoPrint

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

@ellensp
Copy link
Contributor

ellensp commented Dec 25, 2023

YHCB2004 uses these two external libraries red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1

delete is mentioned in
https://github.com/red-scorp/LiquidCrystal_AIP31068/blob/master/LiquidCrystal_AIP31068_SPI.cpp#L58

@ellensp
Copy link
Contributor

ellensp commented Dec 26, 2023

also from https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html "The name ‘gnu++1z’ is deprecated"

‘gnu++17’
‘gnu++1z’
GNU dialect of -std=c++17. This is the default for C++ code. The name ‘gnu++1z’ is deprecated.

@ellensp
Copy link
Contributor

ellensp commented May 8, 2024

@NoahJaehnert Can you test a potential fix for me? I know it builds

update features.ini
replace
YHCB2004 = red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1

with
YHCB2004 = LiquidCrystal_AIP31068=https://github.com/ellensp/LiquidCrystal_AIP31068/archive/refs/heads/update-for-marlin.zip, red-scorp/SoftSPIB@^1.1.1

This forces marlin to use the library from my repo with my updates

Just for Information sake: The important change being
red-scorp/LiquidCrystal_AIP31068@3fc43b7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants