Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
lzj0223 opened this issue Jul 25, 2024 · 1 comment
Open

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

lzj0223 opened this issue Jul 25, 2024 · 1 comment

Comments

@lzj0223
Copy link

lzj0223 commented Jul 25, 2024

\/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/[email protected]/7.4.33_6/include/php -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/main -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/ext/date/lib -I/include -I/Users/linzhijun/yasd/thirdparty/tinyxml2  -I/usr/local/opt/[email protected]/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/[email protected]/7.4.33_6/include/php -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/main -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.33_6/include/php/ext/date/lib -I/include -I/Users/linzhijun/yasd/thirdparty/tinyxml2 -I/usr/local/opt/[email protected]/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/[email protected]/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/[email protected]/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

@iszmxw
Copy link

iszmxw commented Nov 27, 2024

建议降低版本,我之前试过,降低到 [email protected] 就可以编译过去了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants