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

Change default target to avoid installation. #24

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

litghost
Copy link
Contributor

@litghost litghost commented Jul 6, 2020

Fixes #20

FYI @FFY00

Fixes #20

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
@litghost litghost requested a review from tmichalak July 6, 2020 18:42
Copy link
Collaborator

@tmichalak tmichalak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FFY00
Copy link

FFY00 commented Jul 6, 2020

The makefile still tries to create /usr/share/yosys/plugins during build, which should only happen in install.

make -C fasm-plugin test
make -C xdc-plugin test
make[1]: Entering directory '/build/yosys-symbiflow-plugins-git/src/yosys-symbiflow-plugins/fasm-plugin'
make[1]: Entering directory '/build/yosys-symbiflow-plugins-git/src/yosys-symbiflow-plugins/xdc-plugin'
gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -ggdb -I/usr/share/yosys/include -MD -D_YOSYS_ -fPIC -I/usr/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER -D_FORTIFY_SOURCE=2  -c -o xdc.o xdc.cc
gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -ggdb -I/usr/share/yosys/include -MD -D_YOSYS_ -fPIC -I/usr/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER -D_FORTIFY_SOURCE=2  -c -o fasm.o fasm.cc
mkdir -p /usr/share/yosys/plugins/fasm_extra_modules/
mkdir: cannot create directory ‘/usr/share/yosys/plugins’: Permission denied

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
@FFY00
Copy link

FFY00 commented Jul 6, 2020

Seems to be fixed now, thanks 😄.

However, I hit a different issue.

ERROR: Can't load module `./xdc': /usr/bin/../share/yosys/plugins/xdc.so: cannot open shared object file: No such file or directory

I tried with the latest yosys release and from git. Should I open a different issue for this?

@litghost
Copy link
Contributor Author

litghost commented Jul 6, 2020

Seems to be fixed now, thanks .

However, I hit a different issue.

ERROR: Can't load module `./xdc': /usr/bin/../share/yosys/plugins/xdc.so: cannot open shared object file: No such file or directory

I tried with the latest yosys release and from git. Should I open a different issue for this?

Can you check the permissions on that file? Is it not marked are readable for all? I'd guess that the install step isn't setting permissions correctly.

@FFY00
Copy link

FFY00 commented Jul 6, 2020

There is no file. Do I need to enable something in yosys?

This is how I'm building:
https://github.com/FFY00/symbiflow-arch-pkgs/blob/master/yosys-git/PKGBUILD#L38

GitHub
Contribute to FFY00/symbiflow-arch-pkgs development by creating an account on GitHub.

@litghost
Copy link
Contributor Author

litghost commented Jul 6, 2020

There is no file. Do I need to enable something in yosys?

This project builds those file (xdc.so and fasm.so). In order for the tests from this project to run, the plugins need to be installed to relevant yosys directory (/usr/bin/../share/yosys/plugins/). The install target in this project will put xdc.so and fasm.so in the directory specified by yosys-config.

@FFY00
Copy link

FFY00 commented Jul 6, 2020

Ah sorry. Can we make the tests run in-tree? When packaging, I can't install anything to the system.

@litghost
Copy link
Contributor Author

litghost commented Jul 6, 2020

For context, yosys supports a dynamic plugin system, and by default finds those plugins in the yosys share path. This project builds two plugins for yosys, and provides a target (install) that copies the files to the path supplied from yosys-config. In order for yosys to find them in the expected place, something needs to put them there. That can be a Makefile in the case of a development system, or some other package manager in other cases.

@FFY00
Copy link

FFY00 commented Jul 6, 2020

This make sense. Do you know if there's any to get yosys to look in other place?

@litghost
Copy link
Contributor Author

litghost commented Jul 6, 2020

This make sense. Do you know if there's any to get yosys to look in other place?

The documentation makes me wonder if an absolute path would be accepted. If an absolute path is not accepted, a yosys change would be required to support what you ask.

@FFY00
Copy link

FFY00 commented Jul 6, 2020

Anyway, this can be merged. I still have one issue, DESTDIR is not being respected.

https://www.gnu.org/prep/standards/html_node/DESTDIR.html

DESTDIR (GNU Coding Standards)

@litghost litghost merged commit 93a0107 into master Jul 6, 2020
@litghost litghost deleted the change_default_target branch July 6, 2020 22:42
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

Successfully merging this pull request may close these issues.

Build system tries to create a file on the system during the build step
3 participants