PyCrypto 2.7a1 build fails on Solaris 11.1

Bug #1255599 reported by Jack McMara
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

Host is Solaris 11.1 clean install:

uname -a
SunOS <cut> 5.11 11.1 i86pc i386 i86pc

Problem #1:

prompt $ /path/to/install/bin/python3 setup.py build
running build
running build_py
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
gcc -std=gnu99 -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -DHAVE_CONFIG_H -fPIC -Isrc/ -I/path/to/install/include/python3.3m -c src/_fastmath.c -o build/temp.solaris-2.11-i86pc.32bit-3.3/src/_fastmath.o
src/_fastmath.c:34:18: fatal error: gmp.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

GMP is installed with the package manager, but in Solaris 11.1 the include file is under a subdirectory:

prompt $ ls -l /usr/include/gmp/gmp.h
-r--r--r-- 1 root bin 84701 Oct 27 2012 /usr/include/gmp/gmp.h

Problem #2.

Configure without gmp:

prompt $ ./configure --without-gmp
<OK>

prompt $ /path/to/install/bin/python3 setup.py build

running build
running build_py
running build_ext
running build_configure
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Cipher._AESNI' extension
gcc -std=gnu99 -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -DHAVE_CONFIG_H -fPIC -Isrc/ -I/path/to/install/include/python3.3m -c src/AESNI.c -o build/temp.solaris-2.11-i86pc.32bit-3.3/src/AESNI.o -maes
In file included from /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/include/wmmintrin.h:31:0,
                 from src/AESNI.c:26:
/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/include/emmintrin.h: In function ‘aes128_keyexpand’:
/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/include/emmintrin.h:1380:41: error: the last argument must be an 8-bit immediate
error: command 'gcc' failed with exit status 1

summary: - PyCrypto 2.6 build fails on Solaris 11.1
+ PyCrypto 2.7a1 build fails on Solaris 11.1
Revision history for this message
Richard Mitchell (mitchellrj) wrote :

This commit provides a workaround, but I don't understand enough about the SSE2 stuff to make a smarter fix.

https://github.com/mitchellrj/pycrypto/commit/2d14dd27908ac671905dbc6b5e2931c7bee72670

Revision history for this message
Sebastian Ramacher (s-ramacher) wrote :

I suppose it's the same issue as the one fixed by https://github.com/dlitz/pycrypto/pull/63.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.