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

PATH not set on LinuxCNC RPi4 image after installing LitexCNC #74

Closed
Peter-van-Tol opened this issue Jan 15, 2024 · 2 comments
Closed
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Peter-van-Tol
Copy link
Owner

Following the documentation for installing LitexCNC / LinuxCNC on a RaspberryPi4 using the image from linuxcnc.org/downloads does not work.

Problems:

  • LitexCNC is not persisted on PATH
  • therefore the toolchain is also not on PATH, thus building fails.

Proposed solution
Modify the documentation so the PATH variable is persisted. In later stage modify source code so the relevant files are correctly written.

Caveat
The user uba100 on forum.linuxcnc.org has tried to fix this problem. He changed the PATH variable

export PATH=$PATH:~/.local/bin/:~/toolchain/oss-cad-suite/libexec/

And got the following message:

INFO:SoC:
yosys: error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory

This shared file is located within oss-cad-suite, so he changed the LD_LIBRARY_PATH to include this folder:

export LD_LIBRARY_PATH=~/toolchain/oss-cad-suite/lib/:$LD_LIBRARY_PATH

Which now results in receiving the following messages:

/home/cnc/.local/bin/python3: /home/cnc/toolchain/oss-cad-suite/lib/libm.so.6: version `GLIBC_2.35' not found (required by /home/cnc/.local/bin/python3)
/home/cnc/.local/bin/python3: /home/cnc/toolchain/oss-cad-suite/lib/libc.so.6: version `GLIBC_2.33' not found (required by /home/cnc/.local/bin/python3)
/home/cnc/.local/bin/python3: /home/cnc/toolchain/oss-cad-suite/lib/libc.so.6: version `GLIBC_2.32' not found (required by /home/cnc/.local/bin/python3)
/home/cnc/.local/bin/python3: /home/cnc/toolchain/oss-cad-suite/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/cnc/.local/bin/python3)

This most likely indicates a broken installation. Changing LD_LIBRARY_PATH is most-likely not the correct way to get the installation up-and-running.

@Peter-van-Tol Peter-van-Tol added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jan 15, 2024
@Peter-van-Tol Peter-van-Tol self-assigned this Jan 15, 2024
@Peter-van-Tol
Copy link
Owner Author

Problem is that PATH variable is not set correctly. The parameters are written to .profile, which is not read by the console when started from the GUI. I tested it headless over SSH, which means that .profile is read...

Temporary fix for the problem is to add the following lines to .bashrc

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
# set PATH so it includes oss-cad-suite
if [ -d "/home/cnc/toolchain/oss-cad-suite/bin" ] ; then
        PATH="/home/cnc/toolchain/oss-cad-suite/bin:$PATH"
fi

@Peter-van-Tol
Copy link
Owner Author

Solved in version 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant