Skip to content
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

posix_other.nim(530, 3) Error: cannot 'importc' variable at compile time` #10056

Closed
Wh1teDuke opened this issue Dec 20, 2018 · 7 comments
Closed
Labels
Nimscript VM see also `const` label

Comments

@Wh1teDuke
Copy link
Contributor

Wh1teDuke commented Dec 20, 2018

Error:
../../Nim/lib/posix/posix_other.nim(530, 3) Error: cannot 'importc' variable at compile time
I don't know where the error in my project is, but it wasn't an issue before.

Culprit: #10016

Workaround: rm config/config.nims


>nim -v
Nim Compiler Version 0.19.9 [Linux: i386]
Compiled at 2018-12-20
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 68ec42cec70496eef072c921f54a91686bb8b43b
active boot switches: -d:release
@alaviss
Copy link
Collaborator

alaviss commented Dec 20, 2018

Then I don't think anyone can reproduce it with that little information. It must have come from some module importing posix, but other than that I've no idea.

@Wh1teDuke
Copy link
Contributor Author

Wh1teDuke commented Dec 20, 2018

@alaviss I'm checking what commit introduced the error. I think is related to #9153

@Wh1teDuke
Copy link
Contributor Author

Wh1teDuke commented Dec 20, 2018

Issue introduced here #10016

@alaviss
Copy link
Collaborator

alaviss commented Dec 20, 2018

do you have any NimScript file in your project?

@Wh1teDuke
Copy link
Contributor Author

I have a .nim.cfg file named the same as the main module.

@mratsim mratsim added VM see also `const` label Regression Nimscript and removed Regression labels Dec 21, 2018
@stale
Copy link

stale bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Aug 4, 2020
@ringabout ringabout removed the stale Staled PR/issues; remove the label after fixing them label Nov 5, 2020
@timotheecour
Copy link
Member

closing this, feel free to re-open if you still have this issue.

This is most likely due to a mis-match between bootstrapping nim (csources) and what nim expects.
This should be fixed now that nim keeps track of which csources version is needed in a future proof way, see #17907 (comment) for details, which also explains how to bootstrap reliably.

(#15843 (comment) was also closed for similar reasons)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nimscript VM see also `const` label
Projects
None yet
Development

No branches or pull requests

5 participants