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

RANDOM.C and use of asm ("RDTSC" : "=A" (result)) FAILS on ARM #12

Closed
LittleDuke opened this issue Sep 4, 2018 · 4 comments
Closed
Assignees

Comments

@LittleDuke
Copy link

in "lib/random.c" on line 146

asm ("RDTSC" : "=A" (result));

Does not compile on ARM/ARM64 based Raspberry PI computers for obvious reasons.

A better more cross-platform compatible approach would be to support something like "rng-tools"

https://wiki.archlinux.org/index.php/Rng-tools

@Minege Minege self-assigned this Mar 2, 2019
@Minege
Copy link
Owner

Minege commented Mar 2, 2019

Hi @LittleDuke,
Can you try to again on your Raspberry Pi, but install the library like this instead:
pip install git+https://github.com/Minege/eSSP.git@update ?

@LittleDuke
Copy link
Author

LittleDuke commented Mar 3, 2019 via email

@ymaktepi
Copy link
Contributor

ymaktepi commented Jul 15, 2019

Hi @LittleDuke

I'd be interested in seeing your patch as I'm currently running into the same issue. Would you be kind enough to create a PR if you still have the updated code around? Thanks in advance

@Minege
Long time no see, how's life? I tried compiling the C part of the lib on a raspberry pi 4 (edit: using the update branch), and it seems to still crash at the same point:

Random.c: In function ‘GetRTSC’:
Random.c:141:2: error: impossible constraint in ‘asm’
  asm ("RDTSC" : "=A" (result));
  ^~~
make: *** [Makefile:32: Random.o] Error 1

I did not try on a RPi3 but I could if it's needed.

@ymaktepi
Copy link
Contributor

Should be fixed in #15

@Minege Minege closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants