Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AlbertHu1
Level 1
Level 1
5 sign-ins First reply posted First question asked

Dear Sir or Madam,

I got a TLE94112 HAT planned to Raspberry PI 4 B, But when I tried to install the multi-half-bridge library (https://github.com/Infineon/multi-half-bridge) by using "sudo pip install multi-half-bridge", I got some errors that it can NOT find the source files, the pybind11 version I installed in 2.11.1.

Can someone help me to fix this issue?

Thanks!

Albert

 

 

0 Likes
1 Solution
Viswa
Moderator
Moderator
Moderator
10 likes received 50 solutions authored 100 replies posted

Hi

 

Can you please follow the recommendations provided in the link below and let us know if it works

https://pybind11.readthedocs.io/en/stable/installing.html

 

Please let us know if any further help is required.

 

Best Regards

View solution in original post

0 Likes
4 Replies
AlbertHu1
Level 1
Level 1
5 sign-ins First reply posted First question asked

here is the log:

demo@demo:~ $ sudo pip3 install multi-half-bridge
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting multi-half-bridge
Using cached multi-half-bridge-3.0.0rc0.tar.gz (5.9 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: multi-half-bridge
Building wheel for multi-half-bridge (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpons1se2s_in_process.py build_wheel /tmp/tmpj_88t0pe
cwd: /tmp/pip-install-gb_jpqr2/multi-half-bridge_b309c92b6d3d4387aade1a7447871424
Complete output (123 lines):
/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/dist.py:314: InformationOnly: Normalizing '3.0.0-rc' to '3.0.0rc0'
self.metadata.version = self._normalize_version(
running bdist_wheel
running build
running build_ext
-- The CXX compiler identification is GNU 10.2.1
-- The C compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at /usr/local/share/cmake/pybind11/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
/usr/local/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
/usr/local/share/cmake/pybind11/pybind11Common.cmake:188 (include)
/usr/local/share/cmake/pybind11/pybind11Config.cmake:250 (include)
src/framework/raspberrypi/CMakeLists.txt:22 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.9.2", minimum required is "3.6")
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython3.9.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/local/include (found version "2.11.1")
-- /usr/local/lib/libbcm2835.a
-- Configuring done (3.9s)
CMake Error at CMakeLists.txt:36 (add_library):
Cannot find source file:

src/corelib/tle94112-logger.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc


CMake Error at /usr/local/share/cmake/pybind11/pybind11Tools.cmake:177 (add_library):
Cannot find source file:

pal/gpio-rpi.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc
Call Stack (most recent call first):
src/framework/raspberrypi/CMakeLists.txt:24 (pybind11_add_module)


CMake Error at CMakeLists.txt:36 (add_library):
No SOURCES given to target: multi-half-bridge-corelib


CMake Error at /usr/local/share/cmake/pybind11/pybind11Tools.cmake:177 (add_library):
No SOURCES given to target: multi_half_bridge_py
Call Stack (most recent call first):
src/framework/raspberrypi/CMakeLists.txt:24 (pybind11_add_module)


CMake Generate step failed. Build files cannot be regenerated correctly.
Traceback (most recent call last):
File "/tmp/tmpons1se2s_in_process.py", line 280, in <module>
main()
File "/tmp/tmpons1se2s_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpons1se2s_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 104, in <module>
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 369, in run
self.run_command("build")
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 88, in run
_build_ext.run(self)
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-j553g_lq/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 95, in build_extension
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-gb_jpqr2/multi-half-bridge_b309c92b6d3d4387aade1a7447871424', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-gb_jpqr2/multi-half-bridge_b309c92b6d3d4387aade1a7447871424/build/lib.linux-aarch64-cpython-39/', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DEXAMPLE_VERSION_INFO=3.0.0rc0', '-DCMAKE_BUILD_TYPE=Release', '-GNinja']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for multi-half-bridge
Failed to build multi-half-bridge
ERROR: Could not build wheels for multi-half-bridge which use PEP 517 and cannot be installed directly

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AlbertHu1,

Please follow the steps mentioned in the DC Motor Shield with TLE94112 Quick Start Guide to use the Raspberry Pi board with TLE94112 HAT.

For additional information please refer to the 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

 

I did follow the instruction of “Py Getting Started · Infineon/multi-half-bridge Wiki · GitHub” to install its python library.

(the C++ code works fine, but I want it working in the python environment, the issue is in installing the python library)

When in the command of “sudo pip3 install multi-half-bridge”, the “multi-half-bridge” library cannot be installed, please refer to the logs in the same thread.It seems that script has some issues, I am not familiar with pybind11, otherwise I can modify it to make it works.Please help me. 

Thanks,

Albert

0 Likes
Viswa
Moderator
Moderator
Moderator
10 likes received 50 solutions authored 100 replies posted

Hi

 

Can you please follow the recommendations provided in the link below and let us know if it works

https://pybind11.readthedocs.io/en/stable/installing.html

 

Please let us know if any further help is required.

 

Best Regards

0 Likes