Bug #70204 [NEW]: CPU lacks SSE2 instructions, scrypt won't compile
| From: | a dot mad dot coder at gmail dot com | Date: | Thu, 06 Aug 2015 17:06:32 +0000 |
| Subject: | Bug #70204 [NEW]: CPU lacks SSE2 instructions, scrypt won't compile | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-194987@lists.php.net to get a copy of this message | ||
From: a dot mad dot coder at gmail dot com
Operating system: i686 GNU/Linux 4.0.5-1
PHP version: 5.6.11
Package: Compile Failure
Bug Type: Bug
Bug description:CPU lacks SSE2 instructions, scrypt won't compile
Description:
------------
I'm trying to install scrypt support for my php server via `pecl install
scrypt`.
Note that the CPU doesn't support SSE2 instructions.
I've also tried:
git clone https://github.com/DomBlack/php-scrypt
cd php-scrypt
phpize
./configure --enable-scrypt
make
make test
The tests fails. but I believe it may be relevant to sse2. The logs can
be pasted here if needed.
Test script:
---------------
#using a cpu without sse2 support, run:
pecl install scrypt
Actual result:
--------------
# pecl install scrypt
downloading scrypt-1.2.tgz ...
Starting to download scrypt-1.2.tgz (20,361 bytes)
.......done: 20,361 bytes
17 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
whether to enable scrypt support [yes] : yes
building in /tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2
running: /tmp/pear/temp/scrypt/configure --enable-scrypt=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable scrypt support... yes, shared
checking for clock_gettime in -lrt... yes
checking for library containing clock_gettime... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for struct sysinfo.uptime... no
checking for struct sysinfo.totalram... no
checking emmintrin.h usability... yes
checking emmintrin.h presence... yes
checking for emmintrin.h... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/libtool
--mode=compile cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto
-DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/scrypt/php_scrypt.c -o
php_scrypt.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto -DHAVE_CONFIG_H
-g -O2 -c /tmp/pear/temp/scrypt/php_scrypt.c -fPIC -DPIC -o
.libs/php_scrypt.o
/bin/sh /tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/libtool
--mode=compile cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto
-DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/scrypt/php_scrypt_utils.c -o
php_scrypt_utils.lo
cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto -DHAVE_CONFIG_H
-g -O2 -c /tmp/pear/temp/scrypt/php_scrypt_utils.c -fPIC -DPIC -o
.libs/php_scrypt_utils.o
/bin/sh /tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/libtool
--mode=compile cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto
-DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/scrypt/crypto/sha256.c -o
crypto/sha256.lo
mkdir crypto/.libs
cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto -DHAVE_CONFIG_H
-g -O2 -c /tmp/pear/temp/scrypt/crypto/sha256.c -fPIC -DPIC -o
crypto/.libs/sha256.o
/bin/sh /tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/libtool
--mode=compile cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto
-DHAVE_CONFIG_H -g -O2 -c
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c -o
crypto/crypto_scrypt-sse.lo
cc -I. -I/tmp/pear/temp/scrypt -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/include
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/main
-I/tmp/pear/temp/scrypt -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
-I/tmp/pear/temp/pear-build-rootELnQEw/scrypt-1.2/crypto -DHAVE_CONFIG_H
-g -O2 -c /tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c -fPIC -DPIC
-o crypto/.libs/crypto_scrypt-sse.o
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c: In function
âsmixâ:
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:216:16: warning: cast
to pointer from integer of different size [-Wint-to-pointer-cast]
blkcpy((void *)((uintptr_t)(V) + i * 128 * r), X, 128 * r);
^
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:222:16: warning: cast
to pointer from integer of different size [-Wint-to-pointer-cast]
blkcpy((void *)((uintptr_t)(V) + (i + 1) * 128 * r),
^
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:235:19: warning: cast
to pointer from integer of different size [-Wint-to-pointer-cast]
blkxor(X, (void *)((uintptr_t)(V) + j * 128 * r), 128 * r);
^
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:242:19: warning: cast
to pointer from integer of different size [-Wint-to-pointer-cast]
blkxor(Y, (void *)((uintptr_t)(V) + j * 128 * r), 128 * r);
^
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c: In function
âblkxorâ:
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:76:14: warning: SSE
vector return without SSE enabled changes the ABI [-Wpsabi]
D[i] = _mm_xor_si128(D[i], S[i]);
^
In file included from
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:37:0:
/usr/lib/gcc/i686-pc-linux-gnu/5.2.0/include/emmintrin.h:1286:1: error:
inlining failed in call to always_inline â_mm_xor_si128â: target
specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^
/tmp/pear/temp/scrypt/crypto/crypto_scrypt-sse.c:76:16: error: called
from here
D[i] = _mm_xor_si128(D[i], S[i]);
^
Makefile:187: recipe for target 'crypto/crypto_scrypt-sse.lo' failed
make: *** [crypto/crypto_scrypt-sse.lo] Error 1
ERROR: `make' failed
--
Edit bug report at https://bugs.php.net/bug.php?id=70204&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70204&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70204&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70204&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70204&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70204&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70204&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70204&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70204&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70204&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70204&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70204&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70204&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70204&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70204&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70204&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70204&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70204&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70204&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70204&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70204&r=mysqlcfg