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

[Yosys][Warnings] Fixed Fatal Not Git Repo Warning #2520

Merged

Conversation

AlexandreSinger
Copy link
Contributor

Fixed a warning where "fatal: not a git repository: './/.git' was being printed during builds of VPR.

This is caused by Yosys being included as a subtree instead of a git submodule. The Makefile in Yosys is trying to get the current version of git for Yosys but it cannot do it since it is not a git repo.

Just commented out the line causing the warning for now.

Description

This was actually a very interesting warning to debug.

I started by debugging the make command without using multiple threads to see what CMake command was causing this warning:

make -d &> temp.dump

Looking into the temp.dump file, I found that the warning was being printed when generating "yosys-bin":
image
Not only that, but it was being printed twice.

I then opened up yosys' CMakeList to find this beauty:
image
It looks like all this CMake is doing is running another Makefile, twice. I should note that the "-f" argument should be set here since this is, in-fact, an "out-of-tree" build.

Looking into Yosys' Makefile, we find the culprit:
image
YOSYS_SRC is a variable that should point to the directory of the current Makefile as defined here:
image
However, since the "-f" argument was not set before, this gets initialized to "./"; hence the warning. Setting the "-f" argument does not fix the warning however, it just makes it better:
image
Obviously, we still get the same warning since this is not a git repository, since it was included into VTR as a git subtree. To fix this issue I just commented out the line causing this issue since all it was doing was failing to find the git version. Perhaps the Yosys infrastructure should be revisited if we plan to support this long term.

Related Issue

See issue #2518

Fixed a warning where "fatal: not a git repository: './/.git' was being
printed during builds of VPR.

This is caused by Yosys being included as a subtree instead of a git
submodule. The Makefile in Yosys is trying to get the current version of
git for Yosys but it cannot do it since it is not a git repo.

Just commented out the line causing the warning for now.
@github-actions github-actions bot added lang-make CMake/Make code Parmys labels Mar 29, 2024
@AlexandreSinger
Copy link
Contributor Author

@vaughnbetz I have verified that this removed the warning from the builds. Please review when you have a moment.

@vaughnbetz
Copy link
Contributor

Thanks Alex!

@vaughnbetz vaughnbetz merged commit 63675f9 into verilog-to-routing:master Mar 29, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-make CMake/Make code Parmys
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants