-
Notifications
You must be signed in to change notification settings - Fork 258
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
[RPi / crosscompile] The C compiler "/usr/bin/cc" is not able to compile a simple test program. #501
Comments
I would guess that your $CFLAGS env variable is "polluted" with the flags that your host compiler complains about. Could you post `echo $CFLAGS`?
Also please post the toolchain file (just for curiosity).
|
The thing is my "host" compiler shouldn't kick in but the cross compiler in my buildroot. But I'm not sure if it's about the flags since version 2.0.1 builds fine for Generic / RPi / Amlogic devices but 2.0.3 fails for the ARM devices. CFLAGS: The actual flags depend on the target: |
It should, it's intended. We need the host compiler to compile a C program that generates various lookup tables. This allows to make them compile-time constant and being placed in a FlashROM, rather than generating them at runtime and putting them in RAM as we did <2.0.2. Please apply commit 15664c1 and try again. |
I mean it shouldn't use the x64 gcc of my Linux Mint host but the Linaro ARM GCC in my buildroot of my toolchain. Your patch fixed the issue for my Vim so I'll do further testing with RPi builds but the issue is probably solved. 👍 |
You don't seem to understand: The host compiler only builds the |
Well I really don't understand why it builds make_tables.exe for a unix (linux) target of the suffix is more likely for windows systems.
Also it should use GNU 8.2.0 located in my buildroot & not GNU 7.3.0 of my host system.
IMHO CMake should use something like Or is it suitable to use a x86_64 tool to generate the tables for ARM too? |
Names don't mean anything. Trust me,
Yes. Think of it as a python script that generates a bunch of numbers. Just that we don't want people to install python when having to build fluidsynth. |
I build fluidsynth cross with Openembedded - see my so called recipes at [1] (the link is WIP and will be rebased - particularly ARM-NEON patch might go). Important: make_tables (don't worry about the exe extension) is a helper tool necessary to build target fluidsynth. Hope that helps... |
I don't quite understand. ExternalProject should make sure that cmake calls your host compiler to generate a native make_tables binary so that it can be run on your host machine. Why do you need to split this? |
Am no CMake expert but build failed complaining that it cannot execute make_table binary. Seems ExternalProject does not work for me. Since this is daily business (KDE does similar at umpteen places) I did what I usually do:
Seems @5schatten build system is more clever - it tries to use host compiler. So maybe the 'dance' is not necessary for him. |
Shouldn't happen. Could you share the verbose build log on occasion? |
Well, it's not "my" build system, it's LibreELEC's. The system aims multiple arches & devices so it has to deal with a lot of different packages for each build. So I guess you can say it must be quite clever 👍 The commit 15664c1 solved the problem for me & RPi builds work fine. |
FluidSynth version
2.0.3
Current behavior
Cross compile fails for RPi targets.
Expected behavior
Should compile fine like version 2.0.1 also version 2.0.3 compiles fine for Generic x86_64 builds
Steps to reproduce
Cross compile FluidSynth 2.0.3 with a recent LibreELEC toolchain.
Other information
Log file:
https://pastebin.com/wWTD85G0
This package.mk is build by the toolchain
The text was updated successfully, but these errors were encountered: