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

Can't find compiler package with nimscripter 1.0.21 when Nim is installed in non-standard directory #27

Open
thindil opened this issue Apr 14, 2023 · 9 comments

Comments

@thindil
Copy link

thindil commented Apr 14, 2023

Hello,

First, thank you for your work. 😄 Unfortunately, as stated above the newest version of nimscripter, 1.0.21, doesn't work when Nim, tested with version 1.6.12, is installed in a different directory, for example in /usr/local. Trying to build the first example from README.md file ends with the error: Error: cannot open file: /usr/local/compiler/nimeval.

The previous approach, with file config.nims works good, the path is set properly.

@beef331
Copy link
Owner

beef331 commented Apr 14, 2023

Does it work if you have the config.nims?

@thindil
Copy link
Author

thindil commented Apr 14, 2023

Unfortunately, no. Still the same error.

@beef331
Copy link
Owner

beef331 commented Apr 14, 2023

Well well well 1 step forward 2 steps back... where are your compiler sources located?

@thindil
Copy link
Author

thindil commented Apr 14, 2023

A standard day in the development. 😆 Binary file nim is located in /usr/local/bin, compiler source in /usr/local/lib/nim. It seems like Nim in code solves $nim to path to the binary, while everything works as expected when it is made via configuration.

I was trying to find any related issue in Nim, but without results. Probably I missed something.

@thindil
Copy link
Author

thindil commented Apr 19, 2023

Just a quick update, it seems like in the devel version of the compiler the $nim variable works as expected: in both situations it points to the directory where Nim library is.

@beef331
Copy link
Owner

beef331 commented Apr 19, 2023

Hmph, the only issue is that the fix is not back-ported, so I guess to support 1.6.x I still need that import hack I mentioned.

@thindil
Copy link
Author

thindil commented Apr 19, 2023

Or mark 1.0.20 as the last, which was working with 1.6 series. I'm not sure if it will be back-ported, everything depends on when the 2.0 version will be available.

@FedericoCeratto
Copy link

This is related to https://nim-lang.org/docs/packaging.html - the last line indicates:

The "compiler" directory contains compiler sources and should not be part of the compiler binary package

@thindil
Copy link
Author

thindil commented May 11, 2023

@FedericoCeratto it is true for Linux 😉. For example, on FreeBSD compiler package contains patches and hacks which are needed for Nim to works, like generating a documentation. The reason: many paths are hard-coded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants