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

Compatibility Issues About Python Wrapper for UDBM #31

Open
HansBug opened this issue Dec 5, 2024 · 1 comment
Open

Compatibility Issues About Python Wrapper for UDBM #31

HansBug opened this issue Dec 5, 2024 · 1 comment

Comments

@HansBug
Copy link

HansBug commented Dec 5, 2024

Hi, I'm making python wrapper which supports python3.8-3.12 (and 3.13 in the future) and all-platforms (with as many architectures as possible): https://github.com/HansBug/pyudbm . Now it is WIP, we plan to make pre-compiled wheels for all platforms and all python versions, and publish them to PyPI.

I will record some compatibility issues that been discovered by us. Some of them are in some rarely-used architecture, so it isnt always necessary to support all of them, just some recordings of these issues here. And if you plan to support them, plz let me know.

We will open another issue if some fatal issues like bugs found in udbm, and will submit PRs if possible.

@HansBug
Copy link
Author

HansBug commented Dec 5, 2024

We are trying to compile UDBM with the custom given UUtils (with -DUUtils_DIR=xxxxx), and we found that linux i686 and armv7l has compile error in UDBM. like this

  /project/UDBM/include/dbm/valuation.h: In instantiation of ‘S dbm::valuation_t<S>::get_delay_to(const dbm::valuation_t<S>&) const [with S = int]’:
  /project/UDBM/src/valuation.cpp:48:20:   required from here
  /project/UDBM/include/dbm/valuation.h:105:26: error: ambiguous overload for ‘operator[]’ (operand types are ‘const dbm::valuation_t<int>’ and ‘int’)
    105 |             S delay = arg[1] - (*this)[1];  // Get delay.
        |                       ~~~^
  /project/UDBM/include/dbm/valuation.h:105:26: note: candidate: ‘operator[](const int*, int)’ <built-in>
  /project/UDBM/include/dbm/valuation.h:146:18: note: candidate: ‘const S& dbm::valuation_t<S>::operator[](size_t) const [with S = int; size_t = unsigned int]’
    146 |         const S& operator[](size_t at) const
        |                  ^~~~~~~~
  /project/UDBM/include/dbm/valuation.h:105:39: error: ambiguous overload for ‘operator[]’ (operand types are ‘const dbm::valuation_t<int>’ and ‘int’)
    105 |             S delay = arg[1] - (*this)[1];  // Get delay.
        |                                ~~~~~~~^
  /project/UDBM/include/dbm/valuation.h:105:39: note: candidate: ‘operator[](const int*, int)’ <built-in>
  /project/UDBM/include/dbm/valuation.h:146:18: note: candidate: ‘const S& dbm::valuation_t<S>::operator[](size_t) const [with S = int; size_t = unsigned int]’
    146 |         const S& operator[](size_t at) const
        |                  ^~~~~~~~
  /project/UDBM/include/dbm/valuation.h: In instantiation of ‘S dbm::valuation_t<S>::get_delay_to(const dbm::valuation_t<S>&) const [with S = double]’:
  /project/UDBM/src/valuation.cpp:49:20:   required from here
  /project/UDBM/include/dbm/valuation.h:105:26: error: ambiguous overload for ‘operator[]’ (operand types are ‘const dbm::valuation_t<double>’ and ‘int’)
    105 |             S delay = arg[1] - (*this)[1];  // Get delay.
        |                       ~~~^
  /project/UDBM/include/dbm/valuation.h:105:26: note: candidate: ‘operator[](const double*, int)’ <built-in>
  /project/UDBM/include/dbm/valuation.h:146:18: note: candidate: ‘const S& dbm::valuation_t<S>::operator[](size_t) const [with S = double; size_t = unsigned int]’
    146 |         const S& operator[](size_t at) const
        |                  ^~~~~~~~
  /project/UDBM/include/dbm/valuation.h:105:39: error: ambiguous overload for ‘operator[]’ (operand types are ‘const dbm::valuation_t<double>’ and ‘int’)
    105 |             S delay = arg[1] - (*this)[1];  // Get delay.
        |                                ~~~~~~~^
  /project/UDBM/include/dbm/valuation.h:105:39: note: candidate: ‘operator[](const double*, int)’ <built-in>
  /project/UDBM/include/dbm/valuation.h:146:18: note: candidate: ‘const S& dbm::valuation_t<S>::operator[](size_t) const [with S = double; size_t = unsigned int]’
    146 |         const S& operator[](size_t at) const
        |                  ^~~~~~~~
  make[2]: *** [src/CMakeFiles/UDBM.dir/build.make:303: src/CMakeFiles/UDBM.dir/valuation.cpp.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:207: src/CMakeFiles/UDBM.dir/all] Error 2
  make: *** [Makefile:146: all] Error 2

It seems these are caused by the same issue.

Now we temporarily drop the support of these 2 archs, will add them back when fixed.

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

No branches or pull requests

1 participant