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

Nim fails to find libraries on compile #22369

Closed
rivnakm opened this issue Aug 2, 2023 · 3 comments · Fixed by #24460
Closed

Nim fails to find libraries on compile #22369

rivnakm opened this issue Aug 2, 2023 · 3 comments · Fixed by #24460

Comments

@rivnakm
Copy link

rivnakm commented Aug 2, 2023

Description

Platform: aarch64, nim compiled from source.nim
Nim has been compiled and installed using the provided scripts from the source tarball.

Upon attempting to compile a program with nim the following error is produced
Error: cannot open '/usr/lib/nim/lib/system.nim'

Seems that nim is looking for libraries in /usr/lib/nim/lib and they are being installed to /usr/lib/nim.
I'm not sure which repo the install script lives in so apologies if this is in the wrong place

Nim Version

Nim Compiler Version 2.0.0 [Linux: arm64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: a488067
active boot switches: -d:release -d:danger

Current Output

No response

Expected Output

No response

Possible Solution

No response

Additional Information

Works correctly with previous release, Nim 1.6.14

@tsoj
Copy link

tsoj commented Sep 4, 2023

I have the same issue on a Raspberry Pi 2 (linux_armv7l).

A workaround is to create a symlink:

cd /usr/lib/nim
ln -s ./ ./lib

@Nuc1eoN
Copy link

Nuc1eoN commented Nov 9, 2024

In my case it is the other way around:

Error: cannot open '/usr/lib/system.nim'

but nim is installed under /usr/lib/nim/

EDIT:
It seems install.sh fails to copy over nim-2.2.0/lib/system.nim. However even after manually copying the file to the location I am getting:

Error: cannot open file: system/basic_types

EDIT2: So yeah I cannot get it to work.

Here is my install.sh config:

      bindir="$1/bin"
      configdir="$settings_target/nim"
      libdir="$1/lib/nim"
      docdir="$1/doc"
      datadir="$1/share/nim/data"
      nimbleDir="$1"

This used to work fine with nim <2.0.

@Nuc1eoN
Copy link

Nuc1eoN commented Nov 20, 2024

Related bug reports: #24385, #23197

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

Successfully merging a pull request may close this issue.

4 participants