This is a very specific problem, but I need help knowing where to look next to solve this, because I'm not a systems/compiler expert and so far I only observe this problem on the Solus Linux distribution.
What kind of fancy C compile flags or linking in the below scenario is missing or causing a failed executable build? Or, what tools could I use to better introspect how this is failing? Thank you so much for reading this!
Goal: Use Nim to create universal executables on Solus Linux. A HelloWorld of this working for other distros is CosmoNim. CosmoNim is really just a wrapper and collection of compiler flags to properly use the underlying C-based Cosmopolitan.
Problem: On the Solus Linux distribution, the resulting executable from CosmoNim segfaults.
Observations:
- CosmoNim is based on the underlying C-based technology Cosmopolitan
- Cosmopolitan's HelloWorld works on Solus and Ubuntu, producing a universal executable that runs okay
- Nim's wrapper for Cosmopolitan (CosmoNim) works on Ubuntu but fails on Solus, to produce a working exec
- Nim is a transpiler that generates C code, and invokes GCC, so in theory this should work out of the box as the CosmoNim author has attested for other linux distributions.
- These tests were performed using fresh VMs for Solus and Ubuntu.