Closed bistace closed 2 weeks ago
Hi @bistace, are there centos docker images available where we can recreate the problem? that would help a great deal.
It looks like an llc
from your system is being used rather than the one from the included as part of the LLVM version we are building. I'm surprised to see /usr/bin/llc
as the path.
I would expect to see that the llc
from build/libs/bin
was being used.
Can you run llc --version
and drop the output in a comment?
@chalcolith Do you have any idea how /usr/bin/llc
could end up being used?
I will try to come up with a dockerfile (there is the centos:7.9.2009 base image on dockerhub)that you can use for testing but that will take a bit of time.
Here is the output of llc --version
:
LLVM (http://llvm.org/):
LLVM version 3.4.2
Optimized build.
Built Nov 1 2018 (15:06:24).
Default target: x86_64-redhat-linux-gnu
Host CPU: x86-64
Registered Targets:
aarch64 - AArch64 (ARM 64-bit target)
arm - ARM
cpp - C++ backend
hexagon - Hexagon
mips - Mips
mips64 - Mips64 [experimental]
mips64el - Mips64el [experimental]
mipsel - Mipsel
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
sparc - Sparc
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore
There is indeed a llc
executable in build/libs/bin
, here is the output of build/libs/bin/llc --version
:
LLVM (http://llvm.org/):
LLVM version 15.0.7
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: icelake-server
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
arm - ARM
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
armeb - ARM (big endian)
riscv32 - 32-bit RISC-V
riscv64 - 64-bit RISC-V
thumb - Thumb
thumbeb - Thumb (big endian)
wasm32 - WebAssembly 32-bit
wasm64 - WebAssembly 64-bit
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
Ok so the error itself is definitely from the version of llc that is being used. The file in question is an LLVM ir file and the syntax changes from time to time. Thus the error. We are at LLVM 15 as you can.
What is unclear to me is why the external version of llc is being used. I can't see a reason in the build system for that to happen. Hopefully @chalcolith has some ideas.
I think I have a fix; @bistace can you try my branch issue_4536_llc_path
, please? Turns out that we weren't actually finding our custom llc correctly, and it's been working by accident all along.
If I understand the documentation for find_file
correctly, I think it's that HINTS
gets searched before PATH
, and then PATHS
gets searched. So if there was a system llc
, it would pick that up first, then fall back to what was in PATHS
. My PR uses HINTS
so that gets searched before PATH
.
I did a full rebuild just to be sure and yes, it works! Thanks a lot for your reactivity in solving this problem!
Awesome. Glad to hear @bistace. The fix will be merged to main soon. I'm going to close this now.
Thank you for reporting.
Merged.
Hello,
as the OS version is too old (Centos 7.9.2009) at my workplace to install the precompiled binaries of ponyc, I tried to build it from source. Here is what I did:
Everything runs fine until the
make build
command, where I encounter this error:Here are the different versions of my build tools:
Could you please help me solve this problem?