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

TST: install missing dependencies #2

Merged
merged 4 commits into from
Mar 25, 2021
Merged

TST: install missing dependencies #2

merged 4 commits into from
Mar 25, 2021

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Mar 25, 2021

Install libsndfile1 under Ubuntu, also sox under Ubuntu (not sure yet if needed), Windows and MacOS.

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

@agfcrespi it currently fails under MacOS with:

    import audresample
audresample/__init__.py:2: in <module>
    from audresample.core.api import (
audresample/core/api.py:8: in <module>
    from audresample.core.lib import lib
audresample/core/lib.py:14: in <module>
    lib = ctypes.cdll.LoadLibrary(lib_path)
../../../hostedtoolcache/Python/3.6.13/x64/lib/python3.6/ctypes/__init__.py:426: in LoadLibrary
    return self._dlltype(name)
../../../hostedtoolcache/Python/3.6.13/x64/lib/python3.6/ctypes/__init__.py:348: in __init__
    self._handle = _dlopen(self._name, mode)
E   OSError: dlopen(/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so, 6): no suitable image found.  Did find:
E   	/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
E   	/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

I guess support for MacOS is simply not available at the moment?

@agfcrespi
Copy link
Contributor

agfcrespi commented Mar 25, 2021

@agfcrespi it currently fails under MacOS with:

    import audresample
audresample/__init__.py:2: in <module>
    from audresample.core.api import (
audresample/core/api.py:8: in <module>
    from audresample.core.lib import lib
audresample/core/lib.py:14: in <module>
    lib = ctypes.cdll.LoadLibrary(lib_path)
../../../hostedtoolcache/Python/3.6.13/x64/lib/python3.6/ctypes/__init__.py:426: in LoadLibrary
    return self._dlltype(name)
../../../hostedtoolcache/Python/3.6.13/x64/lib/python3.6/ctypes/__init__.py:348: in __init__
    self._handle = _dlopen(self._name, mode)
E   OSError: dlopen(/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so, 6): no suitable image found.  Did find:
E   	/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
E   	/Users/runner/work/audresample/audresample/audresample/core/bin/libaudresample.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

I guess support for MacOS is simply not available at the moment?

@hagenw Only Linux and Windows for the moment: https://gitlab.audeering.com/tools/audresamplelib/-/blob/master/.gitlab-ci.yml . But I guess we can easily support macOS as well (please open an issue there if needed). I remember @aud-ktw had tried it out once, and I think it was working fine.

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

Unfortunately, the test for Windows also fails:

    import audresample
audresample\__init__.py:2: in <module>
    from audresample.core.api import (
audresample\core\api.py:8: in <module>
    from audresample.core.lib import lib
audresample\core\lib.py:14: in <module>
    lib = ctypes.cdll.LoadLibrary(lib_path)
C:\hostedtoolcache\windows\Python\3.6.8\x64\lib\ctypes\__init__.py:426: in LoadLibrary
    return self._dlltype(name)
C:\hostedtoolcache\windows\Python\3.6.8\x64\lib\ctypes\__init__.py:348: in __init__
    self._handle = _dlopen(self._name, mode)
E   OSError: [WinError 126] The specified module could not be found

Is there something I have to adjust?

@agfcrespi
Copy link
Contributor

Unfortunately, the test for Windows also fails:

    import audresample
audresample\__init__.py:2: in <module>
    from audresample.core.api import (
audresample\core\api.py:8: in <module>
    from audresample.core.lib import lib
audresample\core\lib.py:14: in <module>
    lib = ctypes.cdll.LoadLibrary(lib_path)
C:\hostedtoolcache\windows\Python\3.6.8\x64\lib\ctypes\__init__.py:426: in LoadLibrary
    return self._dlltype(name)
C:\hostedtoolcache\windows\Python\3.6.8\x64\lib\ctypes\__init__.py:348: in __init__
    self._handle = _dlopen(self._name, mode)
E   OSError: [WinError 126] The specified module could not be found

Is there something I have to adjust?

Mmm, I am not sure what the problem is here. Admittedly, we have never really tested on Windows either (even though we are building the DLL of the native library and providing it to this project). Maybe it would be more elegant and less error-prone to create a Conan recipe and consume the binaries via Conan directly (rather than committing the binaries to the repository), but we have not tried this path yet and we don't have experience with it.

Is there an urgent need to support Windows and macOs?

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

Is there an urgent need to support Windows and macOs?

Yes, as we need this in audb

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

If I compare https://github.com/audeering/audresample/tree/master/audresample/core/bin with https://github.com/audeering/opensmile-python/tree/master/opensmile/core/bin then it seems to me that for opensmile we provide three different libraries. But this should not be the case here, correct?

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

Of course we still provide different libraries and select them here:
https://github.com/audeering/audresample/blob/master/audresample/core/lib.py#L10-L13

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2021

So maybe as a start I will disable tests under Windows as well and open an issue for that.

@hagenw hagenw merged commit 69643b6 into master Mar 25, 2021
@hagenw hagenw deleted the fix-pipeline branch March 25, 2021 09:40
@agfcrespi
Copy link
Contributor

If I compare https://github.com/audeering/audresample/tree/master/audresample/core/bin with https://github.com/audeering/opensmile-python/tree/master/opensmile/core/bin then it seems to me that for opensmile we provide three different libraries. But this should not be the case here, correct?

I think both approaches are valid.

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