Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

mac php7.4 boost 1.85.0 编译失败 #193

@lzj0223

Description

@lzj0223
\/bin/sh /Users/linzhijun/yasd/libtool --mode=compile g++ -std=gnu++11 -std=gnu++11  -I. -I/Users/linzhijun/yasd -DPHP_ATOM_INC -I/Users/linzhijun/yasd/include -I/Users/linzhijun/yasd/main -I/Users/linzhijun/yasd -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/main -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/TSRM -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/Zend -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/ext -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/ext/date/lib -I/include -I/Users/linzhijun/yasd/thirdparty/tinyxml2  -I/usr/local/opt/openssl@1.1/include -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11   -c /Users/linzhijun/yasd/src/remote_debugger.cc -o src/remote_debugger.lo
 g++ -std=gnu++11 -std=gnu++11 -I. -I/Users/linzhijun/yasd -DPHP_ATOM_INC -I/Users/linzhijun/yasd/include -I/Users/linzhijun/yasd/main -I/Users/linzhijun/yasd -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/main -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/TSRM -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/Zend -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/ext -I/usr/local/Cellar/php@7.4/7.4.33_6/include/php/ext/date/lib -I/include -I/Users/linzhijun/yasd/thirdparty/tinyxml2 -I/usr/local/opt/openssl@1.1/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /Users/linzhijun/yasd/src/remote_debugger.cc  -fno-common -DPIC -o src/.libs/remote_debugger.o
In file included from /Users/linzhijun/yasd/src/remote_debugger.cc:33:
In file included from /usr/local/include/boost/algorithm/string.hpp:23:
In file included from /usr/local/include/boost/algorithm/string/split.hpp:16:
In file included from /usr/local/include/boost/algorithm/string/iter_find.hpp:27:
In file included from /usr/local/include/boost/algorithm/string/find_iterator.hpp:24:
In file included from /usr/local/include/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /usr/local/include/boost/function.hpp:16:
In file included from /usr/local/include/boost/function/function_template.hpp:17:
In file included from /usr/local/include/boost/throw_exception.hpp:21:
In file included from /usr/local/include/boost/exception/exception.hpp:9:
/usr/local/include/boost/assert/source_location.hpp:95:9: error: no member named 'ap_php_snprintf' in namespace 'std'; did you mean simply 'ap_php_snprintf'?
        BOOST_ASSERT_SNPRINTF( buffer, ":%lu", ln );
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/assert/source_location.hpp:79:53: note: expanded from macro 'BOOST_ASSERT_SNPRINTF'
# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::snprintf(buffer, sizeof(buffer)/sizeof(buffer[0]), format, arg)
                                                    ^~~~~
/usr/local/Cellar/php@7.4/7.4.33_6/include/php/main/snprintf.h:81:12: note: 'ap_php_snprintf' declared here
PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
           ^
In file included from /Users/linzhijun/yasd/src/remote_debugger.cc:33:
In file included from /usr/local/include/boost/algorithm/string.hpp:23:
In file included from /usr/local/include/boost/algorithm/string/split.hpp:16:
In file included from /usr/local/include/boost/algorithm/string/iter_find.hpp:27:
In file included from /usr/local/include/boost/algorithm/string/find_iterator.hpp:24:
In file included from /usr/local/include/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /usr/local/include/boost/function.hpp:16:
In file included from /usr/local/include/boost/function/function_template.hpp:17:
In file included from /usr/local/include/boost/throw_exception.hpp:21:
In file included from /usr/local/include/boost/exception/exception.hpp:9:
/usr/local/include/boost/assert/source_location.hpp:102:13: error: no member named 'ap_php_snprintf' in namespace 'std'; did you mean simply 'ap_php_snprintf'?
            BOOST_ASSERT_SNPRINTF( buffer, ":%lu", co );
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/assert/source_location.hpp:79:53: note: expanded from macro 'BOOST_ASSERT_SNPRINTF'
# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::snprintf(buffer, sizeof(buffer)/sizeof(buffer[0]), format, arg)
                                                    ^~~~~
/usr/local/Cellar/php@7.4/7.4.33_6/include/php/main/snprintf.h:81:12: note: 'ap_php_snprintf' declared here
PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
           ^
2 errors generated.
make: *** [src/remote_debugger.lo] Error 1

编译时出现如上错误,环境如下

php版本:
image

boost版本:1.85.0

机器:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions