Klipper3d / klipper

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

Klipper fails to build with Apple's cpp #6421

Closed dottedmag closed 2 months ago

dottedmag commented 6 months ago

I'm building STM32 target for Klipper on MacOS 13.6. It fails with a cryptic message:

$ make
...
  Preprocessing out/src/generic/armcm_link.ld
clang: error: no input files
make: *** [out/src/generic/armcm_link.ld] Error 1
$

Tracing the build shows the following:

$ make V=1
...
cpp -Iout/ -P -MD -MT out/src/generic/armcm_link.ld src/generic/armcm_link.lds.S -o out/src/generic/armcm_link.ld
clang: error: no input files
make: *** [out/src/generic/armcm_link.ld] Error 1
$

And indeed running this command fails:

$ cpp -Iout/ -P -MD -MT out/src/generic/armcm_link.ld src/generic/armcm_link.lds.S -o out/src/generic/armcm_link.ld
clang: error: no input files
$

This preprocessor is from Xcode:

$ cpp --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$

The preprocessor coming with GCC works:

$ make CPP=arm-none-eabi-cpp
...
  Creating hex file out/klipper.bin
$

CPP is set to cpp in Makefile, I guess changing it to $(CROSS_PREFIX)cpp is not going to break anything.

Environment

github-actions[bot] commented 5 months ago

Hello,

It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.

Best regards,

~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

dottedmag commented 5 months ago

bugs don't fix themselves.

gooodgy commented 5 months ago

Have you tried rolling back to version 10.3 of gcc? This fixed this problem for me.

dottedmag commented 5 months ago

This change has nothing to do with gcc. It is about selecting GCC's preprocessor instead of Apple-provided LLVM-derived preprocessor.

gooodgy commented 5 months ago

Well did your earlier fix do the trick? I found that downgrading to gcc 10.3 combined with your fix enabled me to solve this issue.

dottedmag commented 5 months ago

I haven't encountered any problems with GCC whatsoever. This patch is to start using GCC's cpp where LLVM's cpp is currently used.

gooodgy commented 5 months ago

So... are you still having problems or not?

dottedmag commented 5 months ago

No, after applying this patch.

gooodgy commented 5 months ago

Well that's good. Just for reference, what version of gcc do you have?

dottedmag commented 5 months ago

13.2.1

dottedmag commented 5 months ago

@sxming1010 I guess you've got the wrong issue to post this comment to.

sxming1010 commented 5 months ago

I tried to use the MPU6050 gyroscope combined with the MDXL345 to realize the exploration of controlling the fan to always be perpendicular to the tangent direction of the nozzle motion curve trajectory. Whether it is necessary to completely change the jitter compensation algorithm, I have to re-explore and edit it myself.

github-actions[bot] commented 4 months ago

Hello,

It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.

Best regards,

~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

dottedmag commented 4 months ago

Bugs don't fix themselves

wildblue commented 3 months ago

Hello, i have noticed that a comment like the following one makes Klipper unable to read the file or start up fully anymore:

Temp above 25°C

me bitching about my terrible life

I tried to notify about this in the discord App, installed it just for this case. I wanted to help this great project.

First I was told this was a user error, i was informed my commenst had been moved and realized they have been deleted. To my wondering i was blocked for an hour because i have NOT read everything in two different topics before it was displayed on my screen (laggy Internet...).

Sorry for commenting here, but i still think it is NOT an user error when using characters printed on a fully standard german keyboard layout.

I want to be able to have a discussion about that without being told i could write a PR (as end-user asking for help) to fix this because it was very unlikely to be fixed anyways.

I am fully aware of my misuse of this thread in your bugtracker and promised that i will never again be bitching like just now in your github publicly. I am deeply sorry for not being able to Just let Go with this.

Sineos commented 3 months ago

me bitching about my terrible life

I'm not sure if I understand your issue. However, I am certain that this is not the appropriate place or method to address your frustration. Please create a post on https://klipper.discourse.group, and we will work to resolve the issue. Thank you.

github-actions[bot] commented 2 months ago

Hello,

It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.

Best regards,

~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

dottedmag commented 2 months ago

bugs don't fix themselves

KevinOConnor commented 2 months ago

The Klipper github issue tracker is no longer used for any purpose. None of the active developers are reading or tracking any of the messages here. If there is an issue or something to discuss with the developers see the directions at: https://www.klipper3d.org/Contact.html

-Kevin