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

smult_curve25519_donna_c64 Doesn't build on RHEL5 (gcc-Version 4.1.2 20080704 (Red Hat 4.1.2-54)) #71

Closed
Asmod4n opened this issue Sep 5, 2013 · 7 comments

Comments

@Asmod4n
Copy link

Asmod4n commented Sep 5, 2013

This is with 0.4.2
only used ./configure && make and got this result.

  CC       libsodium_la-smult_curve25519_donna_c64.lo
crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c: In function 'crypto_scalarmult_curve25519':
crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c:424: error: unrecognizable insn:
(insn 9952 6932 9953 20 crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c:236 (parallel [
            (set (reg:CC 17 flags)
                (unspec:CC [
                        (reg:DI 39 r10 [orig:375 t$0.844 ] [375])
                        (const_int 2251799813685229 [0x7ffffffffffed])
                    ] 24))
            (set (reg:DI 39 r10 [orig:375 t$0.844 ] [375])
                (plus:DI (reg:DI 39 r10 [orig:375 t$0.844 ] [375])
                    (const_int 2251799813685229 [0x7ffffffffffed])))
        ]) -1 (nil)
    (nil))
crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c:424: internal compiler error: in extract_insn, at recog.c:2084
@jedisct1
Copy link
Owner

jedisct1 commented Sep 6, 2013

Is that on i386 or amd64?

@jedisct1
Copy link
Owner

jedisct1 commented Sep 6, 2013

I assume this is amd64.
Can you try lowering the optimization level?

env CFLAGS='-O' ./configure && make

@Asmod4n
Copy link
Author

Asmod4n commented Sep 6, 2013

Yes its on x86_64, still crashes, but with a shorter error

>   CC     libsodium_la-smult_curve25519_donna_c64.lo
> crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c: In function ‘crypto_scalarmult_curve25519’:
> crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c:424: error: unrecognizable insn:
> (insn 10460 6929 10461 20 (parallel [
>             (set (reg:CC 17 flags)
>                 (unspec:CC [
>                         (reg:DI 4 si [orig:377 t$0.750 ] [377])
>                         (const_int 2251799813685229 [0x7ffffffffffed])
>                     ] 24))
>             (set (reg:DI 4 si [orig:376 t$0.751 ] [376])
>                 (plus:DI (reg:DI 4 si [orig:377 t$0.750 ] [377])
>                     (const_int 2251799813685229 [0x7ffffffffffed])))
>         ]) -1 (nil)
>     (nil))

On 06.09.2013, at 04:04, Frank Denis notifications@github.com wrote:

I assume this is amd64.
Can you try lowering the optimization level?

env CFLAGS='-O' ./configure && make


Reply to this email directly or view it on GitHub.

@jedisct1
Copy link
Owner

jedisct1 commented Sep 6, 2013

How about -O0 ?

@Asmod4n
Copy link
Author

Asmod4n commented Sep 6, 2013

Compiled \o/

thanks for the Help

On 06.09.2013, at 05:28, Hendrik Beskow hendrik@beskow.de wrote:

Yes its on x86_64, still crashes, but with a shorter error

>  CC     libsodium_la-smult_curve25519_donna_c64.lo
> crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c: In function ‘crypto_scalarmult_curve25519’:
> crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c:424: error: unrecognizable insn:
> (insn 10460 6929 10461 20 (parallel [
>            (set (reg:CC 17 flags)
>                (unspec:CC [
>                        (reg:DI 4 si [orig:377 t$0.750 ] [377])
>                        (const_int 2251799813685229 [0x7ffffffffffed])
>                    ] 24))
>            (set (reg:DI 4 si [orig:376 t$0.751 ] [376])
>                (plus:DI (reg:DI 4 si [orig:377 t$0.750 ] [377])
>                    (const_int 2251799813685229 [0x7ffffffffffed])))
>        ]) -1 (nil)
>    (nil))

On 06.09.2013, at 04:04, Frank Denis notifications@github.com wrote:

I assume this is amd64.
Can you try lowering the optimization level?

env CFLAGS='-O' ./configure && make


Reply to this email directly or view it on GitHub.

@jedisct1
Copy link
Owner

jedisct1 commented Sep 6, 2013

So, that's a nasty compiler bug. gcc 4.1.2 is dead old (it was released in February 2007) and this bug has been fixed since, but I'll try to add some code to detect and work around this.
Thanks for your report!

@jedisct1 jedisct1 closed this as completed Sep 6, 2013
@jedisct1
Copy link
Owner

jedisct1 commented Sep 8, 2013

Ok, this has been done in 7544cba
Thanks!

Repository owner locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants