rocketmq-client-cpp
rocketmq-client-cpp copied to clipboard
Failed to build Boost.Build build engine
I meet this problem. What is the reason for this problem
boost*.tar.gz exists -n Building Boost.Build engine with toolset darwin...
Failed to build Boost.Build build engine Consult 'bootstrap.log' for more details
Is there any solution please?
@WanZixin can you show more detail? such as the whole log.
@ifplusor This is the error printed by the terminal after I run the build.sh
script.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -fPIC -I/Users/wanzixin/software/rocketmq-client-cpp/bin/include -fPIC **-I/Users/wanzixin/software/rocketmq-client-cpp/bin/include** -Wall -fno-strict-aliasing -Wno-deprecated-declarations -D_THREAD_SAFE -MT bufferevent_openssl.lo -MD -MP -MF .deps/bufferevent_openssl.Tpo -c bufferevent_openssl.c -o bufferevent_openssl.o
bufferevent_openssl.c:106:3: error: incomplete definition of type 'struct bio_st'
b->init = 0;
~^
### /Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:107:3: error: incomplete definition of type 'struct bio_st'
b->num = -1;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:108:3: error: incomplete definition of type 'struct bio_st'
b->ptr = NULL; /* We'll be putting the bufferevent in this field.*/
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:109:3: error: incomplete definition of type 'struct bio_st'
b->flags = 0;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:119:7: error: incomplete definition of type 'struct bio_st'
if (b->shutdown) {
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:120:8: error: incomplete definition of type 'struct bio_st'
if (b->init && b->ptr)
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:120:19: error: incomplete definition of type 'struct bio_st'
if (b->init && b->ptr)
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:121:22: error: incomplete definition of type 'struct bio_st'
bufferevent_free(b->ptr);
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:122:4: error: incomplete definition of type 'struct bio_st'
b->init = 0;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:123:4: error: incomplete definition of type 'struct bio_st'
b->flags = 0;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:124:4: error: incomplete definition of type 'struct bio_st'
b->ptr = NULL;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:140:8: error: incomplete definition of type 'struct bio_st'
if (!b->ptr)
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:143:33: error: incomplete definition of type 'struct bio_st'
input = bufferevent_get_input(b->ptr);
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:159:31: error: incomplete definition of type 'struct bio_st'
struct bufferevent *bufev = b->ptr;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:165:8: error: incomplete definition of type 'struct bio_st'
if (!b->ptr)
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:191:31: error: incomplete definition of type 'struct bio_st'
struct bufferevent *bufev = b->ptr;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:196:10: error: incomplete definition of type 'struct bio_st'
ret = b->shutdown;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:199:4: error: incomplete definition of type 'struct bio_st'
b->shutdown = (int)num;
~^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/ossl_typ.h:79:16: note: forward declaration of 'struct bio_st'
typedef struct bio_st BIO;
^
bufferevent_openssl.c:228:19: error: variable has incomplete type 'BIO_METHOD' (aka 'struct bio_method_st')
static BIO_METHOD methods_bufferevent = {
^
/Users/wanzixin/software/rocketmq-client-cpp/bin/include/openssl/bio.h:249:16: note: forward declaration of 'struct bio_method_st'
typedef struct bio_method_st BIO_METHOD;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [bufferevent_openssl.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@WanZixin Do you install OpenSSL?
Do you work on Windows?
I downloaded libevent 2.0.22, jsoncpp 0.10.7 and boost 1.58.0 according to the README.md, and put them in the root directory. Then run the build.sh
script. I checked the build.sh
script file and found that OpenSSL was downloaded. OpenSSL version is 1.1.1d. And I work on macos.
@ifplusor I changed the version of libevent to 2.1.11, and found that there was no longer the above problem, but I went back to the original problem. Here is the infomation in terminal.
已发出 HTTP 请求,正在等待回应... 200 OK
长度:83581760 (80M) [application/x-gzip]
正在保存至: “boost_1_58_0.tar.gz”
boost_1_58_0.tar.gz 100%[================================================================================================================>] 79.71M 515KB/s 用时 3m 47s
2021-06-21 16:25:10 (359 KB/s) - 已保存 “boost_1_58_0.tar.gz” [83581760/83581760])
-n Building Boost.Build engine with toolset darwin...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
any help?
There are issues of compatibility between Libevent 2.0.22 with OpenSSL 1.1.1d, the version in build.sh is recommended.
@WanZixin Could you post error logs about boost, such as 'bootstrap.log'?
@ifplusor Here is my 'boostrap.log'.
###
### Using 'darwin' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
make.c:300:37: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:300:37: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:307:37: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:307:37: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:380:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "bind\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:380:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:388:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "time\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:388:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:393:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "time\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:393:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:758:13: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:758:13: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
6 warnings generated.
modules/path.c:16:12: error: implicit declaration of function 'file_query' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return file_query( list_front( lol_get( frame->args, 0 ) ) ) ?
^
1 error generated.
I try to change boost version to 1.76.0, It's worked! and then I find the default c++ compiler is clang, I already switch c++ compiler to gcc-11 but doesn't seem to work.
@WanZixin @ifplusor I found another case and it's worked!
mkdir cppsdk
cd cppsdk
wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.1/rocketmq-client-cpp-2.0.1-bin-release-darwin.tar.gz
tar -xzf rocketmq-client-cpp-2.0.1-bin-release-darwin.tar.gz
cp rocketmq-client-cpp/lib/* /usr/local/lib/
mkdir -p /usr/local/include/rocketmq/
cp rocketmq-client-cpp/include/* /usr/local/include/rocketmq/
install_name_tool -id "@rpath/librocketmq.dylib" /usr/local/lib/librocketmq.dylib
more info: https://help.aliyun.com/document_detail/157155.html?spm=a2c4g.11186623.6.702.313a5b06QfVEYE
Now it does not work! How should to resolve it???
@wanzixin @ifplusor I found another case and it's worked!
mkdir cppsdk cd cppsdk wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.1/rocketmq-client-cpp-2.0.1-bin-release-darwin.tar.gz tar -xzf rocketmq-client-cpp-2.0.1-bin-release-darwin.tar.gz cp rocketmq-client-cpp/lib/* /usr/local/lib/ mkdir -p /usr/local/include/rocketmq/ cp rocketmq-client-cpp/include/* /usr/local/include/rocketmq/ install_name_tool -id "@rpath/librocketmq.dylib" /usr/local/lib/librocketmq.dylib
more info: https://help.aliyun.com/document_detail/157155.html?spm=a2c4g.11186623.6.702.313a5b06QfVEYE
这个不适用Big Sur版本