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

Compiling in 64-bit mode #4

Open
fgadaleta opened this issue Apr 19, 2018 · 4 comments
Open

Compiling in 64-bit mode #4

fgadaleta opened this issue Apr 19, 2018 · 4 comments

Comments

@fgadaleta
Copy link

Compiling libsimpleot in 64-bit mode seems to fail. Any fix?

fe25519_freeze.s:213:1: error: 32-bit absolute addressing is not supported in 64-bit mode

@pascholl
Copy link
Owner

It compiles fine for me on Linux. What OS and compilation command are you using?

@fgadaleta
Copy link
Author

I'm on Mac OS.
Passing this to gcc

CC = /usr/bin/gcc
CFLAGS = -O3 -Wall -Wextra -fno-pie

Then make

make 
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c ot_sender_test.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c Keccak-simple.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c randombytes.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c cpucycles.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c network.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c ot_sender.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c ot_receiver.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c sc25519_random.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c sc25519_from32bytes.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c sc25519_window4.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c fe25519_add.c
/usr/bin/gcc -O3 -Wall -Wextra -fno-pie -c fe25519_freeze.s
fe25519_freeze.s:213:1: error: 32-bit absolute addressing is not supported in 64-bit mode
movq CONST_REDMASK51,%rax
^
make: *** [fe25519_freeze.o] Error 1

@pascholl
Copy link
Owner

Afraid I can't help much as I don't have a Mac and didn't write the original code for this. But maybe it's related to this: https://stackoverflow.com/questions/25799551/why-does-this-movq-instruction-work-on-linux-and-not-osx

@fgadaleta
Copy link
Author

fgadaleta commented Apr 19, 2018 via email

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

2 participants