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

[hardknott-next] libiio: fix installing libiio when python3 bindings are enabled #375

Closed
wants to merge 1 commit into from

Conversation

S4mw1s3
Copy link
Contributor

@S4mw1s3 S4mw1s3 commented Jun 17, 2021

This patch fixes the following error when libiio is installed when
python3 bindings are enabled:

ERROR: Execution of '.../libiio/0.21+gitAUTOINC+565bf68ecc-r0/temp/run.do_install.2349473' failed with exit code 1:
running build
running build_py
running install
Traceback (most recent call last):
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 77, in _check_libiio_installed
raise OSError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 106, in
setup(**config)
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 52, in run
self._check_libiio_installed()
File "/libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 83, in _check_libiio_installed
raise Exception(msg)
Exception: The libiio library could not be found.
libiio needs to be installed first before the python bindings.
The latest release can be found on GitHub:
https://github.com/analogdevicesinc/libiio/releases

Some time ago a fix for this issue was already discussed here 1.
However in the same discussion also a second issue was being handled.

A fix for the second issue was merged in 51f9886. The first issue
didn't pop up anymore and so a fix was never applied.

Recently however after switching from build machine, I started seeing
the first issue. I suspect due to build caching the first issue didn't
pop up anymore before up until now. With this patch, fixes are now
available for both issues handled in 1.

@S4mw1s3 S4mw1s3 changed the title libiio: fix installing libiio when python3 bindings are enabled [hardknott]libiio: fix installing libiio when python3 bindings are enabled Jun 17, 2021
@S4mw1s3 S4mw1s3 changed the title [hardknott]libiio: fix installing libiio when python3 bindings are enabled [hardknott] libiio: fix installing libiio when python3 bindings are enabled Jun 17, 2021
@S4mw1s3 S4mw1s3 changed the title [hardknott] libiio: fix installing libiio when python3 bindings are enabled [hardknott-next] libiio: fix installing libiio when python3 bindings are enabled Jun 17, 2021
@kraj kraj requested a review from akuster June 23, 2021 18:07
@akuster
Copy link
Contributor

akuster commented Jun 27, 2021

The 0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch is missing the standard OE patch format.
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

What I am looking for is:
Upstream-Status: Backport
Signed-off-by: { your signoff}

This patch fixes the following error when libiio is installed when
python3 bindings are enabled:

ERROR: Execution of '.../libiio/0.21+gitAUTOINC+565bf68ecc-r0/temp/run.do_install.2349473' failed with exit code 1:
running build
running build_py
running install
Traceback (most recent call last):
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 77, in _check_libiio_installed
    raise OSError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 106, in <module>
    setup(**config)
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/recipe-sysroot-native/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File ".../libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 52, in run
    self._check_libiio_installed()
  File "/libiio/0.21+gitAUTOINC+565bf68ecc-r0/build/bindings/python/setup.py", line 83, in _check_libiio_installed
    raise Exception(msg)
Exception: The libiio library could not be found.
            libiio needs to be installed first before the python bindings.
            The latest release can be found on GitHub:
            https://github.com/analogdevicesinc/libiio/releases

Some time ago a fix for this issue was already discussed here [1].
However in the same discussion also a second issue was being handled.

A fix for the second issue was merged in 51f9886. The first issue
didn't pop up anymore and so a fix was never applied.

Recently however after switching from build machine, I started seeing
the first issue. I suspect due to build caching the first issue didn't
pop up anymore before up until now. With this patch, fixes are now
available for both issues handled in [1].

[1]: openembedded#248

Signed-off-by: Sam Van Den Berge <[email protected]>
@S4mw1s3
Copy link
Contributor Author

S4mw1s3 commented Jun 28, 2021

Thanks for reviewing. I addressed your remarks. Let me know if this is not what you meant. FYI, I also rebased on top of hardknott-next.

@S4mw1s3
Copy link
Contributor Author

S4mw1s3 commented Jul 6, 2021

@akuster small reminder to this pull request :)

@akuster
Copy link
Contributor

akuster commented Jul 14, 2021

pulled into stable/hardknott-nut

@S4mw1s3
Copy link
Contributor Author

S4mw1s3 commented Jul 14, 2021

