I'm trying to install the mongodb PHP extension (which uses libmongoc @ 7e80159).
I install these Alpine packages with apk add:
libgcc libstdc++ icu-libs libressl3.0-libcrypto libressl3.0-libssl libressl3.0-libtls db libsasl snappy m4 libbz2 perl autoconf pkgconf cyrus-sasl-dev dpkg dpkg-dev libmagic file binutils gmp isl libgomp libatomic mpfr4 mpc1 gcc musl-dev libc-dev g++ icu icu-dev libressl-dev make re2c snappy-dev zlib-dev
The compilation fails with this error:
/bin/sh /tmp/pear/temp/pear-build-defaultuserHBNFPP/mongodb-1.7.2/libtool --mode=compile cc -DBSON_COMPILATION -DMONGOC_COMPILATION -Isrc/libmongoc/src/libmongoc/src/mongoc/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/ -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserHBNFPP/mongodb-1.7.2/include -I/tmp/pear/temp/pear-build-defaultuserHBNFPP/mongodb-1.7.2/main -I/tmp/pear/temp/mongodb -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/kms-message/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt-compat/ -I/tmp/pear/temp/mongodb/src/BSON/ -I/tmp/pear/temp/mongodb/src/MongoDB/ -I/tmp/pear/temp/mongodb/src/MongoDB/Exception/ -I/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/tmp/pear/temp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c -o src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.lo cc -DBSON_COMPILATION -DMONGOC_COMPILATION -Isrc/libmongoc/src/libmongoc/src/mongoc/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/ -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserHBNFPP/mongodb-1.7.2/include -I/tmp/pear/temp/pear-build-defaultuserHBNFPP/mongodb-1.7.2/main -I/tmp/pear/temp/mongodb -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/kms-message/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt-compat/ -I/tmp/pear/temp/mongodb/src/BSON/ -I/tmp/pear/temp/mongodb/src/MongoDB/ -I/tmp/pear/temp/mongodb/src/MongoDB/Exception/ -I/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/tmp/pear/temp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c -fPIC -DPIC -o src/libmongoc/src/libmongoc/src/mongoc/.libs/mongoc-openssl.o
/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c: In function '_mongoc_openssl_ctx_new':
/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c:498:23: error: 'SSL_OP_NO_RENEGOTIATION' undeclared (first use in this function); did you mean 'SSL_R_NO_RENEGOTIATION'?
498 | ssl_ctx_options |= SSL_OP_NO_RENEGOTIATION;
^~~~~~~~~~~~~~~~~~~~~~~ |
SSL_R_NO_RENEGOTIATION /tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c:498:23: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:443: src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.lo] Error 1 ERROR: `make' failed |
maybe adding an #ifdef SSL_OP_NO_RENEGOTIATION in addition to #if OPENSSL_VERSION_NUMBER >= 0x10101000L should sove this issue
- is depended on by
-
PHPC-1559 Fix libmongoc compilation issue in alpine
- Closed
- related to
-
CDRIVER-3544 Test ENABLE_SSL=AUTO and LibreSSL
- Closed