Edit report at https://bugs.php.net/bug.php?id=80769&edit=1
ID: 80769
Comment by: UvgdwXcN9V2oxDoaIVT5lYI at protonmail dot ch
Reported by: emmanuel dot fournier at icoleis dot fr
Summary: Undefined symbols for architecture x86_64
Status: Open
Type: Bug
Package: Compile Failure
Operating System: MacOS High Sierra 10.13.6
PHP Version: 8.0.2
Block user comment: N
Private report: N
New Comment:
I am seeing exactly the same problem.
PHP 8.0.3
Libsodium 1.0.18
OS X 11.2.3 (on Intel, not M1)
Libsodium compiled with : ./configure --prefix=/Users/foo/bar/php/build
I am trying to compile PHP using:
env LIBSODIUM_CFLAGS='-I/Users/foo/bar/php/build/include/'
LIBSODIUM_LIBS='-L/Users/foo/bar/php/build/lib/'
DYLD_FALLBACK_LIBRARY_PATH='/Users/foo/bar/php/build/lib' ./configure
--prefix=/Users/bp/Work/php/build --without-libxml --without-sqlite3 --disable-dom --without-iconv
--without-pdo-sqlite --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter
--with-sodium
I get the following:
Undefined symbols for architecture x86_64:
"_crypto_aead_aes256gcm_decrypt", referenced from:
_zif_sodium_crypto_aead_aes256gcm_decrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_aes256gcm_decrypt)
"_crypto_aead_aes256gcm_encrypt", referenced from:
_zif_sodium_crypto_aead_aes256gcm_encrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_aes256gcm_encrypt)
"_crypto_aead_aes256gcm_is_available", referenced from:
_zif_sodium_crypto_aead_aes256gcm_is_available in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_aes256gcm_is_available)
"_crypto_aead_chacha20poly1305_decrypt", referenced from:
_zif_sodium_crypto_aead_chacha20poly1305_decrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_chacha20poly1305_decrypt)
"_crypto_aead_chacha20poly1305_encrypt", referenced from:
_zif_sodium_crypto_aead_chacha20poly1305_encrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_chacha20poly1305_encrypt)
"_crypto_aead_chacha20poly1305_ietf_decrypt", referenced from:
_zif_sodium_crypto_aead_chacha20poly1305_ietf_decrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_chacha20poly1305_ietf_decrypt)
"_crypto_aead_chacha20poly1305_ietf_encrypt", referenced from:
_zif_sodium_crypto_aead_chacha20poly1305_ietf_encrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_chacha20poly1305_ietf_encrypt)
"_crypto_aead_xchacha20poly1305_ietf_decrypt", referenced from:
_zif_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt)
"_crypto_aead_xchacha20poly1305_ietf_encrypt", referenced from:
_zif_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt in libsodium.o
(maybe you meant: _zif_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt)
"_crypto_auth", referenced from:
_zif_sodium_crypto_auth in libsodium.o
(maybe you meant: _zif_sodium_crypto_auth, _zif_sodium_crypto_auth_keygen ,
_zif_sodium_crypto_auth_verify )
"_crypto_auth_verify", referenced from:
_zif_sodium_crypto_auth_verify in libsodium.o
(maybe you meant: _zif_sodium_crypto_auth_verify)
"_crypto_box_easy", referenced from:
_zif_sodium_crypto_box in libsodium.o
"_crypto_box_keypair", referenced from:
_zif_sodium_crypto_box_keypair in libsodium.o
(maybe you meant: _zif_sodium_crypto_box_keypair_from_secretkey_and_publickey,
_zif_sodium_crypto_box_keypair )
"_crypto_box_open_easy", referenced from:
_zif_sodium_crypto_box_open in libsodium.o
"_crypto_box_seal", referenced from:
_zif_sodium_crypto_box_seal in libsodium.o
(maybe you meant: _zif_sodium_crypto_box_seal_open, _zif_sodium_crypto_box_seal )
"_crypto_box_seal_open", referenced from:
_zif_sodium_crypto_box_seal_open in libsodium.o
(maybe you meant: _zif_sodium_crypto_box_seal_open)
"_crypto_box_seed_keypair", referenced from:
_zif_sodium_crypto_box_seed_keypair in libsodium.o
(maybe you meant: _zif_sodium_crypto_box_seed_keypair)
"_crypto_generichash", referenced from:
_zif_sodium_crypto_generichash in libsodium.o
_zif_sodium_crypto_kx_seed_keypair in libsodium.o
(maybe you meant: _zif_sodium_crypto_generichash_init, _zif_sodium_crypto_generichash ,
_zif_sodium_crypto_generichash_keygen , _zif_sodium_crypto_generichash_update ,
_zif_sodium_crypto_generichash_final )
"_crypto_generichash_final", referenced from:
_zif_sodium_crypto_generichash_final in libsodium.o
_zif_sodium_crypto_kx_client_session_keys in libsodium.o
_zif_sodium_crypto_kx_server_session_keys in libsodium.o
(maybe you meant: _zif_sodium_crypto_generichash_final)
"_crypto_generichash_init", referenced from:
_zif_sodium_crypto_generichash_init in libsodium.o
_zif_sodium_crypto_kx_client_session_keys in libsodium.o
_zif_sodium_crypto_kx_server_session_keys in libsodium.o
(maybe you meant: _zif_sodium_crypto_generichash_init)
"_crypto_generichash_update", referenced from:
_zif_sodium_crypto_generichash_update in libsodium.o
_zif_sodium_crypto_kx_client_session_keys in libsodium.o
_zif_sodium_crypto_kx_server_session_keys in libsodium.o
(maybe you meant: _zif_sodium_crypto_generichash_update)
"_crypto_kdf_derive_from_key", referenced from:
_zif_sodium_crypto_kdf_derive_from_key in libsodium.o
(maybe you meant: _zif_sodium_crypto_kdf_derive_from_key)
"_crypto_pwhash", referenced from:
_zif_sodium_crypto_pwhash in libsodium.o
(maybe you meant: _zif_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify,
_zif_sodium_crypto_pwhash_str_verify , _zif_sodium_crypto_pwhash_str_needs_rehash ,
_zif_sodium_crypto_pwhash_scryptsalsa208sha256 , _zif_sodium_crypto_pwhash ,
_zif_sodium_crypto_pwhash_scryptsalsa208sha256_str , _zif_sodium_crypto_pwhash_str )
"_crypto_pwhash_argon2id", referenced from:
_zif_sodium_crypto_pwhash in libsodium.o
"_crypto_pwhash_memlimit_interactive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_memlimit_moderate", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_memlimit_sensitive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_opslimit_interactive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_opslimit_moderate", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_opslimit_sensitive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_scryptsalsa208sha256", referenced from:
_zif_sodium_crypto_pwhash_scryptsalsa208sha256 in libsodium.o
(maybe you meant: _zif_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify,
_zif_sodium_crypto_pwhash_scryptsalsa208sha256 , _zif_sodium_crypto_pwhash_scryptsalsa208sha256_str
)
"_crypto_pwhash_scryptsalsa208sha256_memlimit_interactive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_scryptsalsa208sha256_opslimit_interactive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive", referenced from:
_zm_startup_sodium in libsodium.o
"_crypto_pwhash_scryptsalsa208sha256_str", referenced from:
_zif_sodium_crypto_pwhash_scryptsalsa208sha256_str in libsodium.o
(maybe you meant: _zif_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify,
_zif_sodium_crypto_pwhash_scryptsalsa208sha256_str )
"_crypto_pwhash_scryptsalsa208sha256_str_verify", referenced from:
_zif_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify in libsodium.o
(maybe you meant: _zif_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify)
"_crypto_pwhash_str", referenced from:
_zif_sodium_crypto_pwhash_str in libsodium.o
(maybe you meant: _zif_sodium_crypto_pwhash_str_verify,
_zif_sodium_crypto_pwhash_str_needs_rehash , _zif_sodium_crypto_pwhash_str )
"_crypto_pwhash_str_alg", referenced from:
_php_sodium_argon2_hash in sodium_pwhash.o
"_crypto_pwhash_str_needs_rehash", referenced from:
_zif_sodium_crypto_pwhash_str_needs_rehash in libsodium.o
_php_sodium_argon2_needs_rehash in sodium_pwhash.o
(maybe you meant: _zif_sodium_crypto_pwhash_str_needs_rehash)
"_crypto_pwhash_str_verify", referenced from:
_zif_sodium_crypto_pwhash_str_verify in libsodium.o
_php_sodium_argon2_verify in sodium_pwhash.o
(maybe you meant: _zif_sodium_crypto_pwhash_str_verify)
"_crypto_scalarmult", referenced from:
_zif_sodium_crypto_scalarmult in libsodium.o
_zif_sodium_crypto_kx_client_session_keys in libsodium.o
_zif_sodium_crypto_kx_server_session_keys in libsodium.o
(maybe you meant: _zif_sodium_crypto_scalarmult)
"_crypto_scalarmult_base", referenced from:
_zif_sodium_crypto_box_publickey_from_secretkey in libsodium.o
_zif_sodium_crypto_kx_seed_keypair in libsodium.o
_zif_sodium_crypto_kx_keypair in libsodium.o
"_crypto_secretbox_easy", referenced from:
_zif_sodium_crypto_secretbox in libsodium.o
"_crypto_secretbox_open_easy", referenced from:
_zif_sodium_crypto_secretbox_open in libsodium.o
"_crypto_secretstream_xchacha20poly1305_init_pull", referenced from:
_zif_sodium_crypto_secretstream_xchacha20poly1305_init_pull in libsodium.o
(maybe you meant: _zif_sodium_crypto_secretstream_xchacha20poly1305_init_pull)
"_crypto_secretstream_xchacha20poly1305_init_push", referenced from:
_zif_sodium_crypto_secretstream_xchacha20poly1305_init_push in libsodium.o
(maybe you meant: _zif_sodium_crypto_secretstream_xchacha20poly1305_init_push)
"_crypto_secretstream_xchacha20poly1305_pull", referenced from:
_zif_sodium_crypto_secretstream_xchacha20poly1305_pull in libsodium.o
(maybe you meant: _zif_sodium_crypto_secretstream_xchacha20poly1305_pull)
"_crypto_secretstream_xchacha20poly1305_push", referenced from:
_zif_sodium_crypto_secretstream_xchacha20poly1305_push in libsodium.o
(maybe you meant: _zif_sodium_crypto_secretstream_xchacha20poly1305_push)
"_crypto_secretstream_xchacha20poly1305_rekey", referenced from:
_zif_sodium_crypto_secretstream_xchacha20poly1305_rekey in libsodium.o
(maybe you meant: _zif_sodium_crypto_secretstream_xchacha20poly1305_rekey)
"_crypto_shorthash", referenced from:
_zif_sodium_crypto_shorthash in libsodium.o
(maybe you meant: _zif_sodium_crypto_shorthash_keygen, _zif_sodium_crypto_shorthash )
"_crypto_sign", referenced from:
_zif_sodium_crypto_sign in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_keypair_from_secretkey_and_publickey,
_zif_sodium_crypto_sign_ed25519_pk_to_curve25519 , _zif_sodium_crypto_sign_ed25519_sk_to_curve25519
, _zif_sodium_crypto_sign_open , _zif_sodium_crypto_sign , _zif_sodium_crypto_sign_seed_keypair ,
_zif_sodium_crypto_sign_keypair , _zif_sodium_crypto_sign_detached ,
_zif_sodium_crypto_sign_verify_detached , _zif_sodium_crypto_sign_publickey ,
_zif_sodium_crypto_sign_secretkey , _zif_sodium_crypto_sign_publickey_from_secretkey )
"_crypto_sign_detached", referenced from:
_zif_sodium_crypto_sign_detached in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_detached)
"_crypto_sign_ed25519_pk_to_curve25519", referenced from:
_zif_sodium_crypto_sign_ed25519_pk_to_curve25519 in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_ed25519_pk_to_curve25519)
"_crypto_sign_ed25519_sk_to_curve25519", referenced from:
_zif_sodium_crypto_sign_ed25519_sk_to_curve25519 in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_ed25519_sk_to_curve25519)
"_crypto_sign_ed25519_sk_to_pk", referenced from:
_zif_sodium_crypto_sign_publickey_from_secretkey in libsodium.o
"_crypto_sign_keypair", referenced from:
_zif_sodium_crypto_sign_keypair in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_keypair_from_secretkey_and_publickey,
_zif_sodium_crypto_sign_keypair )
"_crypto_sign_open", referenced from:
_zif_sodium_crypto_sign_open in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_open)
"_crypto_sign_seed_keypair", referenced from:
_zif_sodium_crypto_sign_seed_keypair in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_seed_keypair)
"_crypto_sign_verify_detached", referenced from:
_zif_sodium_crypto_sign_verify_detached in libsodium.o
(maybe you meant: _zif_sodium_crypto_sign_verify_detached)
"_crypto_stream", referenced from:
_zif_sodium_crypto_stream in libsodium.o
(maybe you meant: _zif_sodium_crypto_stream_keygen, _zif_sodium_crypto_stream_xor ,
_zif_sodium_crypto_stream )
"_crypto_stream_xor", referenced from:
_zif_sodium_crypto_stream_xor in libsodium.o
(maybe you meant: _zif_sodium_crypto_stream_xor)
"_randombytes_buf", referenced from:
_zif_sodium_crypto_kx_keypair in libsodium.o
_zif_sodium_crypto_aead_aes256gcm_keygen in libsodium.o
_zif_sodium_crypto_aead_chacha20poly1305_keygen in libsodium.o
_zif_sodium_crypto_aead_chacha20poly1305_ietf_keygen in libsodium.o
_zif_sodium_crypto_aead_xchacha20poly1305_ietf_keygen in libsodium.o
_zif_sodium_crypto_auth_keygen in libsodium.o
_zif_sodium_crypto_generichash_keygen in libsodium.o
...
"_randombytes_close", referenced from:
_zm_shutdown_sodium in libsodium.o
"_sodium_add", referenced from:
_zif_sodium_add in libsodium.o
(maybe you meant: _zif_sodium_add)
"_sodium_base642bin", referenced from:
_zif_sodium_base642bin in libsodium.o
(maybe you meant: _zif_sodium_base642bin)
"_sodium_bin2base64", referenced from:
_zif_sodium_bin2base64 in libsodium.o
(maybe you meant: _zif_sodium_bin2base64)
"_sodium_bin2hex", referenced from:
_zif_sodium_bin2hex in libsodium.o
(maybe you meant: _zif_sodium_bin2hex)
"_sodium_compare", referenced from:
_zif_sodium_compare in libsodium.o
(maybe you meant: _zif_sodium_compare)
"_sodium_hex2bin", referenced from:
_zif_sodium_hex2bin in libsodium.o
(maybe you meant: _zif_sodium_hex2bin)
"_sodium_increment", referenced from:
_zif_sodium_increment in libsodium.o
(maybe you meant: _zif_sodium_increment)
"_sodium_init", referenced from:
_zm_startup_sodium in libsodium.o
"_sodium_library_version_major", referenced from:
_zm_startup_sodium in libsodium.o
"_sodium_library_version_minor", referenced from:
_zm_startup_sodium in libsodium.o
"_sodium_memcmp", referenced from:
_zif_sodium_memcmp in libsodium.o
(maybe you meant: _zif_sodium_memcmp)
"_sodium_memzero", referenced from:
_zif_sodium_memzero in libsodium.o
_zif_sodium_crypto_generichash_init in libsodium.o
_zif_sodium_crypto_generichash_update in libsodium.o
_zif_sodium_crypto_generichash_final in libsodium.o
_zif_sodium_crypto_kx_client_session_keys in libsodium.o
_zif_sodium_crypto_kx_server_session_keys in libsodium.o
(maybe you meant: _zif_sodium_memzero)
"_sodium_pad", referenced from:
_zif_sodium_pad in libsodium.o
(maybe you meant: _zif_sodium_pad)
"_sodium_unpad", referenced from:
_zif_sodium_unpad in libsodium.o
(maybe you meant: _zif_sodium_unpad)
"_sodium_version_string", referenced from:
_zm_startup_sodium in libsodium.o
_zm_info_sodium in libsodium.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Previous Comments:
------------------------------------------------------------------------
[2021-03-22 23:14:50] emmanuel dot fournier at free dot fr
Is there anybody here ?
------------------------------------------------------------------------
[2021-03-08 16:53:19] emmanuel dot fournier at free dot fr
With the last version 8.0.3, i've the same make error :
---
Undefined symbols for architecture x86_64:
"_php_addslashes", referenced from:
_php_filter_add_slashes in sanitizing_filters.o
_zif_addslashes in string.o
_zif_stream_socket_client in streamsfuncs.o
(maybe you meant: _php_addslashes_default, _php_addslashes_sse42 )
"_php_base64_decode_ex", referenced from:
_to_zval_base64 in php_encoding.o
_zif_base64_decode in base64.o
_php_handle_auth_data in main.o
_php_stream_url_wrap_rfc2397 in memory.o
(maybe you meant: _php_base64_decode_ex_avx2, _php_base64_decode_ex_default ,
_php_base64_decode_ex_ssse3 )
"_php_base64_encode", referenced from:
_to_xml_base64 in php_encoding.o
_proxy_authentication in php_http.o
_basic_authentication in php_http.o
_make_http_soap_request in php_http.o
_zif_base64_encode in base64.o
_php_stream_url_wrap_http_ex in http_fopen_wrapper.o
_php_password_bcrypt_hash in password.o
...
(maybe you meant: _php_base64_encode_default, _php_base64_encode_ssse3 ,
_php_base64_encode_avx2 )
"_php_stripslashes", referenced from:
_zif_stripslashes in string.o
(maybe you meant: _php_stripslashes_sse42, _php_stripslashes_default )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp.bundle] Error 1
---
If someone understand why this error block the compilation ?!
------------------------------------------------------------------------
[2021-02-21 12:20:44] dc dot link at yahoo dot fr
It works even tough not necessarily directly. It is possible to take inspiration from homebrew for
example https://github.com/Homebrew/homebrew-core/blob/master/Formula/php.rb
; I personally use a script to set all environment variables before build.
------------------------------------------------------------------------
[2021-02-19 09:48:09] emmanuel dot fournier at free dot fr
No no, you're welcome ;-)
i use a MacBook Pro mi-2010
with 2,4 GHz Intel Core 2 Duo (P8600).
Yes, why the linker say :
(maybe you meant: _php_addslashes_default, _php_addslashes_sse42 )
Like the compil create sse42, avx2, ssse3 functions versions ?
------------------------------------------------------------------------
[2021-02-19 07:58:25] dc dot link at yahoo dot fr
Just out of curiosity, is it a Mac M1 (ARM64) ?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80769
--
Edit this bug report at https://bugs.php.net/bug.php?id=80769&edit=1