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

/etc/nim/nim.cfg is not read #12292

Open
asmarcz opened this issue Sep 28, 2019 · 0 comments
Open

/etc/nim/nim.cfg is not read #12292

asmarcz opened this issue Sep 28, 2019 · 0 comments

Comments

@asmarcz
Copy link

asmarcz commented Sep 28, 2019

Configuration in /etc/nim/nim.cfg file on Ubuntu 18.04 is not read and taken into account. If C compiler is set to clang, Nim compiler ignores it still uses GCC. The same setting in ~/.config/nim/nim.cfg works without problems.

Steps to reproduce

  1. Install using choosenim script curl https://nim-lang.org/choosenim/init.sh -sSf | sh
  2. Create /etc/nim/nim.cfg and make it readable to all users
  3. Modify its content to cc = clang
  4. Compile Nim file for example nim c fiddle.nim
  5. See "Command for C compiler" comment in cache folder, for example cat ~/.cache/nim/fiddle_d/fiddle.nim.c

Expected Output

/* Generated by Nim Compiler v1.0.0 */
/*   (c) 2019 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, clang */
/* Command for C compiler:
   clang -c -w  -I/home/asmar/.choosenim/toolchains/nim-1.0.0/lib -I/home/asmar/projects/nim/fiddle -o /home/asmar/.cache/nim/fiddle_d/fiddle.nim.c.o /home/asmar/.cache/nim/fiddle_d/fiddle.nim.c */
...

Additional Information

$ nim -v
Nim Compiler Version 1.0.0 [Linux: amd64]
Compiled at 2019-09-23
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: f7a8fc46c0012033917582eb740dc0343c093e35
active boot switches: -d:release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants