-
-
Notifications
You must be signed in to change notification settings - Fork 701
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
Build fails on i386 #4875
Comments
Does FreeBSD's LLVM installation not support i386? Note that FreeBSD considers that platform deprecated: https://www.freebsd.org/releases/14.0R/relnotes/ FreeBSD 15.0 is not expected to include support for 32-bit platforms other than armv7. The armv6, i386, and powerpc platforms are deprecated and will be removed. 64-bit systems will still be able to run older 32-bit binaries. |
The build calls
While FreeBSD 14 and 13 are available i386 builds will be performed. This will still last for a few years. |
Odin does not call these functions on i386 necessarily, but they are referenced in the build. I think this means that the LLVM library on your system does not export the symbols and thus become "undeclared identifiers". Odin can build for different targets via the build flag Unless I'm mistaken and someone can correct me. |
The code appears to use the TargetArch_arm64 context on i386 in src/llvm_backend.cpp The i386 VM has full support for i386. |
These symbols are linked because cross-compilation exists, they are used if you |
We could check availability before enabling them, and print an error if somebody tries a |
It might be that cross-compilation is turned off in this i386 build of llvm. Other architectures might have the same options. In order to work around this problem I suggest that you add a new cmake option: ODIN_ENABLE_CROSS_COMPILATION, ON by default. When this option would be disabled Odin would not use LLVM functions for other architectures, and it would fail at the run-time with a graceful error message when users would attempt to use cross compilation options. We can adjust the value of this option in the FreeBSD port based on the architecture. |
We don't use cmake, I also don't think that's even needed. You can just ifdef it in the code right? |
There should be a way to pass build options, like in most projects.
Me? I don't have resources, I am only a port maintainer. |
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Current Behavior
Failure Logs
https://pkg-status.freebsd.org/beefy17/data/main-i386-default/p413ee6de2f09_s65c573e47c4/logs/odin-lang-2025.02.log
The text was updated successfully, but these errors were encountered: