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

Compile hiawatha failed in version 9.4/9.5 #95

Closed
mustafaramadhan opened this issue Apr 25, 2014 · 12 comments
Closed

Compile hiawatha failed in version 9.4/9.5 #95

mustafaramadhan opened this issue Apr 25, 2014 · 12 comments

Comments

@mustafaramadhan
Copy link

I have a problem for rpm compile hiawatha webserver. Read my report in https://www.hiawatha-webserver.org/forum/topic/1627 and https://www.hiawatha-webserver.org/forum/topic/1611.

This issue only happen in Centos 5 64bit. Nothing problem when compile in Centos 5 32bit or Centos 6 32/64bit.

As we know, Hiawatha using polarssl api instead openssl.

@barrykn
Copy link
Contributor

barrykn commented Apr 25, 2014

FWIW this looks similar to a compile failure I noticed on OS X 10.6.8 with Xcode 3.2.6 (on a Core 2 Duo, so 64-bit). That one also involved the compiler (various versions of gcc, actually) choking on aesni.c. I'll follow up with more specific info when I get a chance, but I'm not sure when that'll be.

@pjbakker
Copy link
Contributor

The reason we most often find is an 'older' version of binutils. Can you check which version both Centos instances use?

Based on this (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gas/NEWS;hb=refs/tags/binutils-2_24) and some other things I read, you need 2.19 at least for AES-NI support in 'gas'.

@mustafaramadhan
Copy link
Author

The question is why nothing problem with Centos 5 32bit. As we know Centos 5 32bit and 64bit have the same binutils version (2.17.50.0.6-26.el5). Centos 6 using binutils 2.20.51.0.2-5.36.el6.

Testing in Virtualbox and KVM VPS.

@mpg
Copy link
Contributor

mpg commented Apr 25, 2014

Most probably because on 32 bits platforms the AES-NI instructions are never used, which is detected at compile time, so the assembler never sees these instructions.

@mustafaramadhan
Copy link
Author

No issue when using polarssl from hiawatha 9.3.1 (using polarssl 1.3.2).

@mustafaramadhan
Copy link
Author

Yes. It's binutils issue in Centos 5 64bit. I was compile binutils 2.24 for Centos 5 64bit and then nothing problem for compile hiawatha 9.5.

@barrykn
Copy link
Contributor

barrykn commented Apr 26, 2014

(Edit: This is on my OS X 10.6.8/Xcode 3.2.6 system. This isn't an issue on my OS X 10.7+ systems, where clang rather than gcc is the default compiler.)

$ as -v < /dev/null
Apple Inc version cctools-845, GNU assembler version 1.38

This is the OS X 10.9.0 version of as, from the cctools package on MacPorts, but it's still not enough for gcc (4.8.2 from MacPorts) to compile aesni.c. However, installing the clang-3.4 package from MacPorts and using that to compile polarssl works.

@mpg
Copy link
Contributor

mpg commented Apr 26, 2014

Ok, I think I've got a workaround.

Could any of you please try replacing library/aesni.c with this version: https://gist.github.com/mpg/11322839 and see if it fixes the issue with the toolchains that currently can't compile it? Thanks in advance!

@mustafaramadhan
Copy link
Author

Look like Ok using 'new' aesni.c with binutils-2.17.50.0.6-26.el5 in Centos 5 64bit.

@barrykn
Copy link
Contributor

barrykn commented Apr 28, 2014

The new aesni.c seems to work (i.e. PolarSSL compiles and the tests pass) on two Macs (one with a CPU that supports AES-NI, one without) running OS X 10.6.8/Xcode 3.2.6/Apple gcc 4.2.1-5666.3.

@mpg
Copy link
Contributor

mpg commented Apr 28, 2014

Great. Thank you both for you help!

@pjbakker
Copy link
Contributor

pjbakker commented May 2, 2014

PolarSSL 1.3.7 is just released and includes the AES-NI improvements!

@pjbakker pjbakker closed this as completed May 2, 2014
hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue Jan 4, 2021
…_DEBUG_C

Fix unused variable when MBEDTLS_DEBUG_C is undefined
iameli pushed a commit to livepeer/mbedtls that referenced this issue Dec 5, 2023
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

4 participants