Bug #74969 [Asn]: Broken build with libsodium 1.0.0 and macro redifinitions
| From: | jedisct1@php.net | Date: | Sat, 22 Jul 2017 16:35:22 +0000 |
| Subject: | Bug #74969 [Asn]: Broken build with libsodium 1.0.0 and macro redifinitions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210199@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74969&edit=1
ID: 74969
Updated by: jedisct1@php.net
Reported by: ab@php.net
Summary: Broken build with libsodium 1.0.0 and macro
redifinitions
Status: Assigned
Type: Bug
Package: Compile Failure
Operating System: Debian Jessie
PHP Version: 7.2Git-2017-07-22 (Git)
Assigned To: jedisct1
Block user comment: N
Private report: N
New Comment:
libsodium 1.0.0 is dead old, we can't reasonably support that. In addition to many missing
functions, there were some annoying limitations, such as input/output buffers that couldn't
overlap.
Previous Comments:
------------------------------------------------------------------------
[2017-07-22 12:03:04] ab@php.net
Description:
------------
From the config.log
14407 configure:76454: checking for sodium support
14408 configure:76490: result: yes
14409 configure:76502: checking for pkg-config
14410 configure:76533: result: /usr/bin/pkg-config
14411 configure:76541: checking for libsodium
14412 configure:76553: result: version 1.0.0 found using pkg-config
Package libsodium-dev:
p 1.0.0-1 oldstable 500
i 1.0.11-1~bpo8+1 jessie-backports 100
The package from the backports compiles, the macro redifinition warnings are still present. Same
warnings are shown in Windows builds. The extension should either compile with older dependency
versions or do a clean error check at the configure time.
Thanks.
Actual result:
--------------
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c: In function âzm_startup_sodiumâ:
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:419:0: warning:
"crypto_kx_PUBLICKEYBYTES" redefined
# define crypto_kx_PUBLICKEYBYTES 32
^
In file included from /home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:26:0:
/home/anatol/dws/src/php-7.2-nts/ext/sodium/php_libsodium.h:113:0: note: this is the location of the
previous definition
#define crypto_kx_PUBLICKEYBYTES crypto_scalarmult_SCALARBYTES
^
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:420:0: warning:
"crypto_kx_SECRETKEYBYTES" redefined
# define crypto_kx_SECRETKEYBYTES 32
^
In file included from /home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:26:0:
/home/anatol/dws/src/php-7.2-nts/ext/sodium/php_libsodium.h:114:0: note: this is the location of the
previous definition
#define crypto_kx_SECRETKEYBYTES crypto_scalarmult_SCALARBYTES
^
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c: In function
âzif_sodium_crypto_aead_chacha20poly1305_ietf_keygenâ:
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:2870:20: error:
âcrypto_aead_chacha20poly1305_ietf_KEYBYTESâ undeclared (first use in this function)
unsigned char key[crypto_aead_chacha20poly1305_ietf_KEYBYTES];
^
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:2870:20: note: each undeclared identifier is
reported only once for each function it appears in
/home/anatol/dws/src/php-7.2-nts/ext/sodium/libsodium.c:2870:16: warning: unused variable
âkeyâ [-Wunused-variable]
unsigned char key[crypto_aead_chacha20poly1305_ietf_KEYBYTES];
^
Makefile:1607: recipe for target 'ext/sodium/libsodium.lo' failed
make: *** [ext/sodium/libsodium.lo] Error 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74969&edit=1