Thanks! This ticket can be closed then.

@S4mw1s3 S4mw1s3 closed this Jul 14, 2021
rtollert pushed a commit to rtollert/meta-openembedded that referenced this pull request Aug 4, 2022
Version 2.11

============

Released 2018-02-09

* New features:

  - Add `json_pack()` format specifiers s*, o* and O* for values that
    can be omitted if null (openembedded#339).

  - Add `json_error_code()` to retrieve numeric error codes (openembedded#365, openembedded#380,
    openembedded#381).

  - Enable thread safety for `json_dump()` on all systems.  Enable thread
    safe `json_decref()` and `json_incref()` for modern compilers (openembedded#389).

  - Add `json_sprintf()` and `json_vsprintf()` (openembedded#393).

* Bug Fixes:

  - Fix incorrect report of success from `json_dump_file()` when an error
    is returned by `fclose()` (openembedded#359).

  - Make json_equal() const-correct (openembedded#344).

  - Fix incomplete stealing of references by `json_pack()` (openembedded#374).

* Build:

  - Work around gcc's -Wimplicit-fallthrough.

  - Fix CMake detection of `sys/types.h` header (openembedded#375).

  - Fix `jansson.pc` generated by CMake to be more consistent with the one
    generated using GNU Autotools (openembedded#368).

* Other:

  - Miscellaneous documentation fixes (openembedded#356, openembedded#378, openembedded#395).

  - Remove unnecessary reference actions from parsers (openembedded#377).

Version 2.10
============

Released 2017-03-02

* New features:

  - Add JSON_EMBED encoding flag allowing arrays and objects to be encoded
    into existing streams (openembedded#329).

  - Add `json_dumpb()` function for dumping to a pre-allocated buffer (openembedded#328).

  - Add `json_dumpfd()` and `json_loadfd()` functions for dumping to streaming
    file descriptors (openembedded#328).

  - Add support for parsing buffers larger than 2GB (openembedded#309).

* Build:

  - Fix CMake build when LONG_LONG_INT is defined as "" (openembedded#321)

* Other:

  - Internal code cleanup (openembedded#311, openembedded#314)

Signed-off-by: Andre McCurdy <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
rtollert pushed a commit to rtollert/meta-openembedded that referenced this pull request Aug 9, 2022
Version 2.11

============

Released 2018-02-09

* New features:

  - Add `json_pack()` format specifiers s*, o* and O* for values that
    can be omitted if null (openembedded#339).

  - Add `json_error_code()` to retrieve numeric error codes (openembedded#365, openembedded#380,
    openembedded#381).

  - Enable thread safety for `json_dump()` on all systems.  Enable thread
    safe `json_decref()` and `json_incref()` for modern compilers (openembedded#389).

  - Add `json_sprintf()` and `json_vsprintf()` (openembedded#393).

* Bug Fixes:

  - Fix incorrect report of success from `json_dump_file()` when an error
    is returned by `fclose()` (openembedded#359).

  - Make json_equal() const-correct (openembedded#344).

  - Fix incomplete stealing of references by `json_pack()` (openembedded#374).

* Build:

  - Work around gcc's -Wimplicit-fallthrough.

  - Fix CMake detection of `sys/types.h` header (openembedded#375).

  - Fix `jansson.pc` generated by CMake to be more consistent with the one
    generated using GNU Autotools (openembedded#368).

* Other:

  - Miscellaneous documentation fixes (openembedded#356, openembedded#378, openembedded#395).

  - Remove unnecessary reference actions from parsers (openembedded#377).

Version 2.10
============

Released 2017-03-02

* New features:

  - Add JSON_EMBED encoding flag allowing arrays and objects to be encoded
    into existing streams (openembedded#329).

  - Add `json_dumpb()` function for dumping to a pre-allocated buffer (openembedded#328).

  - Add `json_dumpfd()` and `json_loadfd()` functions for dumping to streaming
    file descriptors (openembedded#328).

  - Add support for parsing buffers larger than 2GB (openembedded#309).

* Build:

  - Fix CMake build when LONG_LONG_INT is defined as "" (openembedded#321)

* Other:

  - Internal code cleanup (openembedded#311, openembedded#314)

Signed-off-by: Andre McCurdy <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants