I’ve started working with nim and I’m running into some issues that only seem to crop up on void. I run the musl version and I haven’t yet tried it with the glibc version but I may do a fresh install on a different system when I get home to see if this happens there.
It seems some libraries aren’t properly importing when compiling. Take this code:
import times, os var start = epochTime() os.sleep(1000) echo epochTime() - start
nim comile import.nim
I get this compiler output with error:
Hint: used config file '/usr/lib/nim/config/nim.cfg' [Conf] Hint: system [Processing] Hint: import [Processing] Hint: times [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: math [Processing] Hint: algorithm [Processing] Hint: os [Processing] import.nim(4, 4) Error: undeclared identifier: 'sleep'
I run the same code through the compiler on Ubuntu 16.04 and it works. I wonder if anyone here might have any ideas on how to get nim to properly import the os modules on musl? The standard nim libraries import and work (such as times in the example). I’m guessing it’s only these os level functions that are inaccessable and the only thing I can guess to be the cause it musl.
Are there any specific things I should check? My plan now is to install glibc void on a separate machine to see what the results are there. If it works there I’d guess it is an issue in musl? I’m new to debugging things with musl so I would be happy to have some imput.
P.S. I installed nim from xbps and, once I realized I was having issues, compiled it myself as well to check that it wasn’t the binary. No difference.