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

Missing mpc.h in half(?) of the toolchains #68

Open
andy-shev opened this issue Jun 2, 2024 · 2 comments
Open

Missing mpc.h in half(?) of the toolchains #68

andy-shev opened this issue Jun 2, 2024 · 2 comments

Comments

@andy-shev
Copy link

andy-shev commented Jun 2, 2024

Neither aarch64 nor powerpc64 (and I believe all flavours of them) are properly compiled / build, can't be used:

/opt/aarch64--glibc--stable-2024.02-1/bin/../lib/gcc/aarch64-buildroot-linux-gnu/12.3.0/plugin/include/builtins.h:23:10: fatal error: mpc.h: No such file or directory
  23 | #include <mpc.h>
     |          ^~~~~~~

I'm wondering how it have been tested, if tested at all...

FWIW, arm7 works good on the same kernel source tree.

@andy-shev
Copy link
Author

andy-shev commented Jun 2, 2024

FWIW, installing libmpc-dev (or analogue, depending on the distribution) "fixes" the issue, but it doesn't seem the right fix as host library headers is not what cross-compilation should use.

@tpetazzoni
Copy link
Contributor

mpc.h is not missing at all:

$ find . -name 'mpc.h'
./include/mpc.h

The problem when you build a gcc plugin is that CROSS-gcc -print-file-name=plugin will return the path to plugins, and Makefiles building plugins usually do -I$(CROSS-gcc -print-file-name=plugin)/include. But the mpc.h and gmp.h are in a different location (they have no reason to be in this directory). So what you need to do is make sure that this other location gets used when building your plugin. In the kernel, it can be done using KBUILD_HOSTCXXFLAGS=-I/path/to/toolchain/include/

I don't really see a way to make this "automagic". Do you have any idea?

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

No branches or pull requests

2 participants