Closed mycroft92 closed 6 months ago
You can define GHCOPTLEVEL
to an empty string (or to -O0
in case the default is not zero). This would override the definition in bsc/src/comp/Makefile
:
GHCOPTLEVEL ?= -O2
However, the error message is for opt
which is an LLVM tool and not GHC, so I don't know if the GHC optimization level will affect the use of opt
. A web search for that error message shows that it has been caused in the past by a segfault in opt
, and I see a closed issue on GHC's repo, but the result was just to open a bug on LLVM's repo (which was later closed).
I'm surprised that you're running GHC on a raspberry pi. Are you able to successfully run GHC to compile other programs besides BSC? I would typically run BSC on a beefier system and then move the generated Verilog to where it's needed, but I'm also not familiar with raspberry pi 5.
Thanks for the reply.
Pi 5 is reasonably powerful to run GHC (with a 4GB RAM). I switched the OS to ubuntu server and the entire toolchain works (compilation included) without needing to change any customizations. You may please close this ticket.
I agree with your second comment (about moving the verilog files to pi) because the compile times are high on pi. My original intent was to have CI/CD flow on the raspberry pi with an FPGA connected to it. My current system (MacOS Sonoma) doesn't have support for Xilinx vivado.
I'm fortunately running on an old x86 Mac, so I am able to run Altera tools in a VirtualBox VM. But for ARM-based Mac, I'm not aware if an x86 emulator exists, and I'd guess it might be slow, if it does?
When compiling on raspberry-5 with raspbian OS, I get the following errors.
Here are the system details:
If the issue is optimisation flag related with
-O2
then is there a clean way I can disable optimisations and retry?Thanks in advance.