-
Notifications
You must be signed in to change notification settings - Fork 203
workaround for problems with relocation on the x32 architecture #155
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
Conversation
@sjaeckel I'm trying first a newer version of libtool as debian wiki mentions that old libtool may trigger issues related to relocation (although the error messages between the wiki and the logs are not the same). As it happens, I've a Debian bug that asks me to stop using old version of libtool while building Debian package... After that, I'll try this patch. |
@dod38fr seems to work with the patch attached to bug 912838. Please drop a note when it is official, so I can declare this branch as obsolete and delete it. (it's nothing I would mourn for, it wasn't the most elegant piece of code in the first place ;-) ) Is it known what libtool bug(s) caused it? |
@dod38fr No, I have to take it back, sorry. Seems as if I did a bad job cleaning all caches. *sigh* |
@czurnieden I've uploaded a libtommath version 1.1.0-3~exp1 to debian experimental. This new verson contains the patch of this PR. The build results look good on x32. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced that the visibility attributes are a good solution. What is the reason for the relocation error?
Furthermore we should decide on an API concerning the tuning parameters instead of exposing mp_get_KARATSUBA_* and mp_set_KARATSUBA_* functions depending on compile flags.
Neither am I, but that is the best solution offered yet. One of the better solutions would be getter/setter functions.
The linker does not know enough at linking time and thinks it needs to export them outside of the lib, too. A short search with Google shows some results that seem to show a tendency to accept it, the
Tuning is a one-time activity at compile time and I think a macro should suffice, as long as it is documented. Everything else needs some automatic configuration method (e.g.: autoconf). |
@dod38fr do I understand correctly that debian on x32 builds now without this patch? (after you updated libtool) |
@czurnieden Since these tuning parameters should be constant, could we instead use macros? Then we could allow overwriting these macros for tuning. #ifndef KARATSUBA_CUTOFF
#define KARATSUBA_CUTOFF value-determined-by-tuning
#endif Compilation for the demo will then overwrite this as follows #define KARATSUBA_CUTOFF get_karatsuba_cutoff() and the function can be defined in the tuning program. This would reduce the ugliness of this issue a bit. We would still need the visibility attributes though. |
I don't like the idea of having a different ABI&API on x32 than on the other architectures, so I'm also tending towards a "won't fix" until 2.0.0 @dod38fr which way do you suggest to go? what do the debian guidelines say? |
Wontfix is appropriate 👍 x32 is a dead end. |
@dod38fr would it be fine for you (and debian) if we won't fix this? I also don't see much future for x32 |
@sjaeckel x32 is not "officially" supported by Debian, so skipping x32 This means that perl6 and some other reverse dependencies like I'll remove this arch from the list of target of libtomath |
Ah, thanks! One headache less. |
Ok good, I close this then. If the need comes up from the perl6 guys or other interested parties, this issue can be reopened. |
A proposal for a workaround for the x32 relocation problem.