Não é possível compilar o PHP 7.2.2 com o OpenSSL 1.1.0g

3

Então eu vou direto ao assunto.

Eu quero compilar o PHP 7.2.2 no meu Raspberry Pi (v1) com suporte ao OpenSSL. Eu tenho o OpenSSL 1.1.0g instalado com o i compilado.

Saída do uname -a:

Linux 4.4.50+ #1 Tue Mar 7 15:10:58 UTC 2017 armv6l GNU/Linux

(eu só deletei meu nome de host)

Meu comando ./configure que eu uso:

./configure --prefix=/usr --with-openssl=/usr/local --enable-mbstring --with-imap --with-imap-ssl --with-kerberos --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock

E, finalmente, quando eu corro, isso me causa erros:

ext/openssl/.libs/openssl.o: In function 'zm_startup_openssl':
/home/pi/php-7.2.2/ext/openssl/openssl.c:1434: undefined reference to 'OPENSSL_init_ssl'
ext/openssl/.libs/openssl.o: In function 'zm_info_openssl':
/home/pi/php-7.2.2/ext/openssl/openssl.c:1588: undefined reference to 'OpenSSL_version'
ext/openssl/.libs/openssl.o: In function 'php_openssl_asn1_time_to_time_t':
/home/pi/php-7.2.2/ext/openssl/openssl.c:938: undefined reference to 'ASN1_STRING_get0_data'
/home/pi/php-7.2.2/ext/openssl/openssl.c:953: undefined reference to 'ASN1_STRING_get0_data'
/home/pi/php-7.2.2/ext/openssl/openssl.c:953: undefined reference to 'ASN1_STRING_get0_data'
ext/openssl/.libs/openssl.o: In function 'sk_X509_pop':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'php_openssl_is_private_key':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4086: undefined reference to 'EVP_PKEY_get0_EC_KEY'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4049: undefined reference to 'EVP_PKEY_get0_DSA'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4053: undefined reference to 'DSA_get0_pqg'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4058: undefined reference to 'DSA_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4067: undefined reference to 'EVP_PKEY_get0_DH'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4071: undefined reference to 'DH_get0_pqg'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4076: undefined reference to 'DH_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4032: undefined reference to 'EVP_PKEY_get0_RSA'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4036: undefined reference to 'RSA_get0_factors'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_spki_export_challenge':
/home/pi/php-7.2.2/ext/openssl/openssl.c:2070: undefined reference to 'ASN1_STRING_get0_data'
ext/openssl/.libs/openssl.o: In function 'php_openssl_add_assoc_name_entry':
/home/pi/php-7.2.2/ext/openssl/openssl.c:874: undefined reference to 'ASN1_STRING_get0_data'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_x509_parse':
/home/pi/php-7.2.2/ext/openssl/openssl.c:2335: undefined reference to 'X509_get_version'
/home/pi/php-7.2.2/ext/openssl/openssl.c:2362: undefined reference to 'X509_getm_notBefore'
/home/pi/php-7.2.2/ext/openssl/openssl.c:2363: undefined reference to 'X509_getm_notAfter'
/home/pi/php-7.2.2/ext/openssl/openssl.c:2365: undefined reference to 'X509_getm_notBefore'
/home/pi/php-7.2.2/ext/openssl/openssl.c:2366: undefined reference to 'X509_getm_notAfter'
/home/pi/php-7.2.2/ext/openssl/openssl.c:2373: undefined reference to 'X509_get_signature_nid'
ext/openssl/.libs/openssl.o: In function 'sk_GENERAL_NAME_pop_free':
/usr/local/include/openssl/x509v3.h:165: undefined reference to 'OPENSSL_sk_pop_free'
ext/openssl/.libs/openssl.o: In function 'sk_GENERAL_NAME_num':
/usr/local/include/openssl/x509v3.h:165: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_GENERAL_NAME_value':
/usr/local/include/openssl/x509v3.h:165: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'openssl_x509v3_subjectAltName':
/home/pi/php-7.2.2/ext/openssl/openssl.c:2265: undefined reference to 'ASN1_STRING_get0_data'
ext/openssl/.libs/openssl.o: In function 'sk_X509_new_null':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_new_null'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_INFO_free':
/usr/local/include/openssl/x509.h:252: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_INFO_shift':
/usr/local/include/openssl/x509.h:252: undefined reference to 'OPENSSL_sk_shift'
ext/openssl/.libs/openssl.o: In function 'sk_X509_push':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_push'
ext/openssl/.libs/openssl.o: In function 'sk_X509_INFO_num':
/usr/local/include/openssl/x509.h:252: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_pop_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_new_null':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_new_null'
ext/openssl/.libs/openssl.o: In function 'sk_X509_push':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_push'
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_push'
ext/openssl/.libs/openssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_pop':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_csr_get_subject':
/home/pi/php-7.2.2/ext/openssl/openssl.c:3616: undefined reference to 'X509_REQ_get_subject_name'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_pkey_get_details':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4799: undefined reference to 'EVP_PKEY_get0_DH'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4806: undefined reference to 'DH_get0_pqg'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4807: undefined reference to 'DH_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4821: undefined reference to 'EVP_PKEY_get0_EC_KEY'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4830: undefined reference to 'EVP_PKEY_get0_EC_KEY'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4777: undefined reference to 'EVP_PKEY_get0_DSA'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4784: undefined reference to 'DSA_get0_pqg'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4785: undefined reference to 'DSA_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4748: undefined reference to 'EVP_PKEY_get0_RSA'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4755: undefined reference to 'RSA_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4756: undefined reference to 'RSA_get0_factors'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4757: undefined reference to 'RSA_get0_crt_params'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4866: undefined reference to 'EVP_PKEY_get0_EC_KEY'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_dh_compute_key':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4909: undefined reference to 'EVP_PKEY_get0_DH'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_value':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_new_null':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_new_null'
ext/openssl/.libs/openssl.o: In function 'sk_X509_push':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_push'
ext/openssl/.libs/openssl.o: In function 'sk_X509_pop_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop_free'
ext/openssl/.libs/openssl.o: In function 'sk_X509_push':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_push'
ext/openssl/.libs/openssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_value':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'sk_X509_CRL_num':
/usr/local/include/openssl/x509.h:226: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_X509_CRL_value':
/usr/local/include/openssl/x509.h:226: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'sk_X509_pop_free':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop_free'
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop_free'
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_pop_free'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_private_encrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5611: undefined reference to 'EVP_PKEY_get0_RSA'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_private_decrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5673: undefined reference to 'EVP_PKEY_get0_RSA'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_public_encrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5741: undefined reference to 'EVP_PKEY_get0_RSA'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_public_decrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5804: undefined reference to 'EVP_PKEY_get0_RSA'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_sign':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5912: undefined reference to 'EVP_MD_CTX_new'
/home/pi/php-7.2.2/ext/openssl/openssl.c:5927: undefined reference to 'EVP_MD_CTX_free'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_verify':
/home/pi/php-7.2.2/ext/openssl/openssl.c:5979: undefined reference to 'EVP_MD_CTX_new'
/home/pi/php-7.2.2/ext/openssl/openssl.c:5986: undefined reference to 'EVP_MD_CTX_free'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_seal':
/home/pi/php-7.2.2/ext/openssl/openssl.c:6073: undefined reference to 'EVP_CIPHER_CTX_reset'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_digest':
/home/pi/php-7.2.2/ext/openssl/openssl.c:6304: undefined reference to 'EVP_MD_CTX_new'
/home/pi/php-7.2.2/ext/openssl/openssl.c:6327: undefined reference to 'EVP_MD_CTX_free'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_encrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:6623: undefined reference to 'EVP_CIPHER_CTX_reset'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_decrypt':
/home/pi/php-7.2.2/ext/openssl/openssl.c:6710: undefined reference to 'EVP_CIPHER_CTX_reset'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_num':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_value':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_csr_sign':
/home/pi/php-7.2.2/ext/openssl/openssl.c:3447: undefined reference to 'X509_REQ_get_subject_name'
/home/pi/php-7.2.2/ext/openssl/openssl.c:3456: undefined reference to 'X509_getm_notBefore'
/home/pi/php-7.2.2/ext/openssl/openssl.c:3457: undefined reference to 'X509_getm_notAfter'
ext/openssl/.libs/openssl.o: In function 'php_openssl_make_REQ':
/home/pi/php-7.2.2/ext/openssl/openssl.c:3084: undefined reference to 'X509_REQ_get_subject_name'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_num':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_value':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_num':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_num'
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/openssl.o: In function 'sk_CONF_VALUE_value':
/usr/local/include/openssl/conf.h:31: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_and_assign_rsa':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4133: undefined reference to 'RSA_set0_key'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_dsa':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4167: undefined reference to 'DSA_set0_pqg'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4186: undefined reference to 'DSA_get0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4187: undefined reference to 'BN_is_zero'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_dh':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4244: undefined reference to 'DH_set0_pqg'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_and_assign_rsa':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4146: undefined reference to 'RSA_set0_crt_params'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4139: undefined reference to 'RSA_set0_factors'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_dsa':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4174: undefined reference to 'DSA_set0_key'
ext/openssl/.libs/openssl.o: In function 'php_openssl_dh_pub_from_priv':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4221: undefined reference to 'BN_with_flags'
ext/openssl/.libs/openssl.o: In function 'php_openssl_pkey_init_dh':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4258: undefined reference to 'DH_set0_key'
/home/pi/php-7.2.2/ext/openssl/openssl.c:4251: undefined reference to 'DH_set0_key'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_pkey_export_to_file':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4536: undefined reference to 'EVP_PKEY_get0_EC_KEY'
ext/openssl/.libs/openssl.o: In function 'zif_openssl_pkey_export':
/home/pi/php-7.2.2/ext/openssl/openssl.c:4613: undefined reference to 'EVP_PKEY_get0_EC_KEY'
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_create_sni_server_ctx':
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1321: undefined reference to 'TLS_server_method'
ext/openssl/.libs/xp_ssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/xp_ssl.o: In function 'sk_X509_value':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_value'
ext/openssl/.libs/xp_ssl.o: In function 'sk_X509_num':
/usr/local/include/openssl/x509.h:97: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_setup_crypto':
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1571: undefined reference to 'TLS_client_method'
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1625: undefined reference to 'SSL_CTX_set_security_level'
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1651: undefined reference to 'SSL_CTX_set_alpn_select_cb'
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1666: undefined reference to 'SSL_CTX_set_options'
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_set_server_specific_opts':
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1252: undefined reference to 'SSL_CTX_get_options'
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1279: undefined reference to 'SSL_CTX_set_options'
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_setup_crypto':
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1571: undefined reference to 'TLS_server_method'
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:1647: undefined reference to 'SSL_CTX_set_alpn_protos'
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_sockop_set_option':
/home/pi/php-7.2.2/ext/openssl/xp_ssl.c:2365: undefined reference to 'SSL_get0_alpn_selected'
ext/openssl/.libs/xp_ssl.o: In function 'sk_GENERAL_NAME_num':
/usr/local/include/openssl/x509v3.h:165: undefined reference to 'OPENSSL_sk_num'
ext/openssl/.libs/xp_ssl.o: In function 'sk_GENERAL_NAME_value':
/usr/local/include/openssl/x509v3.h:165: undefined reference to 'OPENSSL_sk_value'
ext/phar/.libs/util.o: In function 'phar_verify_signature':
/home/pi/php-7.2.2/ext/phar/util.c:1563: undefined reference to 'EVP_MD_CTX_new'
/home/pi/php-7.2.2/ext/phar/util.c:1595: undefined reference to 'EVP_MD_CTX_free'
/home/pi/php-7.2.2/ext/phar/util.c:1586: undefined reference to 'EVP_MD_CTX_free'
ext/phar/.libs/util.o: In function 'phar_create_signature':
/home/pi/php-7.2.2/ext/phar/util.c:1860: undefined reference to 'EVP_MD_CTX_new'
/home/pi/php-7.2.2/ext/phar/util.c:1892: undefined reference to 'EVP_MD_CTX_free'
collect2: error: ld returned 1 exit status
Makefile:273: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1

É muito longo! O evp.h é onde deveria estar e até vinculei o diretório /usr/local/include/openssl/ a /usr/include/openssl .

Eu cumpri o PHP 7.2.2 com sucesso, mas sem suporte ao OpenSSL ( ./configure' '--prefix=/usr/ )

Eu sei que eu estava tentando de tudo que pude encontrar na internet nos últimos dias.

Então, alguma idéia de como consertar isso? (e por favor não diga ao meu que eu tenho que reinstalar o meu OpenSSL porque quero ficar com 1.1.0g)

    
por MineBartekSA 14.02.2018 / 22:30

0 respostas