php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73804 Compilation of libphp7.so fails
Submitted: 2016-12-22 19:56 UTC Modified: 2021-07-04 04:22 UTC
From: domains at fatcat dot ru Assigned: cmb (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 7.1.0 OS: OSX 10.11.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: domains at fatcat dot ru
New email:
PHP Version: OS:

 

 [2016-12-22 19:56 UTC] domains at fatcat dot ru
Description:
------------
Latest PCRE is installed manually. Configure options are as follows:

--with-pcre-regex=/usr/local --with-pcre-jit --enable-mbstring --sysconfdir=/private/etc --with-config-file-path=/etc --with-config-file-scan-dir=/Library/Server/Web/Config/php --with-apxs2

The final step which is assembling libphp7.so fails:

cc -bundle -bundle_loader /usr/sbin/httpd -L/usr/lib -laprutil-1 -lldap -llber -lexpat -liconv -lsqlite3 -lldap -llber -L/usr/lib -lapr-1 -lpthread -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS    -L/usr/local/lib ext/date/php_date.o ext/date/lib/astro.o ext/date/lib/dow.o ext/date/lib/parse_date.o ext/date/lib/parse_tz.o ext/date/lib/timelib.o ext/date/lib/tm2unixtime.o ext/date/lib/unixtime2tm.o ext/date/lib/parse_iso_intervals.o ext/date/lib/interval.o ext/libxml/libxml.o ext/pcre/php_pcre.o ext/sqlite3/sqlite3.o ext/sqlite3/libsqlite/sqlite3.o ext/ctype/ctype.o ext/dom/php_dom.o ext/dom/attr.o ext/dom/document.o ext/dom/domerrorhandler.o ext/dom/domstringlist.o ext/dom/domexception.o ext/dom/namelist.o ext/dom/processinginstruction.o ext/dom/cdatasection.o ext/dom/documentfragment.o ext/dom/domimplementation.o ext/dom/element.o ext/dom/node.o ext/dom/string_extend.o ext/dom/characterdata.o ext/dom/documenttype.o ext/dom/domimplementationlist.o ext/dom/entity.o ext/dom/nodelist.o ext/dom/text.o ext/dom/comment.o ext/dom/domconfiguration.o ext/dom/domimplementationsource.o ext/dom/entityreference.o ext/dom/notation.o ext/dom/xpath.o ext/dom/dom_iterators.o ext/dom/typeinfo.o ext/dom/domerror.o ext/dom/domlocator.o ext/dom/namednodemap.o ext/dom/userdatahandler.o ext/fileinfo/fileinfo.o ext/fileinfo/libmagic/apprentice.o ext/fileinfo/libmagic/apptype.o ext/fileinfo/libmagic/ascmagic.o ext/fileinfo/libmagic/cdf.o ext/fileinfo/libmagic/cdf_time.o ext/fileinfo/libmagic/compress.o ext/fileinfo/libmagic/encoding.o ext/fileinfo/libmagic/fsmagic.o ext/fileinfo/libmagic/funcs.o ext/fileinfo/libmagic/is_tar.o ext/fileinfo/libmagic/magic.o ext/fileinfo/libmagic/print.o ext/fileinfo/libmagic/readcdf.o ext/fileinfo/libmagic/softmagic.o ext/filter/filter.o ext/filter/sanitizing_filters.o ext/filter/logical_filters.o ext/filter/callback_filter.o ext/hash/hash.o ext/hash/hash_md.o ext/hash/hash_sha.o ext/hash/hash_ripemd.o ext/hash/hash_haval.o ext/hash/hash_tiger.o ext/hash/hash_gost.o ext/hash/hash_snefru.o ext/hash/hash_whirlpool.o ext/hash/hash_adler32.o ext/hash/hash_crc32.o ext/hash/hash_fnv.o ext/hash/hash_joaat.o ext/hash/hash_sha3.o ext/iconv/iconv.o ext/json/json.o ext/json/json_encoder.o ext/json/json_parser.o ext/json/json_scanner.o ext/mbstring/oniguruma/regcomp.o ext/mbstring/oniguruma/regerror.o ext/mbstring/oniguruma/regexec.o ext/mbstring/oniguruma/reggnu.o ext/mbstring/oniguruma/regparse.o ext/mbstring/oniguruma/regenc.o ext/mbstring/oniguruma/regext.o ext/mbstring/oniguruma/regsyntax.o ext/mbstring/oniguruma/regtrav.o ext/mbstring/oniguruma/regversion.o ext/mbstring/oniguruma/st.o ext/mbstring/oniguruma/enc/unicode.o ext/mbstring/oniguruma/enc/ascii.o ext/mbstring/oniguruma/enc/utf8.o ext/mbstring/oniguruma/enc/euc_jp.o ext/mbstring/oniguruma/enc/euc_tw.o ext/mbstring/oniguruma/enc/euc_kr.o ext/mbstring/oniguruma/enc/sjis.o ext/mbstring/oniguruma/enc/iso8859_1.o ext/mbstring/oniguruma/enc/iso8859_2.o ext/mbstring/oniguruma/enc/iso8859_3.o ext/mbstring/oniguruma/enc/iso8859_4.o ext/mbstring/oniguruma/enc/iso8859_5.o ext/mbstring/oniguruma/enc/iso8859_6.o ext/mbstring/oniguruma/enc/iso8859_7.o ext/mbstring/oniguruma/enc/iso8859_8.o ext/mbstring/oniguruma/enc/iso8859_9.o ext/mbstring/oniguruma/enc/iso8859_10.o ext/mbstring/oniguruma/enc/iso8859_11.o ext/mbstring/oniguruma/enc/iso8859_13.o ext/mbstring/oniguruma/enc/iso8859_14.o ext/mbstring/oniguruma/enc/iso8859_15.o ext/mbstring/oniguruma/enc/iso8859_16.o ext/mbstring/oniguruma/enc/koi8.o ext/mbstring/oniguruma/enc/koi8_r.o ext/mbstring/oniguruma/enc/big5.o ext/mbstring/oniguruma/enc/utf16_be.o ext/mbstring/oniguruma/enc/utf16_le.o ext/mbstring/oniguruma/enc/utf32_be.o ext/mbstring/oniguruma/enc/utf32_le.o ext/mbstring/libmbfl/filters/html_entities.o ext/mbstring/libmbfl/filters/mbfilter_7bit.o ext/mbstring/libmbfl/filters/mbfilter_ascii.o ext/mbstring/libmbfl/filters/mbfilter_base64.o ext/mbstring/libmbfl/filters/mbfilter_big5.o ext/mbstring/libmbfl/filters/mbfilter_byte2.o ext/mbstring/libmbfl/filters/mbfilter_byte4.o ext/mbstring/libmbfl/filters/mbfilter_cp1251.o ext/mbstring/libmbfl/filters/mbfilter_cp1252.o ext/mbstring/libmbfl/filters/mbfilter_cp1254.o ext/mbstring/libmbfl/filters/mbfilter_cp5022x.o ext/mbstring/libmbfl/filters/mbfilter_cp51932.o ext/mbstring/libmbfl/filters/mbfilter_cp850.o ext/mbstring/libmbfl/filters/mbfilter_cp866.o ext/mbstring/libmbfl/filters/mbfilter_cp932.o ext/mbstring/libmbfl/filters/mbfilter_cp936.o ext/mbstring/libmbfl/filters/mbfilter_gb18030.o ext/mbstring/libmbfl/filters/mbfilter_euc_cn.o ext/mbstring/libmbfl/filters/mbfilter_euc_jp.o ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.o ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.o ext/mbstring/libmbfl/filters/mbfilter_euc_kr.o ext/mbstring/libmbfl/filters/mbfilter_euc_tw.o ext/mbstring/libmbfl/filters/mbfilter_htmlent.o ext/mbstring/libmbfl/filters/mbfilter_hz.o ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.o ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.o ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.o ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.o ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.o ext/mbstring/libmbfl/filters/mbfilter_jis.o ext/mbstring/libmbfl/filters/mbfilter_koi8r.o ext/mbstring/libmbfl/filters/mbfilter_armscii8.o ext/mbstring/libmbfl/filters/mbfilter_qprint.o ext/mbstring/libmbfl/filters/mbfilter_sjis.o ext/mbstring/libmbfl/filters/mbfilter_sjis_open.o ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.o ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.o ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.o ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.o ext/mbstring/libmbfl/filters/mbfilter_ucs2.o ext/mbstring/libmbfl/filters/mbfilter_ucs4.o ext/mbstring/libmbfl/filters/mbfilter_uhc.o ext/mbstring/libmbfl/filters/mbfilter_utf16.o ext/mbstring/libmbfl/filters/mbfilter_utf32.o ext/mbstring/libmbfl/filters/mbfilter_utf7.o ext/mbstring/libmbfl/filters/mbfilter_utf7imap.o ext/mbstring/libmbfl/filters/mbfilter_utf8.o ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.o ext/mbstring/libmbfl/filters/mbfilter_uuencode.o ext/mbstring/libmbfl/filters/mbfilter_koi8u.o ext/mbstring/libmbfl/mbfl/mbfilter.o ext/mbstring/libmbfl/mbfl/mbfilter_8bit.o ext/mbstring/libmbfl/mbfl/mbfilter_pass.o ext/mbstring/libmbfl/mbfl/mbfilter_wchar.o ext/mbstring/libmbfl/mbfl/mbfl_convert.o ext/mbstring/libmbfl/mbfl/mbfl_encoding.o ext/mbstring/libmbfl/mbfl/mbfl_filter_output.o ext/mbstring/libmbfl/mbfl/mbfl_ident.o ext/mbstring/libmbfl/mbfl/mbfl_language.o ext/mbstring/libmbfl/mbfl/mbfl_memory_device.o ext/mbstring/libmbfl/mbfl/mbfl_string.o ext/mbstring/libmbfl/mbfl/mbfl_allocators.o ext/mbstring/libmbfl/nls/nls_de.o ext/mbstring/libmbfl/nls/nls_en.o ext/mbstring/libmbfl/nls/nls_ja.o ext/mbstring/libmbfl/nls/nls_kr.o ext/mbstring/libmbfl/nls/nls_neutral.o ext/mbstring/libmbfl/nls/nls_ru.o ext/mbstring/libmbfl/nls/nls_uni.o ext/mbstring/libmbfl/nls/nls_zh.o ext/mbstring/libmbfl/nls/nls_hy.o ext/mbstring/libmbfl/nls/nls_tr.o ext/mbstring/libmbfl/nls/nls_ua.o ext/mbstring/mbstring.o ext/mbstring/php_unicode.o ext/mbstring/mb_gpc.o ext/mbstring/php_mbregex.o ext/pdo/pdo.o ext/pdo/pdo_dbh.o ext/pdo/pdo_stmt.o ext/pdo/pdo_sql_parser.o ext/pdo/pdo_sqlstate.o ext/pdo_sqlite/pdo_sqlite.o ext/pdo_sqlite/sqlite_driver.o ext/pdo_sqlite/sqlite_statement.o ext/phar/util.o ext/phar/tar.o ext/phar/zip.o ext/phar/stream.o ext/phar/func_interceptors.o ext/phar/dirstream.o ext/phar/phar.o ext/phar/phar_object.o ext/phar/phar_path_check.o ext/posix/posix.o ext/reflection/php_reflection.o ext/session/mod_user_class.o ext/session/session.o ext/session/mod_files.o ext/session/mod_mm.o ext/session/mod_user.o ext/simplexml/simplexml.o ext/simplexml/sxe.o ext/spl/php_spl.o ext/spl/spl_functions.o ext/spl/spl_engine.o ext/spl/spl_iterators.o ext/spl/spl_array.o ext/spl/spl_directory.o ext/spl/spl_exceptions.o ext/spl/spl_observer.o ext/spl/spl_dllist.o ext/spl/spl_heap.o ext/spl/spl_fixedarray.o ext/standard/crypt_freesec.o ext/standard/crypt_blowfish.o ext/standard/crypt_sha512.o ext/standard/crypt_sha256.o ext/standard/php_crypt_r.o ext/standard/array.o ext/standard/base64.o ext/standard/basic_functions.o ext/standard/browscap.o ext/standard/crc32.o ext/standard/crypt.o ext/standard/cyr_convert.o ext/standard/datetime.o ext/standard/dir.o ext/standard/dl.o ext/standard/dns.o ext/standard/exec.o ext/standard/file.o ext/standard/filestat.o ext/standard/flock_compat.o ext/standard/formatted_print.o ext/standard/fsock.o ext/standard/head.o ext/standard/html.o ext/standard/image.o ext/standard/info.o ext/standard/iptc.o ext/standard/lcg.o ext/standard/link.o ext/standard/mail.o ext/standard/math.o ext/standard/md5.o ext/standard/metaphone.o ext/standard/microtime.o ext/standard/pack.o ext/standard/pageinfo.o ext/standard/quot_print.o ext/standard/rand.o ext/standard/mt_rand.o ext/standard/soundex.o ext/standard/string.o ext/standard/scanf.o ext/standard/syslog.o ext/standard/type.o ext/standard/uniqid.o ext/standard/url.o ext/standard/var.o ext/standard/versioning.o ext/standard/assert.o ext/standard/strnatcmp.o ext/standard/levenshtein.o ext/standard/incomplete_class.o ext/standard/url_scanner_ex.o ext/standard/ftp_fopen_wrapper.o ext/standard/http_fopen_wrapper.o ext/standard/php_fopen_wrapper.o ext/standard/credits.o ext/standard/css.o ext/standard/var_unserializer.o ext/standard/ftok.o ext/standard/sha1.o ext/standard/user_filters.o ext/standard/uuencode.o ext/standard/filters.o ext/standard/proc_open.o ext/standard/streamsfuncs.o ext/standard/http.o ext/standard/password.o ext/standard/random.o ext/tokenizer/tokenizer.o ext/tokenizer/tokenizer_data.o ext/xml/xml.o ext/xml/compat.o ext/xmlreader/php_xmlreader.o ext/xmlwriter/php_xmlwriter.o TSRM/TSRM.o TSRM/tsrm_strtok_r.o main/main.o main/snprintf.o main/spprintf.o main/php_sprintf.o main/fopen_wrappers.o main/alloca.o main/php_scandir.o main/php_ini.o main/SAPI.o main/rfc1867.o main/php_content_types.o main/strlcpy.o main/strlcat.o main/mergesort.o main/reentrancy.o main/php_variables.o main/php_ticks.o main/network.o main/php_open_temporary_file.o main/output.o main/getopt.o main/streams/streams.o main/streams/cast.o main/streams/memory.o main/streams/filter.o main/streams/plain_wrapper.o main/streams/userspace.o main/streams/transports.o main/streams/xp_socket.o main/streams/mmap.o main/streams/glob_wrapper.o Zend/zend_language_parser.o Zend/zend_language_scanner.o Zend/zend_ini_parser.o Zend/zend_ini_scanner.o Zend/zend_alloc.o Zend/zend_compile.o Zend/zend_constants.o Zend/zend_dtrace.o Zend/zend_execute_API.o Zend/zend_highlight.o Zend/zend_llist.o Zend/zend_vm_opcodes.o Zend/zend_opcode.o Zend/zend_operators.o Zend/zend_ptr_stack.o Zend/zend_stack.o Zend/zend_variables.o Zend/zend.o Zend/zend_API.o Zend/zend_extensions.o Zend/zend_hash.o Zend/zend_list.o Zend/zend_builtin_functions.o Zend/zend_sprintf.o Zend/zend_ini.o Zend/zend_sort.o Zend/zend_multibyte.o Zend/zend_ts_hash.o Zend/zend_stream.o Zend/zend_iterators.o Zend/zend_interfaces.o Zend/zend_exceptions.o Zend/zend_strtod.o Zend/zend_gc.o Zend/zend_closures.o Zend/zend_float.o Zend/zend_string.o Zend/zend_signal.o Zend/zend_generators.o Zend/zend_virtual_cwd.o Zend/zend_ast.o Zend/zend_objects.o Zend/zend_object_handlers.o Zend/zend_objects_API.o Zend/zend_default_classes.o Zend/zend_inheritance.o Zend/zend_smart_str.o Zend/zend_execute.o sapi/apache2handler/mod_php7.o sapi/apache2handler/sapi_apache2.o sapi/apache2handler/apache_config.o sapi/apache2handler/php_functions.o main/internal_functions.o  -lresolv -liconv -liconv -lpcre -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm  -o libs/libphp7.bundle && cp libs/libphp7.bundle libs/libphp7.so
Undefined symbols for architecture x86_64:
  "_pcre_assign_jit_stack", referenced from:
      _pcre_get_compiled_regex_cache in php_pcre.o
  "_pcre_free_study", referenced from:
      _php_free_pcre_cache in php_pcre.o
  "_pcre_jit_stack_alloc", referenced from:
      _zm_activate_pcre in php_pcre.o
  "_pcre_jit_stack_free", referenced from:
      _zm_globals_dtor_pcre in php_pcre.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: *** [libs/libphp7.bundle] Error 1


For some reason instead of using -L/usr/local/lib we see -L/usr/lib there which points to the wrong (older version compiled without jit) PCRE library provided by Apple. Changing /usr/lib to /usr/local/lib and re-running that compile step manually from the command line succeeds and invoking `make' again completes the build.

Compilation doesn't fail if configure options don't contain --with-apxs2 (no building of the libphp7.so)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-25 15:06 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-06-25 15:06 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-07-04 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC