klipper icon indicating copy to clipboard operation
klipper copied to clipboard

Klipper fails to build with Apple's cpp

Open dottedmag opened this issue 2 years ago • 16 comments

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

  • MacOS 13.6 (arm64)
  • gcc is from Homebrew gcc-arm-embedded
  • Native toolchain is from Xcode 15.0.1

dottedmag avatar Dec 09 '23 11:12 dottedmag

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.

github-actions[bot] avatar Jan 13 '24 12:01 github-actions[bot]

bugs don't fix themselves.

dottedmag avatar Jan 13 '24 14:01 dottedmag

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

gooodgy avatar Jan 17 '24 04:01 gooodgy

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

dottedmag avatar Jan 17 '24 07:01 dottedmag

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.

gooodgy avatar Jan 17 '24 16:01 gooodgy

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.

dottedmag avatar Jan 17 '24 17:01 dottedmag

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

gooodgy avatar Jan 17 '24 20:01 gooodgy

No, after applying this patch.

dottedmag avatar Jan 17 '24 20:01 dottedmag

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

gooodgy avatar Jan 17 '24 21:01 gooodgy

13.2.1

dottedmag avatar Jan 17 '24 22:01 dottedmag

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

dottedmag avatar Jan 25 '24 08:01 dottedmag

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.

sxming1010 avatar Jan 25 '24 11:01 sxming1010

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.

github-actions[bot] avatar Feb 29 '24 12:02 github-actions[bot]

Bugs don't fix themselves

dottedmag avatar Feb 29 '24 13:02 dottedmag

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.

wildblue avatar Mar 03 '24 21:03 wildblue

##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.

Sineos avatar Mar 03 '24 22:03 Sineos

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.

github-actions[bot] avatar Apr 08 '24 00:04 github-actions[bot]

bugs don't fix themselves

dottedmag avatar Apr 08 '24 07:04 dottedmag

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

KevinOConnor avatar Apr 09 '24 19:04 KevinOConnor