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

gh-116874: Fix building _decimal module on ppc64le #116875

Closed
wants to merge 3 commits into from

Conversation

georgthegreat
Copy link
Contributor

@georgthegreat georgthegreat commented Mar 15, 2024

In file included from python3/Modules/_decimal/libmpdec/basearith.c:34:
In file included from python3/Modules/_decimal/libmpdec/basearith.h:34:
python3/Modules/_decimal/libmpdec/typearith.h:612:4: error: "adapt mul_size_t() and mulmod_size_t()"
  #error "adapt mul_size_t() and mulmod_size_t()"
   ^
2 errors generated.

#define CONFIG_32
#define ANSI
#elif defined(__ppc64__)
#if defined(__ppc64__) || defined(__powerpc64__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the list of possible macros.

I have experienced the problem with clang-16.

@zware
Copy link
Member

zware commented Mar 15, 2024

Rather than messing with the bundled copy of libmpdec, I would highly recommend migrating to building with ./configure --with-system-libmpdec, which is intended to become the default soon (see #115119).

@georgthegreat
Copy link
Contributor Author

georgthegreat commented Mar 15, 2024

We build python from source and using system library is a less favorable option for us.
Bundle libmpdec works just fine as CPython is the only binary needing it.

Anyway, the problem is in libmpdec upstream, yet I do not have the way to upstream the fix there.

@rhettinger rhettinger removed their request for review March 15, 2024 18:05
@vstinner
Copy link
Member

Such change should be done upstream first: https://www.bytereef.org/mpdecimal/

@georgthegreat
Copy link
Contributor Author

georgthegreat commented Mar 18, 2024

Such change should be done upstream first: https://www.bytereef.org/mpdecimal/

How do I contribute to mpdecimal?
Do they even have an upstream?

@vstinner
Copy link
Member

How do I contribute to mpdecimal?

I suggest starting at https://www.bytereef.org/mpdecimal/mailinglists.html

Or you can contact directly Stefan Krah.

Do they even have an upstream?

I don't think that there is a public code repository.

@georgthegreat georgthegreat deleted the powerpc branch March 19, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants