Problemas com as extensões do OpenSSL em Fedora Core 12

Se usam o Fedora Core 12 e tentarem compilar algum programa que use extensões fornecidas pelo OpenSSL, poderão deparar-se com erros como estes :

/usr/src/php-4.4.9/ext/openssl/openssl.c:182: error: expected specifier-qualifier-list before ‘LHASH’
/usr/src/php-4.4.9/ext/openssl/openssl.c:343: error: expected declaration specifiers or ‘…’ before ‘LHASH’
/usr/src/php-4.4.9/ext/openssl/openssl.c: In function ‘php_openssl_config_check_syntax’:
/usr/src/php-4.4.9/ext/openssl/openssl.c:348: error: ‘config’ undeclared (first use in this function)
/usr/src/php-4.4.9/ext/openssl/openssl.c:348: error: (Each undeclared identifier is reported only once
/usr/src/php-4.4.9/ext/openssl/openssl.c:348: error: for each function it appears in.)
/usr/src/php-4.4.9/ext/openssl/openssl.c: In function ‘add_oid_section’:
/usr/src/php-4.4.9/ext/openssl/openssl.c:366: error: ‘struct php_x509_request’ has no member named ‘req_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c:370: error: ‘struct php_x509_request’ has no member named ‘req_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c: In function ‘php_openssl_parse_config’:
/usr/src/php-4.4.9/ext/openssl/openssl.c:416: error: ‘struct php_x509_request’ has no member named ‘config_filename’
/usr/src/php-4.4.9/ext/openssl/openssl.c:416: error: ‘struct php_x509_request’ has no member named ‘config_filename’
/usr/src/php-4.4.9/ext/openssl/openssl.c:417: error: ‘struct php_x509_request’ has no member named ‘section_name’
/usr/src/php-4.4.9/ext/openssl/openssl.c:417: error: ‘struct php_x509_request’ has no member named ‘section_name’
/usr/src/php-4.4.9/ext/openssl/openssl.c:418: error: ‘struct php_x509_request’ has no member named ‘global_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c:419: error: ‘struct php_x509_request’ has no member named ‘req_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c:419: error: ‘struct php_x509_request’ has no member named ‘config_filename’
/usr/src/php-4.4.9/ext/openssl/openssl.c:421: error: ‘struct php_x509_request’ has no member named ‘req_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c:426: error: ‘struct php_x509_request’ has no member named ‘req_config’
/usr/src/php-4.4.9/ext/openssl/openssl.c:437: error: ‘struct php_x509_request’ has no member named ‘digest_name’

No inicio pensei que pudesse estar relacionado  com o facto de estar a tentar compilar uma versão do php bastante antiga provocando alguma incompatibilidade entre com as extensões actuais, mas na verdade existem mais pessoas com o mesmo problema utilizando software mais recente.

A forma de resolver (ainda que temporariamente) o problema foi copiar as extensões de outra máquina, no meu caso um servidor com Fedora Core 9.

Para o caso de alguém precisar, ficam aqui. Basta descomprimir para o directório /usr/include/openssl.

Leave a Reply

Your email address will not be published. Required fields are marked *