Bluetooth 为嵌入式linux编译蓝牙协议栈

Bluetooth 为嵌入式linux编译蓝牙协议栈,bluetooth,embedded-linux,android-bluetooth,ninja,gn,Bluetooth,Embedded Linux,Android Bluetooth,Ninja,Gn,有没有人能够为嵌入式linux设备单独编译蓝牙堆栈? 上有一个指南,但是按照这些说明gn gen操作失败,无法获取公共mk文件夹并修改一些构建文件,因此没有丢失变量、文件夹等。 我已经能够生成忍者文件,但在构建时,缺少gtest和modp_b64头文件。在从谷歌的源代码搜索中获得它们之后,忍者似乎能够运行一点而不出错,但最终失败了: In file included from ../../third_party/libchrome/base/message_loop/message_loop.h

有没有人能够为嵌入式linux设备单独编译蓝牙堆栈?
上有一个指南,但是按照这些说明
gn gen
操作失败,无法获取公共mk文件夹并修改一些构建文件,因此没有丢失变量、文件夹等。

我已经能够生成忍者文件,但在构建时,缺少gtest和modp_b64头文件。在从谷歌的源代码搜索中获得它们之后,忍者似乎能够运行一点而不出错,但最终失败了:

In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:209:3: error: static_assert failed due to requirement 'std::is_same<MessagePumpForUI, MessagePumpLibevent>::value' "MessageLoopCurrentForUI::WatchFileDescriptor is not supported when MessagePumpForUI is not a MessagePumpLibevent."
  static_assert(std::is_same<MessagePumpForUI, MessagePumpLibevent>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/libchrome/base/message_loop/message_loop_current.h:214:28: error: no type named 'Mode' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::Mode'?
                           MessagePumpForUI::Mode mode,
                           ^~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::Mode
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:55:8: note: 'MessagePumpLibevent::Mode' declared here
  enum Mode {
       ^
In file included from ../../third_party/libchrome/base/run_loop.cc:10:
In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:215:28: error: no type named 'FdWatchController' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::FdWatchController'?
                           MessagePumpForUI::FdWatchController* controller,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::FdWatchController
../../third_party/libchrome/base/message_loop/message_pump_libevent.h:28:9: note: 'MessagePumpLibevent::FdWatchController' declared here
  class FdWatchController : public FdWatchControllerInterface {
        ^
In file included from ../../third_party/libchrome/base/run_loop.cc:10:
In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:216:28: error: no type named 'FdWatcher' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::FdWatcher'?
                           MessagePumpForUI::FdWatcher* delegate);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::FdWatcher
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:17:9: note: 'MessagePumpLibevent::FdWatcher' declared here
  class FdWatcher {
        ^
4 errors generated.
包含在.././第三方/libchrome/base/message\u loop/message\u loop中的文件中。h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:209:3:错误:静态_断言失败,因为要求'std::is_same::value'“MessagePumpForUI不是MessagePumpLibevent时不支持MessageLoopCurrentForUI::WatchFileDescriptor。”
静态断言(std::is_same::value,
^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/libchrome/base/message_loop/message_loop_current.h:214:28:错误:“base::MessagePumpGlib”中没有名为“Mode”的类型;您是指“messagepumplifebevent::Mode”吗?
MessagePumpForUI::Mode,
^~~~~~~~~~~~~~~~~~~~~~
MessagePumpLibevent::Mode
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:55:8:注意:此处声明了“messagepumplifebevent::Mode”
枚举模式{
^
在.././third_party/libchrome/base/run_loop.cc:10中包含的文件中:
包含在.././第三方/libchrome/base/message\u loop/message\u loop.h:18中的文件中:
../../third_party/libchrome/base/message_loop/message_loop_current.h:215:28:错误:“base::MessagePumpGlib”中没有名为“FdWatchController”的类型;您的意思是“MessagePumpLibevent::FdWatchController”吗?
MessagePumpForUI::FdWatchController*控制器,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MessagePumpLibevent::FdWatchController
../../third_party/libchrome/base/message_loop/message_pump_libevent.h:28:9:注意:此处声明了:“MessagePumpLibevent::FdWatchController”
类FdWatchController:公共FdWatchControllerInterface{
^
在.././third_party/libchrome/base/run_loop.cc:10中包含的文件中:
包含在.././第三方/libchrome/base/message\u loop/message\u loop.h:18中的文件中:
../../third_party/libchrome/base/message_loop/message_loop_current.h:216:28:错误:“base::MessagePumpGlib”中没有名为“FdWatcher”的类型;您的意思是“messagepumplifebevent::FdWatcher”吗?
MessagePumpForUI::FdWatcher*委托);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
MessagePumpLibevent::FdWatcher
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:17:9:注意:此处声明了:“messagepumplifebevent::FdWatcher”
类观察者{
^
产生了4个错误。
所有错误和丢失的文件都来自
第三方/libchrome


任何帮助都将不胜感激。

之所以会出现常见的mk问题,是因为从编写指令到现在,libchrome添加了一个
BUILD.gn
文件,因此正在使用它,而不是
BUILD/secondary/third-party/libchrome
中的替代文件。要修复此部分构建,只需删除
第三方/libchrome/BUILD.gn
——应该可以避免大量的构建篡改

第二部分是因为libchrome的配置。一旦您删除了提到的文件,那么您需要修改
build/secondary/third-party/libchrome/build.gn
,以便不仅将以下内容添加到源代码集(如在上游中所做的那样),而且为下游用户添加到
libchrome\u config

 defines = [
    "__ANDROID_HOST__=1",
 ]
这将影响构建配置,因此它不会尝试使用glib


我在这方面做得最好的工作就是在这里,尽管我还没有完全让它工作。我做这件事主要是为了做一个实验,请随意继续我之前的工作。

常见的mk问题之所以会出现,是因为在编写指令和现在之间,libchrome添加了一个
build.gn
文件,所以我们正在讨论它ed,而不是像预期的那样在
build/secondary/third-party/libchrome
中替换一个。要修复构建的这一部分,只需删除
third-party/libchrome/build.gn
-就可以避免大量构建篡改

第二部分是因为libchrome的配置。一旦您删除了提到的文件,那么您需要修改
build/secondary/third-party/libchrome/build.gn
,以便不仅将以下内容添加到源代码集(如在上游中所做的那样),而且为下游用户添加到
libchrome\u config

 defines = [
    "__ANDROID_HOST__=1",
 ]
这将影响构建配置,因此它不会尝试使用glib

我在这方面做得最好的工作就是在这里,虽然我还没有让它完全工作。我做这件事主要是作为一个实验,请随意继续我离开的地方