-
Notifications
You must be signed in to change notification settings - Fork 21
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
OpenXC7 #7
Comments
@ngi-nix/moss is claiming this! |
Thanks for the devshell! I still have an issue.
Then it misses the mentioned library. How can you add shared library dependencies to the devshell? |
@hansfbaier thanks for the report. We'll look into fixing that and also your question about the path for the Makefile during our next mob session on Thursday |
Yeah, seconding the thanks for the update. I wanted to look at using the upstream yosys plugins during our next mob (see: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/yosys/plugins/ghdl.nix) Without having looked closely at the locally defined builds/versions, was there a reason for packaging separately outside of upstream? |
I nead a special yosys version (0.17) as later versions trigger a non implemented feature in nextpnr-xilinx. |
Thanks for the info, I see how you selectively pulled definitions in from upstream at the correct version. We ended up meeting for shorter than expected today, hoping to have more of an update when we meet this Saturday 🙂 |
@hansfbaier how are you starting running the dev shell? We tried the following on 2 different machines and were able to load the yosys-ghdl plugin successfully
|
Yes, I also used nix develop, but on Ubuntu, not NixOS. Interesting, that is actually the main issue that nix set out to solve. I wonder why it fails on my machine. |
We'll try debugging it on ubuntu during our next session |
DISTRIB_ID=Ubuntu |
I found this with
I looked into the directory. I tlooks ok, except that libgnat does not exist there:
|
If I do
it seems to reinstall the package, but libgnat is still not there. |
@hansfbaier we tried a few different things but we are still having trouble reproducing your issue
Also that it is looking for Honestly, we're kind of at a loss at what to try next. Can you tell us your |
Thanks, sorry I can't do anything at the moment, my PC is defective and I have to figure out which part needs to be replaced. |
Hmm, got by PC up and running again. Removed flake.lock, then it downloaded and recompiled everything, but I still have the same issue. |
Ah, if I use the ghdl plugin from the same hash version as you, then it also works for me:
So the question is, how does the user find the right path to the ghdl plugin? |
@hansfbaier sorry to hear about your PC issues but I'm glad you have it running again. Could you tell us your nix version and also how you installed it? If you're available to meet on video call sometime this week for a live debugging session, that might be next best option. |
@albertchae I just got it working, by deleting flake.lock and using your hash for the yosys plugin. |
@albertchae I have to add that the culprit is probably my active nix profile. When I tried a new user it works, |
|
@albertchae No, it was not the profile, I narrowed it down: I had LD_LIBRARY_PATH set to /usr/local/lib. |
Using the ANTLR4 parser is currently quite difficult given the state of both nixpkgs and fasm. ANTLR4 is not required because the If ANTRL4 support was useful for the toolchain, my general recommendation is to 'revive' the fasm repository somehow. I'd probably recommend forking the repository, as the current upstream seems abandoned; build system fixes exist on an umerged PR, for example. We might be able to help with this, but I'd note this is likely outside of the Summer of Nix goals. |
If the warning is really annoying, I'd suggest to patch out the offending lines so we can come to a conclusion here. Indeed we can't resolve an issue as deep as dealing with an unmaintained dependency. |
@albertchae @fricklerhandwerk point taken, yes I agree. |
@albertchae There is one item left, which puzzles me. Setting environment variables seems to work in prjxray-setup-hook.sh, but not in nextpnr-setup-hook.sh. |
I also have another question: When I want to get the path of a package, I could:
but that only works inside the flake directory. |
So another item that is left, is how to get into the devshell in a CWD independent and offline manner. |
see: ngi-nix/ngipkgs#7 (comment) fasm provides two options for runtime parsing: `textx` and ANTLR4. ANTLR4 is: - not immediately in nixpkgs as a C++ runtime with compatible CMake hooks - not easily exposed in the fasm build scripts. There is an Arch Linux specific workaround on an unmerged branch. For the time being, fall back to the flower `textx` parser and patch out the runtime warning: ``` RuntimeWarning: Unable to import fast Antlr4 parser implementation. ImportError: cannot import name tags Falling back to the much slower pure Python textX based parser implementation. Getting the faster antlr parser can normally be done by installing the required dependencies and then reinstalling the fasm package with: pip uninstall pip install -v fasm warn( ``` Thanks for the tip fricklerhandwerk! Signed-off-by: Jack Leightcap <[email protected]>
Nice, yeah this is a great use of the `shellHook`.
…On Fri Oct 6, 2023 at 6:25 PM EDT, Hans Baier wrote:
Ah I found a way:
![image](https://github.com/ngi-nix/ngipkgs/assets/148607/602c9419-0fc0-404c-a5b6-49166f1ebaf2)
|
It depends exactly what you mean by 'offline', but you can force `nix build --offline`.
This of course depends on installing the dependencies at least once with network access.
As for CWD, because flakes operate over git, you can run at any place in the repository:
```bash
$ cd nix/fasm
$ nix shell .#fasm
path '/home/jleightcap/r/toolchain-nix/nix/fasm' does not contain a 'flake.nix', searching up
[***@***.***:~/r/toolchain-nix/nix/fasm]$ fasm
usage: FASM tool [-h] [--canonical] [--parser PARSER] file
FASM tool: error: the following arguments are required: file
```
Please let me know if that helps for each point.
…On Fri Oct 6, 2023 at 6:29 PM EDT, Hans Baier wrote:
So another item that is left, is how to get into the devshell in a CWD independent and offline manner.
|
Hi @hansfbaier , we're looking into your question here #7 (comment), but I wanted to ask again
If there is a package or tool missing, please let us know. |
@albertchae The shellHook in the devshell, solves #7 (comment) |
Thanks for confirming @hansfbaier ! In that case, we will close this issue for Summer of Nix tracking 🚀 Thanks again for the great collaboration For further work outside of Summer of Nix, we should continue discussion in openXC7/toolchain-nix#7 (which you've already commented on). Because that will be outside of the Summer of Nix, only volunteers who have interest in the project will be participating (so far @jleightcap and I). |
Recording for posterity, but the work for this issue is in https://github.com/openXC7/toolchain-nix The PRs were |
@albertchae can https://github.com/ngi-nix/toolchain-nix be archived? Or probably even better, if you don't care about the history, deleted? |
We have two open PRs rooted from that fork.
That work is towards upstreaming into nixpkgs, and so their usefulness is dependent on if @hansfbaier finds that effort useful. |
Okay, sorry that I missed those PRs. Then the question changes to whether the repo can be archived/deleted once both of these PRs are closed. |
No worries, that work was outside of the scope of Summer of Nix anyways, so it shouldn't reside there. I'll wait a bit more to see if they get reviewed after the ping above, and if not, I'll move that work into a personal fork and delete https://github.com/ngi-nix/toolchain-nix. |
@lorenzleutgeb please don't ever delete repos, only archive them. We can always link to a query that filters out archived repos. |
I've forked the repository into my personal account. Feel free to archive. There are still active PRs based in that repository, so please don't delete. |
Good news: I tried the latest yosys version and it seems to work well now. Will keep on testing for a while but it looks like it is time to switch. |
Free and open source FPGA toolchain for AMD/Xilinx Series 7 chips
This seems to be a non-trivial project with multiple dependencies. Break down into separate issues as needed.
The text was updated successfully, but these errors were encountered: