Skip to content

Building koch from nim devel fails when config.nims importing os present #10030

@kaushalmodi

Description

I have been able to reproduce this issue on the latest Nim devel as of now ( 0409f23 ).

Steps to reproduce the issue

  1. Build koch using the csources-built nim binary as you would normally do when building Nim from devel.
  2. Create a ~/.config/nim/config.nims with just import os line.
  3. In your Nim build dir, where you build koch, do ./koch boot -d:release.

You will get something like:

km²~/downloads/:git/Nim> ./koch boot -d:release                 12/17 2:46pm
iteration: 1
compiler/nim0 c -d:release --nimcache:nimcache/r_linux_amd64 compiler/nim.nim
Hint: used config file '/home/kmodi/downloads/git/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/downloads/git/Nim/compiler/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]
../lib/system.nim(376, 50) Warning: unknown magic 'Destroy' might crash the compiler [UnknownMagic]
../lib/pure/os.nim(705, 14) Error: undeclared identifier: 'Stat'
FAILURE

An ugly workaround I use to allow Nim devel to build successfully on Travis is to temporarily remove the config.nims from Nim's search path: kaushalmodi/hello_musl@ed97b4b

/cc @nc-x, @Araq

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions