Reputation: 195
I am trying to get my cocotb work with commercial simulators (either modelsim or activeHDL) and I would appreciate if someone could help me get them up and running.
I have a Windows machine where I have installed MSYS2 and anaconda3 from where I can install cocotb. I don't have problem installing (I presume stable) cocotb with pip install cocotb
through anaconda prompt, however, when I want to install the development version of cocotb through pip install https://github.com/cocotb/cocotb/archive/master.zip
I run into trouble.
Initially, the installation complained about visual studio c++14 not being installed. I decided to install visual Studio build tools and hope it will install but then the installation failed due to following error
building 'cocotb\libs\libcocotbutils' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\cocotb
creating build\temp.win-amd64-3.7\Release\cocotb\share
creating build\temp.win-amd64-3.7\Release\cocotb\share\lib
creating build\temp.win-amd64-3.7\Release\cocotb\share\lib\utils
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Icocotb\share\include -IC:\Users\Mehdi\anaconda3\include -IC:\Users\Mehdi\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpcocotb\share\lib\utils\cocotb_utils.cpp /Fobuild\temp.win-amd64-3.7\Release\cocotb\share\lib\utils\cocotb_utils.obj -std=c++11 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wnon-virtual-dtor -Woverloaded-virtual -D__STDC_FORMAT_MACROS
cl : Command line error D8021 : invalid numeric argument '/Wextra'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Is this a problem with cocotb's development version or do I miss something? how can I force cocotb use msys2 build tools instead of visual studio's?
PS. The reason I am trying to install the development version is because of activehdl.
Upvotes: 1
Views: 412
Reputation: 111
You need set MinGW as the default compiler one way is to:
pip install --global-option build_ext --global-option --compiler=mingw32 https://github.com/cocotb/cocotb/archive/master.zip
More info: How to use MinGW's gcc compiler when installing Python package using Pip?
I will try to add this to the documentation.
Upvotes: 2