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

Replace prjxray-config by static configuration #665

Open
amibranch opened this issue Oct 8, 2023 · 0 comments
Open

Replace prjxray-config by static configuration #665

amibranch opened this issue Oct 8, 2023 · 0 comments

Comments

@amibranch
Copy link

I was trying to package f4pga for arch-linux, by the following PKGBUILD: https://aur.archlinux.org/packages/f4pga-git

However, after installation, f4pga will not start, as it complains that prjxray-config cannot be found:

Traceback (most recent call last):
  File "/usr/sbin/f4pga", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/f4pga/flows/__init__.py", line 74, in main
    cmd_build(args)
  File "/usr/lib/python3.11/site-packages/f4pga/flows/commands.py", line 229, in cmd_build
    flow_cfg = make_flow_config(project_flow_cfg, part_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/f4pga/flows/commands.py", line 194, in make_flow_config
    r_env = setup_resolution_env()
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/f4pga/flows/commands.py", line 146, in setup_resolution_env
    r_env.add_values(_generate_values())
                     ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/f4pga/flows/commands.py", line 142, in _generate_values
    conf["prjxray_db"] = common_sub("prjxray-config").decode().replace("\n", "")
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/f4pga/flows/common.py", line 107, in sub
    out = run(args, capture_output=True, env=env, cwd=cwd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'prjxray-config'

It took me some time to find prjxray-config, as it remained unclear to me what this should do or to which project it belongs. However, eventually I stumbled across it in a different package.

Is it possible to replace this script entirely by, e.g. a static config that will be created during the packaging of f4pga? IMO, the path that is returned by prjxray-config should not be returned by an executable, but configured by the packager during creation of the package?

If not, could this script just be created and packaged within the wheel of f4pga to avoid such problems?

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