amaranth-farm / deca-usb2-audio-interface

Gateware for the Terasic/Arrow DECA board, to become a USB2 high speed audio interface
Other
20 stars 6 forks source link

initialize-python-environment.sh fails on usb2-highspeed-core.git #1

Closed stsrc closed 2 years ago

stsrc commented 2 years ago
kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ ./initialize-python-environment.sh 
Collecting git+https://github.com/amaranth-lang/amaranth.git (from -r requirements.txt (line 1))
  Cloning https://github.com/amaranth-lang/amaranth.git to /tmp/pip-hwd1ucqd-build
Collecting git+https://github.com/amaranth-community-unofficial/amaranth-boards.git (from -r requirements.txt (line 2))
  Cloning https://github.com/amaranth-community-unofficial/amaranth-boards.git to /tmp/pip-van05hhq-build
Collecting git+https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git (from -r requirements.txt (line 3))
  Cloning https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git to /tmp/pip-p43mpqtz-build
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/luna.egg-info
    writing pip-egg-info/luna.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/luna.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/luna.egg-info/requires.txt
    writing top-level names to pip-egg-info/luna.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/luna.egg-info/SOURCES.txt'
    error: package directory 'luna/gateware/debug' does not exist

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-p43mpqtz-build/
kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic
kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ python3 --version
Python 3.6.9

Maybe you can find solution faster than me, I think it is something with not existing luna/gateware/debug directory in usb2-highspeed-core but that's my guess.

hansfbaier commented 2 years ago

Hi, I just pushed a fix to usb2-highspeed-core. (setup.py was still referring to the debug directory which I have moved to amlib) Can you try again? (be sure to rm -rf the existing venv to start from a blank slate)

stsrc commented 2 years ago

It helped a little, but now I got:

kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ ./initialize-python-environment.sh 
Collecting git+https://github.com/amaranth-lang/amaranth.git (from -r requirements.txt (line 1))
  Cloning https://github.com/amaranth-lang/amaranth.git to /tmp/pip-w_px5xur-build
Collecting git+https://github.com/amaranth-community-unofficial/amaranth-boards.git (from -r requirements.txt (line 2))
  Cloning https://github.com/amaranth-community-unofficial/amaranth-boards.git to /tmp/pip-6ucb_zk3-build
Collecting git+https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git (from -r requirements.txt (line 3))
  Cloning https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git to /tmp/pip-r082qe9h-build
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/luna.egg-info
    writing pip-egg-info/luna.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/luna.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/luna.egg-info/requires.txt
    writing top-level names to pip-egg-info/luna.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/luna.egg-info/SOURCES.txt'
    error: package directory 'luna/gateware/interface/serdes_phy' does not exist

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-r082qe9h-build/

As far as I can see luna/gateware/interface/serdes_phy also is not present.

hansfbaier commented 2 years ago

Sorry, I should have removed other deleted parts also from the setup file. Can you try again now?

stsrc commented 2 years ago

I tried again and I had to update ubuntu to 20.04 because of python3 version:

kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

and I had to call pip install construct on my own, because without it I had strange error:

kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ rm -rf venv/
kgotfryd@kgotfryd:~/programming/packages/deca-usb2-audio-interface/gateware$ ./initialize-python-environment.sh 
Collecting git+https://github.com/amaranth-lang/amaranth.git (from -r requirements.txt (line 1))
  Cloning https://github.com/amaranth-lang/amaranth.git to /tmp/pip-req-build-hw54sw2u
  Running command git clone -q https://github.com/amaranth-lang/amaranth.git /tmp/pip-req-build-hw54sw2u
Collecting git+https://github.com/amaranth-community-unofficial/amaranth-boards.git (from -r requirements.txt (line 2))
  Cloning https://github.com/amaranth-community-unofficial/amaranth-boards.git to /tmp/pip-req-build-26cxigfk
  Running command git clone -q https://github.com/amaranth-community-unofficial/amaranth-boards.git /tmp/pip-req-build-26cxigfk
Collecting git+https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git (from -r requirements.txt (line 3))
  Cloning https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git to /tmp/pip-req-build-save40ry
  Running command git clone -q https://github.com/amaranth-community-unofficial/usb2-highspeed-core.git /tmp/pip-req-build-save40ry
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting git+https://github.com/amaranth-community-unofficial/amlib.git (from -r requirements.txt (line 4))
  Cloning https://github.com/amaranth-community-unofficial/amlib.git to /tmp/pip-req-build-a7enk4xl
  Running command git clone -q https://github.com/amaranth-community-unofficial/amlib.git /tmp/pip-req-build-a7enk4xl
Collecting Jinja2~=2.11
  Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting pyvcd~=0.2.2
  Using cached pyvcd-0.2.4-py2.py3-none-any.whl (17 kB)
Collecting importlib_resources
  Using cached importlib_resources-5.4.0-py3-none-any.whl (28 kB)
Collecting amlib@ git+https://github.com/amaranth-community-unofficial/amlib@main
  Cloning https://github.com/amaranth-community-unofficial/amlib (to revision main) to /tmp/pip-install-3nlojnv6/amlib
  Running command git clone -q https://github.com/amaranth-community-unofficial/amlib /tmp/pip-install-3nlojnv6/amlib
Collecting pyusb<2.0.0,>=1.1.1
  Using cached pyusb-1.2.1-py3-none-any.whl (58 kB)
Collecting amaranth-soc@ git+https://github.com/amaranth-lang/amaranth-soc.git@main
  Cloning https://github.com/amaranth-lang/amaranth-soc.git (to revision main) to /tmp/pip-install-3nlojnv6/amaranth-soc
  Running command git clone -q https://github.com/amaranth-lang/amaranth-soc.git /tmp/pip-install-3nlojnv6/amaranth-soc
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting ziglang<0.9.0,>=0.8.0
  Using cached ziglang-0.8.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (68.1 MB)
