mongo-php-driver icon indicating copy to clipboard operation
mongo-php-driver copied to clipboard

Unable to install pecl mongodb-1.15.1 in php 8.2

Open Dev-WBAP opened this issue 1 year ago • 1 comments

/bin/sh /private/tmp/pear/temp/pear-build-rootP1ik7m/mongodb-1.15.1/libtool --mode=compile cc -Isrc/libmongoc/src/libbson/src/bson/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/bson/ -I/private/tmp/pear/temp/pear-build-rootP1ik7m/mongodb-1.15.1/include -I/private/tmp/pear/temp/pear-build-rootP1ik7m/mongodb-1.15.1/main -I/private/tmp/pear/temp/mongodb -I/Applications/MAMP/bin/php/php8.2.0/include/php -I/Applications/MAMP/bin/php/php8.2.0/include/php/main -I/Applications/MAMP/bin/php/php8.2.0/include/php/TSRM -I/Applications/MAMP/bin/php/php8.2.0/include/php/Zend -I/Applications/MAMP/bin/php/php8.2.0/include/php/ext -I/Applications/MAMP/bin/php/php8.2.0/include/php/ext/date/lib -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/zlib-1.2. 12/ -I/private/tmp/pear/temp/mongodb/src/libmongocrypt/src/ -I/private/tmp/pear/temp/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/temp/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/temp/mongodb/src/ -I/private/tmp/pear/temp/mongodb/src/BSON/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/temp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DBSON_COMPILATION -DMONGOC_COMPILATION -D_DEFAULT_SOURCE -D_THREAD_SAFE -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -D_THREAD_SAFE -D_THREAD_SAFE -DKMS_MESSAGE_LITTLE_ENDIAN=1 -DMONGOCRYPT_LITTLE_ENDIAN=1 -c /private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/bson/bson-error.c -o src/libmongoc/src/libbson/src/bson/bson-error.lo -MMD -MF src/libmongoc/src/libbson/src/bson/bson-error.dep -MT src/libmongoc/src/libbson/src/bson/bson-error.lo cc -Isrc/libmongoc/src/libbson/src/bson/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/bson/ -I/private/tmp/pear/temp/pear-build-rootP1ik7m/mongodb-1.15.1/include -I/private/tmp/pear/temp/pear-build-rootP1ik7m/mongodb-1.15.1/main -I/private/tmp/pear/temp/mongodb -I/Applications/MAMP/bin/php/php8.2.0/include/php -I/Applications/MAMP/bin/php/php8.2.0/include/php/main -I/Applications/MAMP/bin/php/php8.2.0/include/php/TSRM -I/Applications/MAMP/bin/php/php8.2.0/include/php/Zend -I/Applications/MAMP/bin/php/php8.2.0/include/php/ext -I/Applications/MAMP/bin/php/php8.2.0/include/php/ext/date/lib -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/zlib-1.2.12/ -I/private/tmp/pear/temp/mongodb/src/libmongocrypt/src/ -I/private/tmp/pear/temp/mongo db/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/temp/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/temp/mongodb/src/ -I/private/tmp/pear/temp/mongodb/src/BSON/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/temp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DBSON_COMPILATION -DMONGOC_COMPILATION -D_DEFAULT_SOURCE -D_THREAD_SAFE -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -D_THREAD_SAFE -D_THREAD_SAFE -DKMS_MESSAGE_LITTLE_ENDIAN=1 -DMONGOCRYPT_LITTLE_ENDIAN=1 -c /private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/bson/bson-error.c -MMD -MF src/libmongoc/src/libbson/src/bson/bson-error.dep -MT src/libmongoc/src/libbson/src/bson/bson-error.lo -fno-common -DPIC -o src/libmongoc/src/libbson/src/bson/.libs/bson-error.o /private/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/bson/bson-error.c:113:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] ret = strerror_r (err_code, buf, buflen); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [src/libmongoc/src/libbson/src/bson/bson-error.lo] Error 1 ERROR: `make' failed

PHP version 8.2 installing mongodb-1.15.1 or 1.15.0

Dev-WBAP avatar May 02 '24 14:05 Dev-WBAP

I noted this build error was pasted as a comment on CDRIVER-4679 with absolutely no context. The proper course of action would be to submit a bug report and link back to any resolved issues you feel may be related.

This issue omits additional information that is requested in the bug report template. At the very least, your build environment (e.g. OS and MAMP versions) seem relevant to diagnosing this.

Since you found CDRIVER-4679, you should have noted that it was fixed in libmongoc 1.25.0 and 1.24.3. That issue is also linked to PHPC-2263, which was fixed in version 1.16.2 of the PHP driver.

Before submitting any bug report, you should attempt to reproduce the issue in the most recent stable release, which would be 1.18.1 at the time of this writing. And if that is not possible, you should offer an explanation for why you are intentionally using an older version.

Having said that, I expect the build error you're experiencing has long since been fixed. Please attempt to reproduce this on version 1.16.2 or later and report back with your findings.

jmikola avatar May 02 '24 15:05 jmikola