You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/05/02 14:14:20 UTC

[GitHub] [incubator-brpc] likunyao commented on issue #1382: macos (Apple M1 )编译过程报错

likunyao commented on issue #1382:
URL: https://github.com/apache/incubator-brpc/issues/1382#issuecomment-830816105


   😳😳😳
   > ./src/bthread/context.h:81:41: error: expected ';' after top level declarator
   intptr_t BTHREAD_CONTEXT_CALL_CONVENTION
                                           ^
                                           ;
   ./src/bthread/context.h:84:20: error: redefinition of 'BTHREAD_CONTEXT_CALL_CONVENTION' with a different type: 'bthread_fcontext_t' (aka 'void *') vs 'intptr_t' (aka 'long')
   bthread_fcontext_t BTHREAD_CONTEXT_CALL_CONVENTION
                      ^
   ./src/bthread/context.h:81:10: note: previous definition is here
   intptr_t BTHREAD_CONTEXT_CALL_CONVENTION
            ^
   ./src/bthread/context.h:84:51: error: expected ';' after top level declarator
   bthread_fcontext_t BTHREAD_CONTEXT_CALL_CONVENTION
                                                     ^
                                                     ;
   ./src/bthread/context.h:91:2: error: #endif without #if
   #endif  // BTHREAD_CONTEXT_H
    ^
   In file included from src/bthread/bthread.cpp:25:
   In file included from ./src/bthread/task_group.h:26:
   In file included from ./src/bthread/task_control.h:31:
   In file included from ./src/bthread/task_meta.h:29:
   In file included from ./src/bthread/stack.h:81:
   ./src/bthread/stack_inl.h:132:5: error: use of undeclared identifier 'bthread_jump_fcontext'
       bthread_jump_fcontext(&from->context, to->context, 0/*not skip remained*/);
       ^
   In file included from src/bthread/butex.cpp:34:
   In file included from ./src/bthread/task_control.h:31:
   In file included from ./src/bthread/task_meta.h:29:
   In file included from ./src/bthread/stack.h:28:
   ./src/bthread/context.h:81:41: error: expected ';' after top level declarator
   intptr_t BTHREAD_CONTEXT_CALL_CONVENTION
                                           ^
                                           ;
   ./src/bthread/context.h:84:20: error: redefinition of 'BTHREAD_CONTEXT_CALL_CONVENTION' with a different type: 'bthread_fcontext_t' (aka 'void *') vs 'intptr_t' (aka 'long')
   bthread_fcontext_t BTHREAD_CONTEXT_CALL_CONVENTION
                      ^
   ./src/bthread/context.h:81:10: note: previous definition is here
   intptr_t BTHREAD_CONTEXT_CALL_CONVENTION
            ^
   ./src/bthread/context.h:84:51: error: expected ';' after top level declarator
   bthread_fcontext_t BTHREAD_CONTEXT_CALL_CONVENTION
                                                     ^
                                                     ;
   ./src/bthread/context.h:91:2: error: #endif without #if
   #endif  // BTHREAD_CONTEXT_H
    ^
   In file included from src/bthread/butex.cpp:34:
   In file included from ./src/bthread/task_control.h:31:
   In file included from ./src/bthread/task_meta.h:29:
   In file included from ./src/bthread/stack.h:81:
   ./src/bthread/stack_inl.h:132:5: error: use of undeclared identifier 'bthread_jump_fcontext'
       bthread_jump_fcontext(&from->context, to->context, 0/*not skip remained*/);
       ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::SmallStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::SmallStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::SmallStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::SmallStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:101:47: note: in instantiation of member function 'bthread::StackFactory<bthread::SmallStackClass>::get_stack' requested here
           return StackFactory<SmallStackClass>::get_stack(entry);
                                                 ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::NormalStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::NormalStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::NormalStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::NormalStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:103:48: note: in instantiation of member function 'bthread::StackFactory<bthread::NormalStackClass>::get_stack' requested here
           return StackFactory<NormalStackClass>::get_stack(entry);
                                                  ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::SmallStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::SmallStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::SmallStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::SmallStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:101:47: note: in instantiation of member function 'bthread::StackFactory<bthread::SmallStackClass>::get_stack' requested here
           return StackFactory<SmallStackClass>::get_stack(entry);
                                                 ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::NormalStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::NormalStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::NormalStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::NormalStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:103:48: note: in instantiation of member function 'bthread::StackFactory<bthread::NormalStackClass>::get_stack' requested here
           return StackFactory<NormalStackClass>::get_stack(entry);
                                                  ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::LargeStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::LargeStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::LargeStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::LargeStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:105:47: note: in instantiation of member function 'bthread::StackFactory<bthread::LargeStackClass>::get_stack' requested here
           return StackFactory<LargeStackClass>::get_stack(entry);
                                                 ^
   ./src/bthread/stack_inl.h:58:23: error: use of undeclared identifier 'bthread_make_fcontext'
               context = bthread_make_fcontext(storage.bottom, storage.stacksize, entry);
                         ^
   ./src/butil/object_pool_inl.h:191:13: note: in instantiation of member function 'bthread::StackFactory<bthread::LargeStackClass>::Wrapper::Wrapper' requested here
               BAIDU_OBJECT_POOL_GET((a1));
               ^
   ./src/butil/object_pool_inl.h:163:70: note: expanded from macro 'BAIDU_OBJECT_POOL_GET'
               T* obj = new ((T*)_cur_block->items + _cur_block->nitem) T CTOR_ARGS; \
                                                                        ^
   ./src/butil/object_pool_inl.h:238:24: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::LargeStackClass>::Wrapper>::LocalPool::get<void (*)(long)>' requested here
               return lp->get(arg1);
                          ^
   ./src/butil/object_pool.h:81:40: note: in instantiation of function template specialization 'butil::ObjectPool<bthread::StackFactory<bthread::LargeStackClass>::Wrapper>::get_object<void (*)(long)>' requested here
       return ObjectPool<T>::singleton()->get_object(arg1);
                                          ^
   ./src/bthread/stack_inl.h:71:23: note: in instantiation of function template specialization 'butil::get_object<bthread::StackFactory<bthread::LargeStackClass>::Wrapper, void (*)(long)>' requested here
           return butil::get_object<Wrapper>(entry);
                         ^
   ./src/bthread/stack_inl.h:105:47: note: in instantiation of member function 'bthread::StackFactory<bthread::LargeStackClass>::get_stack' requested here
           return StackFactory<LargeStackClass>::get_stack(entry);
                                                 ^
   8 errors generated.
   make: *** [src/bthread/bthread.o] Error 1
   8 errors generated.
   make: *** [src/bthread/butex.o] Error 1
   1 warning generated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org