pip install seabreeze fails in fedora 35
drmcnelson opened this issue · 1 comments
drmcnelson commented
spectrometer and system information
Fedora35 Cinnamon Desktop
Python 3.10.1
Pip 21.2.3
current problem
sudo pip install seabreeze fails, as follows:
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp: In member function ‘void seabreeze::api::DHCPServerFeatureAdapter::getServerAddress(int*, unsigned char, unsigned char (*)[4], unsigned char*)’:
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:64:16: error: template argument 1 is invalid
64 | vector<byte> serverAddressVector;
| ^
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:64:16: error: template argument 2 is invalid
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:68:94: error: cannot convert ‘int*’ to ‘std::vector<unsigned char>*’
68 | this->feature->getServerAddress(*this->protocol, *this->bus, interfaceIndex, &serverAddressVector, netMask);
| ^~~~~~~~~~~~~~~~~~~~
| |
| int*
In file included from src/libseabreeze/include/api/seabreezeapi/DHCPServerFeatureAdapter.h:37,
from src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:35:
src/libseabreeze/include/vendors/OceanOptics/features/dhcp_server/DHCPServerFeatureInterface.h:56:53: note: initializing argument 4 of ‘virtual void seabreeze::DHCPServerFeatureInterface::getServerAddress(const seabreeze::Protocol&, const seabreeze::Bus&, unsigned char, std::vector<unsigned char>*, unsigned char*)’
56 | std::vector<unsigned char> *serverAddress,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:70:52: error: invalid types ‘int[int]’ for array subscript
70 | memcpy(serverAddress, &(serverAddressVector[0]), 4);
| ^
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp: In member function ‘void seabreeze::api::DHCPServerFeatureAdapter::setServerAddress(int*, unsigned char, const unsigned char*, unsigned char)’:
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:83:16: error: template argument 1 is invalid
83 | vector<byte> *serverAddressVector = new vector<byte>(4);
| ^
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:83:16: error: template argument 2 is invalid
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:83:56: error: template argument 1 is invalid
83 | vector<byte> *serverAddressVector = new vector<byte>(4);
| ^
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:83:56: error: template argument 2 is invalid
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:84:36: error: invalid types ‘int[int]’ for array subscript
84 | memcpy(&((*serverAddressVector)[0]), serverAddress, 4);
| ^
src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:87:86: error: cannot convert ‘int’ to ‘std::vector<unsigned char>’
87 | this->feature->setServerAddress(*this->protocol, *this->bus, interfaceIndex, *serverAddressVector, netMask);
| ^~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from src/libseabreeze/include/api/seabreezeapi/DHCPServerFeatureAdapter.h:37,
from src/libseabreeze/src/api/seabreezeapi/DHCPServerFeatureAdapter.cpp:35:
src/libseabreeze/include/vendors/OceanOptics/features/dhcp_server/DHCPServerFeatureInterface.h:62:58: note: initializing argument 4 of ‘virtual void seabreeze::DHCPServerFeatureInterface::setServerAddress(const seabreeze::Protocol&, const seabreeze::Bus&, unsigned char, std::vector<unsigned char>, unsigned char)’
62 | const std::vector<unsigned char> serverAddress,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for seabreeze
Failed to build seabreeze
ERROR: Could not build wheels for seabreeze which use PEP 517 and cannot be installed directly
drmcnelson commented
Apologies, this is the same issue as https://github.com/ap--/python-seabreeze/issues/111
The answer there, still works. I installed it with
pip install seabreeze[pyseabreeze] --no-use-pep517 --no-build-isolation --install-option="--without-cseabreeze"
And the sample program to read the wavelengths and intensities works.