Не могу скомпилировать PHP 7.2.2 с OpenSSL 1.1.0g

1156
MineBartekSA

Так что я подойду к делу.

Я хочу скомпилировать PHP 7.2.2 на моем Raspberry Pi (v1) с поддержкой OpenSSL. У меня OpenSSL 1.1.0g установлен с скомпилированным.

Вывод из uname -a:

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

(я только удалил из него свое имя хоста)

Моя команда ./configure, которую я использую:

./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 

И, наконец, когда я запускаю make, он выдает мои ошибки:

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 

Это очень долго! Это evp.hгде это должно быть, и я даже связал /usr/local/include/openssl/каталог с /usr/include/openssl.

Я успешно выполнил PHP 7.2.2, но без поддержки OpenSSL ( ./configure' '--prefix=/usr/)

Вы знаете, я пробовал все, что мог найти в интернете за последние несколько дней.

Так есть идеи, как это исправить? (и, пожалуйста, не говорите мне, что я должен переустановить свой OpenSSL, потому что хочу остаться с 1.1.0g)

3

0 ответов на вопрос

Похожие вопросы