Lors de la construction de PHP 7.4 avec les options de configuration --with-openssl
et --with-pgsql
, le bundle OS et OpenSSL installés dans la version source ne doivent pas coexister si les versions majeures et mineures sont les mêmes. ..
--CentOS Linux version 8.2.2004 (Core) ... Utilisation de GCP Compute Engine --OpenSSL 1.1.1c FIPS 28 mai 2019 ... bundle OS, installé par défaut
Je veux installer le dernier OpenSSL (1.1.1h à ce moment-là), construire et installer comme suit
$ sudo dnf install wget
$ wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz
$ tar zxvf openssl-1.1.1h.tar.gz
$ cd openssl-1.1.1h/
$ sudo dnf install perl gcc
$ ./config -fPIC shared --prefix=/usr/local/openssl --openssldir=/usr/local/ssl
$ make
$ make test
$ sudo make install
De plus, bien que omis ici, Apache 2.4.46 est également construit et installé. Voici les packages installés à ce moment-là
$ sudo dnf install bzip2 expat-devel pcre-devel
$ sudo dnf install libxml2-devel sqlite-devel oniguruma-devel libpq-devel
$ wget https://www.php.net/distributions/php-7.4.12.tar.bz2
$ tar xvf php-7.4.12.tar.bz2
$ cd php-7.4.12
$ ./configure \
--with-config-file-path=/etc/php7 \
--enable-mbstring \
--with-apxs2=/usr/local/apache2.4/bin/apxs \
--with-pgsql \
--with-zlib-dir \
--disable-ipv6 \
--with-openssl \
OPENSSL_CFLAGS=-I/usr/local/openssl/include \
OPENSSL_LIBS=-L/usr/local/openssl/lib
$ make
A rencontré l'erreur suivante
/usr/local/src/php-7.4.12/ext/pgsql/pgsql.c: In function ‘zif_pg_last_oid’:
/usr/local/src/php-7.4.12/ext/pgsql/pgsql.c:3143:27: error: assignment to expression with array type
Z_STRVAL_P(return_value) = (char *) PQoidStatus(pgsql_result);
^
・
・
/usr/local/src/php-7.4.12/ext/pgsql/pgsql.c: In function ‘zif_pg_copy_to’:
/usr/local/src/php-7.4.12/ext/pgsql/pgsql.c:4174:11: error: ‘ret’ undeclared (first use in this function); did you mean ‘recv’?
if ((ret = PQgetline(pgsql, copybuf, COPYBUFSIZ))) {
^~~
recv
・
・
make: *** [Makefile:1101: ext/pgsql/pgsql.lo] Error 1
Je pensais qu'il y avait un problème avec la source, mais je ne pouvais pas le reproduire même si j'effectuais la même procédure dans l'environnement suivant.
--CentOS Linux version 7.8.2003 (Core) ... Utilisation de GCP Compute Engine --OpenSSL 1.0.2k-fips 26 janvier 2017 ... bundle OS, installé par défaut
Une fois interprété comme s'il était dû à une version différente de gcc
En étudiant la solution de contournement, je suis tombé sur le site suivant
J'ai essayé de construire différentes versions de GCC sur CentOS 8-Qiita
Selon ces informations, la spécification par défaut de la norme de langage diffère selon la version de gcc. Immédiatement, essayez de reconstruire avec -std = gnu89, qui était la spécification par défaut dans gcc 4.8.5
$ ./configure \
--with-config-file-path=/etc/php7 \
--enable-mbstring \
--with-apxs2=/usr/local/apache2.4/bin/apxs \
--with-pgsql \
--with-zlib-dir \
--disable-ipv6 \
--with-openssl \
OPENSSL_CFLAGS=-I/usr/local/openssl/include \
OPENSSL_LIBS=-L/usr/local/openssl/lib \
CFLAGS="-std=gnu89"
$ make
Cependant, la même erreur s'affiche et ne peut pas être résolue ... J'ai pensé construire et installer la même version de gcc que CentOS7, mais j'ai senti que ce n'était pas une solution fondamentale, j'ai donc corrigé l'erreur et l'ai reconstruite ...
Bien que l'erreur affichée sur le premier mur n'apparaisse plus, j'ai rencontré l'erreur suivante
/usr/bin/ld: ext/openssl/.libs/xp_ssl.o: undefined reference to symbol 'SSL_select_next_proto@@OPENSSL_1_1_0'
//usr/local/openssl/lib/libssl.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:268: sapi/cli/php] Error 1
?? Ci-dessous, la commande avec l'erreur
/bin/sh /usr/local/src/php-7.4.12/libtool --silent --preserve-dup-deps --mode=link cc -export-dynamic -I/usr/include -g -O2 -fvisibility=hidden -Wall -Wno-strict-aliasing -DZEND_SIGNALS -L/usr/local/openssl/lib -L/usr/lib64 -R /usr/local/openssl/lib -R /usr/lib64 ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/date/lib/parse_iso_intervals.lo ext/date/lib/interval.lo ext/libxml/libxml.lo ext/openssl/openssl.lo ext/openssl/xp_ssl.lo ext/pcre/pcre2lib/pcre2_auto_possess.lo ext/pcre/pcre2lib/pcre2_chartables.lo ext/pcre/pcre2lib/pcre2_compile.lo ext/pcre/pcre2lib/pcre2_config.lo ext/pcre/pcre2lib/pcre2_context.lo ext/pcre/pcre2lib/pcre2_dfa_match.lo ext/pcre/pcre2lib/pcre2_error.lo ext/pcre/pcre2lib/pcre2_jit_compile.lo ext/pcre/pcre2lib/pcre2_maketables.lo ext/pcre/pcre2lib/pcre2_match.lo ext/pcre/pcre2lib/pcre2_match_data.lo ext/pcre/pcre2lib/pcre2_newline.lo ext/pcre/pcre2lib/pcre2_ord2utf.lo ext/pcre/pcre2lib/pcre2_pattern_info.lo ext/pcre/pcre2lib/pcre2_serialize.lo ext/pcre/pcre2lib/pcre2_string_utils.lo ext/pcre/pcre2lib/pcre2_study.lo ext/pcre/pcre2lib/pcre2_substitute.lo ext/pcre/pcre2lib/pcre2_substring.lo ext/pcre/pcre2lib/pcre2_tables.lo ext/pcre/pcre2lib/pcre2_ucd.lo ext/pcre/pcre2lib/pcre2_valid_utf.lo ext/pcre/pcre2lib/pcre2_xclass.lo ext/pcre/pcre2lib/pcre2_find_bracket.lo ext/pcre/pcre2lib/pcre2_convert.lo ext/pcre/pcre2lib/pcre2_extuni.lo ext/pcre/pcre2lib/pcre2_script_run.lo ext/pcre/php_pcre.lo ext/sqlite3/sqlite3.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/fileinfo/fileinfo.lo ext/fileinfo/libmagic/apprentice.lo ext/fileinfo/libmagic/apptype.lo ext/fileinfo/libmagic/ascmagic.lo ext/fileinfo/libmagic/cdf.lo ext/fileinfo/libmagic/cdf_time.lo ext/fileinfo/libmagic/compress.lo ext/fileinfo/libmagic/encoding.lo ext/fileinfo/libmagic/fsmagic.lo ext/fileinfo/libmagic/funcs.lo ext/fileinfo/libmagic/is_json.lo ext/fileinfo/libmagic/is_tar.lo ext/fileinfo/libmagic/magic.lo ext/fileinfo/libmagic/print.lo ext/fileinfo/libmagic/readcdf.lo ext/fileinfo/libmagic/softmagic.lo ext/fileinfo/libmagic/der.lo ext/fileinfo/libmagic/buffer.lo ext/filter/filter.lo ext/filter/sanitizing_filters.lo ext/filter/logical_filters.lo ext/filter/callback_filter.lo ext/hash/hash.lo ext/hash/hash_md.lo ext/hash/hash_sha.lo ext/hash/hash_ripemd.lo ext/hash/hash_haval.lo ext/hash/hash_tiger.lo ext/hash/hash_gost.lo ext/hash/hash_snefru.lo ext/hash/hash_whirlpool.lo ext/hash/hash_adler32.lo ext/hash/hash_crc32.lo ext/hash/hash_fnv.lo ext/hash/hash_joaat.lo ext/hash/sha3/generic64lc/KeccakP-1600-opt64.lo ext/hash/sha3/generic64lc/KeccakHash.lo ext/hash/sha3/generic64lc/KeccakSponge.lo ext/hash/hash_sha3.lo ext/iconv/iconv.lo ext/json/json.lo ext/json/json_encoder.lo ext/json/json_parser.lo ext/json/json_scanner.lo ext/mbstring/mbstring.lo ext/mbstring/php_unicode.lo ext/mbstring/mb_gpc.lo ext/mbstring/php_mbregex.lo ext/mbstring/libmbfl/filters/html_entities.lo ext/mbstring/libmbfl/filters/mbfilter_7bit.lo ext/mbstring/libmbfl/filters/mbfilter_ascii.lo ext/mbstring/libmbfl/filters/mbfilter_base64.lo ext/mbstring/libmbfl/filters/mbfilter_big5.lo ext/mbstring/libmbfl/filters/mbfilter_byte2.lo ext/mbstring/libmbfl/filters/mbfilter_byte4.lo ext/mbstring/libmbfl/filters/mbfilter_cp1251.lo ext/mbstring/libmbfl/filters/mbfilter_cp1252.lo ext/mbstring/libmbfl/filters/mbfilter_cp1254.lo ext/mbstring/libmbfl/filters/mbfilter_cp5022x.lo ext/mbstring/libmbfl/filters/mbfilter_cp51932.lo ext/mbstring/libmbfl/filters/mbfilter_cp850.lo ext/mbstring/libmbfl/filters/mbfilter_cp866.lo ext/mbstring/libmbfl/filters/mbfilter_cp932.lo ext/mbstring/libmbfl/filters/mbfilter_cp936.lo ext/mbstring/libmbfl/filters/mbfilter_gb18030.lo ext/mbstring/libmbfl/filters/mbfilter_euc_cn.lo ext/mbstring/libmbfl/filters/mbfilter_euc_jp.lo ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.lo ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.lo ext/mbstring/libmbfl/filters/mbfilter_euc_kr.lo ext/mbstring/libmbfl/filters/mbfilter_euc_tw.lo ext/mbstring/libmbfl/filters/mbfilter_htmlent.lo ext/mbstring/libmbfl/filters/mbfilter_hz.lo ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.lo ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.lo ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.lo ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.lo ext/mbstring/libmbfl/filters/mbfilter_jis.lo ext/mbstring/libmbfl/filters/mbfilter_koi8r.lo ext/mbstring/libmbfl/filters/mbfilter_armscii8.lo ext/mbstring/libmbfl/filters/mbfilter_qprint.lo ext/mbstring/libmbfl/filters/mbfilter_sjis.lo ext/mbstring/libmbfl/filters/mbfilter_sjis_open.lo ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.lo ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.lo ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.lo ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.lo ext/mbstring/libmbfl/filters/mbfilter_ucs2.lo ext/mbstring/libmbfl/filters/mbfilter_ucs4.lo ext/mbstring/libmbfl/filters/mbfilter_uhc.lo ext/mbstring/libmbfl/filters/mbfilter_utf16.lo ext/mbstring/libmbfl/filters/mbfilter_utf32.lo ext/mbstring/libmbfl/filters/mbfilter_utf7.lo ext/mbstring/libmbfl/filters/mbfilter_utf7imap.lo ext/mbstring/libmbfl/filters/mbfilter_utf8.lo ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.lo ext/mbstring/libmbfl/filters/mbfilter_uuencode.lo ext/mbstring/libmbfl/filters/mbfilter_koi8u.lo ext/mbstring/libmbfl/mbfl/mbfilter.lo ext/mbstring/libmbfl/mbfl/mbfilter_8bit.lo ext/mbstring/libmbfl/mbfl/mbfilter_pass.lo ext/mbstring/libmbfl/mbfl/mbfilter_wchar.lo ext/mbstring/libmbfl/mbfl/mbfl_convert.lo ext/mbstring/libmbfl/mbfl/mbfl_encoding.lo ext/mbstring/libmbfl/mbfl/mbfl_filter_output.lo ext/mbstring/libmbfl/mbfl/mbfl_ident.lo ext/mbstring/libmbfl/mbfl/mbfl_language.lo ext/mbstring/libmbfl/mbfl/mbfl_memory_device.lo ext/mbstring/libmbfl/mbfl/mbfl_string.lo ext/mbstring/libmbfl/mbfl/mbfl_allocators.lo ext/mbstring/libmbfl/nls/nls_de.lo ext/mbstring/libmbfl/nls/nls_en.lo ext/mbstring/libmbfl/nls/nls_ja.lo ext/mbstring/libmbfl/nls/nls_kr.lo ext/mbstring/libmbfl/nls/nls_neutral.lo ext/mbstring/libmbfl/nls/nls_ru.lo ext/mbstring/libmbfl/nls/nls_uni.lo ext/mbstring/libmbfl/nls/nls_zh.lo ext/mbstring/libmbfl/nls/nls_hy.lo ext/mbstring/libmbfl/nls/nls_tr.lo ext/mbstring/libmbfl/nls/nls_ua.lo ext/pdo/pdo.lo ext/pdo/pdo_dbh.lo ext/pdo/pdo_stmt.lo ext/pdo/pdo_sql_parser.lo ext/pdo/pdo_sqlstate.lo ext/pdo_sqlite/pdo_sqlite.lo ext/pdo_sqlite/sqlite_driver.lo ext/pdo_sqlite/sqlite_statement.lo ext/pgsql/pgsql.lo ext/phar/util.lo ext/phar/tar.lo ext/phar/zip.lo ext/phar/stream.lo ext/phar/func_interceptors.lo ext/phar/dirstream.lo ext/phar/phar.lo ext/phar/phar_object.lo ext/phar/phar_path_check.lo ext/posix/posix.lo ext/reflection/php_reflection.lo ext/session/mod_user_class.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/simplexml/sxe.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_exceptions.lo ext/spl/spl_observer.lo ext/spl/spl_dllist.lo ext/spl/spl_heap.lo ext/spl/spl_fixedarray.lo ext/standard/crypt_freesec.lo ext/standard/crypt_blowfish.lo ext/standard/crypt_sha512.lo ext/standard/crypt_sha256.lo ext/standard/php_crypt_r.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/mt_rand.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/sha1.lo ext/standard/user_filters.lo ext/standard/uuencode.lo ext/standard/filters.lo ext/standard/proc_open.lo ext/standard/streamsfuncs.lo ext/standard/http.lo ext/standard/password.lo ext/standard/random.lo ext/standard/net.lo ext/standard/hrtime.lo ext/tokenizer/tokenizer.lo ext/tokenizer/tokenizer_data.lo ext/xml/xml.lo ext/xml/compat.lo ext/xmlreader/php_xmlreader.lo ext/xmlwriter/php_xmlwriter.lo TSRM/TSRM.lo main/main.lo main/snprintf.lo main/spprintf.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/explicit_bzero.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/output.lo main/getopt.lo main/php_syslog.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo main/streams/glob_wrapper.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dtrace.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_vm_opcodes.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_builtin_functions.lo Zend/zend_ini.lo Zend/zend_sort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_weakrefs.lo Zend/zend_float.lo Zend/zend_string.lo Zend/zend_signal.lo Zend/zend_generators.lo Zend/zend_virtual_cwd.lo Zend/zend_ast.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_inheritance.lo Zend/zend_smart_str.lo Zend/zend_cpuinfo.lo Zend/zend_execute.lo main/internal_functions_cli.lo sapi/cli/php_cli.lo sapi/cli/php_http_parser.lo sapi/cli/php_cli_server.lo sapi/cli/ps_title.lo sapi/cli/php_cli_process_title.lo \
-lpq -lrt -lrt -lm -ldl -lxml2 -lsqlite3 -lxml2 -lonig -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -o sapi/cli/php
Si vous regardez attentivement, -lpq -lrt -lrt -lm -ldl -lxml2 -lsqlite3 -lxml2 -lonig -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2
ne contient pas -lssl -lcrypto
(et pourquoi -Y a-t-il tant de lxml2
?)
Lisez attentivement l'aide de configuration
./configure -h
・
・
Some influential environment variables:
・
・
OPENSSL_LIBS
linker flags for OPENSSL, overriding pkg-config
・
・
Puisqu'il dit «indicateurs de l'éditeur de liens pour OPENSSL», il est interprété que pointer vers le répertoire LIB n'est pas suffisant.
Remplacez par OPENSSL_LIBS =" - L / usr / local / openssl / lib -lssl -lcrypto "
et reconstruisez
$ ./configure \
--with-config-file-path=/etc/php7 \
--enable-mbstring \
--with-apxs2=/usr/local/apache2.4/bin/apxs \
--with-pgsql \
--with-zlib-dir \
--disable-ipv6 \
--with-openssl \
OPENSSL_CFLAGS=-I/usr/local/openssl/include \
OPENSSL_LIBS="-L/usr/local/openssl/lib -lssl -lcrypto" \
$ make
Le résultat est ...
Rencontrer une autre erreur
ext/pgsql/.libs/pgsql.o: In function `zif_pg_copy_from':
/usr/local/src/php-7.4.12/ext/pgsql/pgsql.c:4319: undefined reference to `ZSTR_LVAL'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make: *** [Makefile:268: sapi/cli/php] Error 1
libk5crypto.so.3
est une bibliothèque incluse dans Kerberos.
J'ai ajouté / usr / local / openssl / lib
au chemin de la bibliothèque partagée avec LD_LIBRARY_PATH
, et construit et installé Kerberos, mais cela n'a pas fonctionné.
Ajouter / usr / local / openssl / lib
à / etc / ld.so.conf
ou désinstaller le bundle OpenSSL ne devrait pas être une préoccupation pour les autres.
En fin de compte, j'ai renoncé à essayer de faire coexister les mêmes versions majeures et mineures d'OpenSSL avec le bundle, et j'ai été compromis en utilisant OpenSSL du bundle jusqu'à la sortie d'OpenSSL 1.2.
$ sudo dnf install wget perl gcc bzip2 expat-devel pcre-devel openssl-devel libxml2-devel sqlite-devel oniguruma-devel libpq-devel
OpenSSL construit et installe PHP sans construire ni installer
$ wget https://www.php.net/distributions/php-7.4.12.tar.bz2
$ tar xvf php-7.4.12.tar.bz2
$ cd php-7.4.12
$ ./configure \
--with-config-file-path=/etc/php7 \
--enable-mbstring \
--with-apxs2=/usr/local/apache2.4/bin/apxs \
--with-pgsql \
--with-zlib-dir \
--disable-ipv6 \
--with-openssl \
OPENSSL_CFLAGS=-I/usr/include/openssl \
OPENSSL_LIBS="-L/usr/lib64 -lssl -lcrypto"
$ make
$ make test
$ sudo make install
$ php -v
HP 7.4.12 (cli) (built: Nov 4 2020 16:41:02) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Enfin, la construction et l'installation de PHP 7.4 sont terminées