Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build failing on macOS - zend_config.h is missing #17555

Open
matronator opened this issue Jan 24, 2025 · 3 comments
Open

Build failing on macOS - zend_config.h is missing #17555

matronator opened this issue Jan 24, 2025 · 3 comments

Comments

@matronator
Copy link

Description

I tried building from source, but it fails with this error:

make: *** No rule to make target `/Users/matronator/Downloads/php-8.4.3/Zend/zend_config.h', needed by `ext/opcache/shared_alloc_mmap.lo'.  Stop.

Why is the file missing?

PHP Version

8.4.3

Operating System

macOS 11

@iluuu1994
Copy link
Member

This file is generated by the build system. Try a full rebuild. I.e. make distclean, followed by ./buildconf --force, ./configure --enable-debug <your flags>, make -j<your cores>, etc.

@matronator
Copy link
Author

matronator commented Jan 26, 2025

Thanks! Now make crashes on OpenSSL it seems like.

Here's the output:

Undefined symbols for architecture x86_64:
  "_EC_GROUP_check_named_curve", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
  "_EVP_CIPHER_CTX_get_block_size", referenced from:
      _zif_openssl_seal in openssl.o
  "_EVP_CIPHER_do_all_provided", referenced from:
      _zif_openssl_get_cipher_methods in openssl.o
  "_EVP_CIPHER_get0_name", referenced from:
      _php_openssl_add_cipher in openssl.o
  "_EVP_CIPHER_get_block_size", referenced from:
      _php_openssl_cipher_update in openssl.o
  "_EVP_CIPHER_get_iv_length", referenced from:
      _zif_openssl_seal in openssl.o
      _zif_openssl_open in openssl.o
      _php_openssl_cipher_init in openssl.o
      _php_openssl_cipher_iv_length in openssl.o
  "_EVP_CIPHER_get_key_length", referenced from:
      _php_openssl_cipher_init in openssl.o
      _php_openssl_cipher_key_length in openssl.o
  "_EVP_CIPHER_get_mode", referenced from:
      _php_openssl_load_cipher_mode in openssl.o
  "_EVP_CIPHER_get_nid", referenced from:
      _php_openssl_load_cipher_mode in openssl.o
  "_EVP_CIPHER_names_do_all", referenced from:
      _php_openssl_add_cipher_or_alias in openssl.o
  "_EVP_MD_get_size", referenced from:
      _zif_openssl_digest in openssl.o
  "_EVP_PKEY_CTX_set_dh_paramgen_prime_len", referenced from:
      _php_openssl_generate_private_key in openssl.o
  "_EVP_PKEY_CTX_set_dsa_paramgen_bits", referenced from:
      _php_openssl_generate_private_key in openssl.o
  "_EVP_PKEY_CTX_set_ec_param_enc", referenced from:
      _php_openssl_generate_private_key in openssl.o
  "_EVP_PKEY_CTX_set_ec_paramgen_curve_nid", referenced from:
      _php_openssl_generate_private_key in openssl.o
  "_EVP_PKEY_CTX_set_params", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
  "_EVP_PKEY_CTX_set_rsa_keygen_bits", referenced from:
      _php_openssl_generate_private_key in openssl.o
  "_EVP_PKEY_CTX_set_rsa_padding", referenced from:
      _zif_openssl_private_encrypt in openssl.o
      _zif_openssl_private_decrypt in openssl.o
      _zif_openssl_public_encrypt in openssl.o
      _zif_openssl_public_decrypt in openssl.o
      _mysqlnd_caching_sha2_public_encrypt in mysqlnd_auth.o
      _mysqlnd_sha256_public_encrypt in mysqlnd_auth.o
  "_EVP_PKEY_fromdata", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_EVP_PKEY_fromdata_init", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_EVP_PKEY_generate", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
  "_EVP_PKEY_get0_type_name", referenced from:
      _zif_openssl_pkey_get_details in openssl.o
  "_EVP_PKEY_get_base_id", referenced from:
      _zif_openssl_pkey_get_details in openssl.o
      _zif_openssl_dh_compute_key in openssl.o
  "_EVP_PKEY_get_bits", referenced from:
      _zif_openssl_pkey_get_details in openssl.o
  "_EVP_PKEY_get_bn_param", referenced from:
      _php_openssl_copy_bn_param in openssl.o
  "_EVP_PKEY_get_id", referenced from:
      _zif_openssl_pkey_get_details in openssl.o
  "_EVP_PKEY_get_octet_string_param", referenced from:
      _php_openssl_copy_octet_string_param in openssl.o
  "_EVP_PKEY_get_size", referenced from:
      _zif_openssl_seal in openssl.o
      _phar_create_signature in util.o
      _mysqlnd_caching_sha2_public_encrypt in mysqlnd_auth.o
      _mysqlnd_sha256_public_encrypt in mysqlnd_auth.o
  "_EVP_PKEY_get_utf8_string_param", referenced from:
      _php_openssl_get_utf8_param in openssl.o
  "_EVP_PKEY_public_check_quick", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
  "_EVP_PKEY_set1_encoded_public_key", referenced from:
      _php_openssl_dh_compute_key in openssl.o
  "_OSSL_PARAM_BLD_free", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_OSSL_PARAM_BLD_new", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_OSSL_PARAM_BLD_push_BN", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
  "_OSSL_PARAM_BLD_push_octet_string", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_OSSL_PARAM_BLD_push_utf8_string", referenced from:
      _php_openssl_pkey_init_ec in openssl.o
  "_OSSL_PARAM_BLD_to_param", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_OSSL_PARAM_free", referenced from:
      _php_openssl_pkey_init_rsa in openssl.o
      _php_openssl_pkey_init_dsa in openssl.o
      _php_openssl_pkey_init_dh in openssl.o
      _php_openssl_pkey_init_ec in openssl.o
      _php_openssl_pkey_object_curve_25519_448 in openssl.o
  "_SSL_CTX_set0_tmp_dh_pkey", referenced from:
      _php_openssl_set_server_dh_param in xp_ssl.o
  "_SSL_get1_peer_certificate", referenced from:
      _php_openssl_enable_crypto in xp_ssl.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....

@cmb69
Copy link
Member

cmb69 commented Jan 26, 2025

./configure uses pkg-config to find the OpenSSL installation, but there appears to be an issue with that. Check config.log for relevant messages. Also, which OpenSSL version do you use, and what are the contents of openssl.pc?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants