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

WSL install, permission denied for fusesoc.conf, saved to current directory #70

Open
gojimmypi opened this issue Dec 23, 2021 · 0 comments

Comments

@gojimmypi
Copy link
Contributor

This appears to be a relative path, or perhaps even path case problem.

Yes, please don't leave the room screaming when reading about case sensitivity. lol ;)

The default directory for WSL is /mnt/c/Windows/System32 when first launching WSL on Windows 10.

When running fusesoc library add from the default directory, an error is encountered:

gojimmypi@DESKTOP(WSL): /mnt/c/Windows/System32 ()

0 $  pip install fusesoc
Requirement already satisfied: fusesoc in /home/gojimmypi/.local/lib/python3.8/site-packages (1.12.0)
Requirement already satisfied: pyparsing in /home/gojimmypi/.local/lib/python3.8/site-packages (from fusesoc) (2.4.7)
Requirement already satisfied: ipyxact>=0.2.3 in /home/gojimmypi/.local/lib/python3.8/site-packages (from fusesoc) (0.2.4)
Requirement already satisfied: simplesat>=0.8.0 in /home/gojimmypi/.local/lib/python3.8/site-packages (from fusesoc) (0.8.2)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from fusesoc) (5.3.1)
Requirement already satisfied: edalize>=0.2.3 in /home/gojimmypi/.local/lib/python3.8/site-packages (from fusesoc) (0.2.5)
Requirement already satisfied: attrs>=17.4.0 in /usr/lib/python3/dist-packages (from simplesat>=0.8.0->fusesoc) (19.3.0)Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from simplesat>=0.8.0->fusesoc) (1.14.0)
Requirement already satisfied: okonomiyaki>=0.16.6 in /home/gojimmypi/.local/lib/python3.8/site-packages (from simplesat>=0.8.0->fusesoc) (1.3.0)
Requirement already satisfied: Jinja2>=2.11.3 in /home/gojimmypi/.local/lib/python3.8/site-packages (from edalize>=0.2.3->fusesoc) (3.0.1)
Requirement already satisfied: jsonschema>=2.5.1 in /usr/lib/python3/dist-packages (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (3.2.0)
Requirement already satisfied: zipfile2>=0.0.12 in /home/gojimmypi/.local/lib/python3.8/site-packages (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (0.0.12)
Requirement already satisfied: MarkupSafe>=2.0 in /home/gojimmypi/.local/lib/python3.8/site-packages (from Jinja2>=2.11.3->edalize>=0.2.3->fusesoc) (2.0.1)
gojimmypi@DESKTOP(WSL): /mnt/c/Windows/System32 ()

0 $  fusesoc library add fusesoc_cores https://github.com/fusesoc/fusesoc-cores
WARNING: The CAPI1 core file description format is deprecated and will be removed in the next major version of FuseSoC. Please port your core files to the CAPI2 format.
Traceback (most recent call last):
  File "/home/gojimmypi/.local/bin/fusesoc", line 8, in <module>
    sys.exit(main())
  File "/home/gojimmypi/.local/lib/python3.8/site-packages/fusesoc/main.py", line 776, in main
    args.func(cm, args)
  File "/home/gojimmypi/.local/lib/python3.8/site-packages/fusesoc/main.py", line 216, in add_library
    config = Config(path="fusesoc.conf")
  File "/home/gojimmypi/.local/lib/python3.8/site-packages/fusesoc/config.py", line 39, in __init__
    with open(path, "a"):
PermissionError: [Errno 13] Permission denied: 'fusesoc.conf'
gojimmypi@DESKTOP(WSL): /mnt/c/Windows/System32 ()

0 $  sudo fusesoc library add fusesoc_cores https://github.com/fusesoc/fusesoc-cores
[sudo] password for gojimmypi:
sudo: fusesoc: command not found
gojimmypi@DESKTOP(WSL): /mnt/c/Windows/System32 ()

Note that changing to the home directory ~, resolves the permission denied problem:

0 $  cd ~
gojimmypi@DESKTOP(WSL): ~ ()

0 $  pwd
/home/gojimmypi
gojimmypi@DESKTOP(WSL): ~ ()

0 $  fusesoc library add fusesoc_cores https://github.com/fusesoc/fusesoc-cores
WARNING: The CAPI1 core file description format is deprecated and will be removed in the next major version of FuseSoC. Please port your core files to the CAPI2 format.
INFO: Cloning library into fusesoc_libraries/fusesoc_cores
Cloning into 'fusesoc_libraries/fusesoc_cores'...
remote: Enumerating objects: 670, done.
remote: Counting objects: 100% (221/221), done.
remote: Compressing objects: 100% (154/154), done.
remote: Total 670 (delta 97), reused 175 (delta 55), pack-reused 449
Receiving objects: 100% (670/670), 144.79 KiB | 1.72 MiB/s, done.
Resolving deltas: 100% (241/241), done.
gojimmypi@DESKTOP(WSL): ~ ()

The problem seems to be when processing arguments to determine the path for the config.

Note my local main.py file line 216 is actually on line 217 of the source for the config = Config(path="fusesoc.conf")

I think the problem is here in the config.py

As at that point, path just contains the text fusesoc.conf, with no path, which also explains the error: I would fully expect things to not be able to write to the Windows system32 directory.

And sure enough, looking in my home directory, there's a new fusesoc.conf file. Is that where it should be?

Probably not, as the FuseSoc Quick start clearly states to create a new directory, but not as clearly indicated in the serv prerequisites, which is where I started.

I created #69 and olofk/fusesoc#536 to help clarify for future new users.

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

1 participant