Collecting usb-descriptors@ git+git://github.com/hansfbaier/python-usb-descriptors.git@master
  Cloning git://github.com/hansfbaier/python-usb-descriptors.git (to revision master) to /tmp/pip-install-3nlojnv6/usb-descriptors
  Running command git clone -q git://github.com/hansfbaier/python-usb-descriptors.git /tmp/pip-install-3nlojnv6/usb-descriptors
Collecting apollo-fpga<0.0.6,>=0.0.5
  Using cached apollo_fpga-0.0.5-py3-none-any.whl (45 kB)
Collecting libusb1<2.0.0,>=1.9.2
  Using cached libusb1-1.9.3-py3-none-any.whl (60 kB)
Collecting pyserial<4.0,>=3.5
  Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting amaranth-stdio
  Using cached amaranth_stdio-0-py3-none-any.whl (1.1 kB)
Collecting scipy
  Using cached scipy-1.7.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.3 MB)
Collecting MarkupSafe>=0.23
  Using cached MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl (30 kB)
Collecting zipp>=3.1.0; python_version < "3.10"
  Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB)
Collecting construct
  Using cached construct-2.10.67.tar.gz (57 kB)
Collecting numpy<1.23.0,>=1.16.5
  Using cached numpy-1.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Building wheels for collected packages: amaranth, amaranth-boards, luna, amlib, amaranth-soc, usb-descriptors, construct
  Building wheel for amaranth (setup.py) ... done
  Created wheel for amaranth: filename=amaranth-0.4.dev4+g7d611b8-py3-none-any.whl size=168124 sha256=f5d2059967ce24962f2072a188a10fab1f6f8d81583cab0fd0219bb2a6a629b1
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/f5/ec/b5/de047ad2fb0cfc858c61fa61b12b428f76c5b969379f8ec104
  Building wheel for amaranth-boards (setup.py) ... done
  Created wheel for amaranth-boards: filename=amaranth_boards-0.1.dev236+g809587c-py3-none-any.whl size=132329 sha256=897881529488c4859261a416c9dd2ab247db840870ba1cfc548739488de3acb4
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/30/4d/26/e2ea5443ae47704d080f565e6ffd1366b85cc3d3002ae90571
  Building wheel for luna (PEP 517) ... done
  Created wheel for luna: filename=luna-0.1.0.dev0-py3-none-any.whl size=267992 sha256=19420e381cef450af724eb95431b1b2c42d6018ee12bce05871d858cd5bd69ef
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/71/bf/6e/df6e798cfbd6c05c75a00d43ab3f677545bd1e9f96a963342a
  Building wheel for amlib (setup.py) ... done
  Created wheel for amlib: filename=amlib-0.1.dev122+g820e825-py3-none-any.whl size=107196 sha256=e319dcf83bf2bc2162825aadc761fa5722b9a9675215bb2e7ba45c291f9a5a9a
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/83/59/42/53c029d6a2e7421e318c124efcf89eb020cfd98edd3e83fbc2
  Building wheel for amaranth-soc (PEP 517) ... done
  Created wheel for amaranth-soc: filename=amaranth_soc-0.1.dev49+g217d4ea-py3-none-any.whl size=38208 sha256=e445f7926836999c6362cbe507b01a1e4935b5ee0db13c53cb38b81c2c8835c3
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/40/80/b3/8c2f6901f59e3123cbe5df5954645eb4e64d04bc07f8aa1d11
  Building wheel for usb-descriptors (setup.py) ... done
  Created wheel for usb-descriptors: filename=usb_descriptors-0.0-py3-none-any.whl size=48951 sha256=66a20882a9828db897c8c2eeedb27ad1d978dc1f5853ab64831581e4eb64de3c
  Stored in directory: /tmp/pip-ephem-wheel-cache-1os3nuif/wheels/46/ac/65/bc353584683e03c9ab7dc07014770f5bfb3c5bccac8311248c
  Building wheel for construct (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/kgotfryd/programming/packages/deca-usb2-audio-interface/gateware/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3nlojnv6/construct/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3nlojnv6/construct/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ppq4t5fc
       cwd: /tmp/pip-install-3nlojnv6/construct/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for construct
  Running setup.py clean for construct
Successfully built amaranth amaranth-boards luna amlib amaranth-soc usb-descriptors
Failed to build construct
Installing collected packages: MarkupSafe, Jinja2, pyvcd, zipp, importlib-resources, amaranth, amaranth-boards, amaranth-soc, amaranth-stdio, numpy, scipy, amlib, pyusb, ziglang, construct, usb-descriptors, apollo-fpga, libusb1, pyserial, luna
    Running setup.py install for construct ... done
Successfully installed Jinja2-2.11.3 MarkupSafe-2.0.1 amaranth-0.4.dev4+g7d611b8 amaranth-boards-0.1.dev236+g809587c amaranth-soc-0.1.dev49+g217d4ea amaranth-stdio-0 amlib-0.1.dev122+g820e825 apollo-fpga-0.0.5 construct-2.10.67 importlib-resources-5.4.0 libusb1-1.9.3 luna-0.1.0.dev0 numpy-1.22.0 pyserial-3.5 pyusb-1.2.1 pyvcd-0.2.4 scipy-1.7.3 usb-descriptors-0.0 ziglang-0.8.1 zipp-3.7.0

but like I wrote, I installed construct on my own and problem was solved.

Thanks a lot! :)