如何在UBUNTU虚拟机上编译EOS完成环境搭建?(附代码)

Ubuntu20.04或18.04下PX4(pixhawk)源码编译环境配置教程,及构建代码各种错误解决办法 在 Ubuntu Linux 18.04 和 20.04 上设置 PX4 开发环境,可参考此教程 安装工具链: 1.下载 PX4 源代码: Ctrl+Alt+T打开终端输入下面代码 阅读详情

image

1

摘要

【本文目标】 通过本文实践,能在WINDOWS操作系统搭建UBUNTU 18.04 LTS环境,并在此环境编译成功EOS v1.0.5正式发布版本。

【前置条件】 有学习EOS环境搭建意向,不怕折腾。

【技术收获】 1)搭建UBUNTU 18.04 LTS环境
2)在硬件要求不满足官方要求的环境下EOS环境编译成功
3) EOS编译过程中的踩坑排查能力

2

编译血泪史

EOS主网上线没有几天,从各种渠道得知EOS环境搭建比较麻烦,辉哥刚开始想绕过编译环节或者直接使用可直接使用的环境。于是,辉哥首先从赵志明老师那儿拉个一个V1.0.5的已编译成功的版本,拉到笔记本的Ubuntu虚拟机环境根本没法跑起来。

然后,辉哥想用欧阳哥哥花了好长时间搭建成功的虚拟机环境来测试操作,结果发现EOS节点运行起来后,他主机的CPU占用率为90%,他就没法工作了。

又为了省钱,不愿意购买阿里云ECS环境。最终,辉哥还是在古千峰老师和欧阳哥哥的鼓励下,下定决心把EOS环境编译成功。因为目前大部分研发人员用的是WINDOWS操作系统,那在此基础上搭建Ubuntu虚拟机成功对大部分EOS学习者来说非常有帮助。而坊间搭建EOS环境编译的步骤介绍中都非常简单,基本都不写编译失败或者踩过的坑,好像编译都是很顺利似的。作为一个热心的技术布道者,辉哥就下定决心把环境编译好,并把踩的坑和方法都贡献出来,供大家学习交流。

如果还有其他人能够在其他环境,例如Centos 7, MacOs上编译成功的,希望也可以把自己编译过程制作文档,在本文留言,让更多的人少踩坑。

3

环境配置

1、WINDOWS主机及操作系统

关键信息:Windows 10 64位操作系统,8G内存,4核CPU。

image

Windows 10系统环境

分析:从RAM要求看是不满足7GB RAM空闲资源要求,但有方法绕过去。

2、VmWare虚拟机

辉哥用的是VMware 10版本,可从官网下载或者参考(https://www.jianshu.com/p/683ea7d62a39)的“1,安装VMware虚拟机”章节完成虚拟机的安装。

3、Ubuntu资源配置

按照EOS的要求,辉哥选择UBUNTU 18.04 LTS版本。下载官网地址为https://www.ubuntu.com/download/server/thank-you?country=CN&version=18.04&architecture=amd64,AMD架构的经安装验证没有问题的。安装和配置方法参考(https://www.jianshu.com/p/683ea7d62a39) 的“2,安装Ubuntu操作系统”章节完成虚拟机的安装,建议硬盘和内存选择要尽可能大一些。

image

Ubuntu资源

EOSIO的安装最低配置:

  • 7GB RAM free required

  • 20GB Disk free required

  • 辉哥的环境的RAM是不满足要求的,后面编译的时候注释代码绕过去,不影响编译成功。

4

编译历程和踩坑记录

4.1 【错误1】直接下载版本不可行

辉哥从EOSIO官网上下载V1.0.5的版本(https://github.com/EOSIO/eos/tree/v1.0.5),然后上传到Ubuntu虚拟机环境,运行’./eosio_build.sh’提示必须用github下载。只所以用v1.0.5版本,只是一个个人临时决定而已。

【信息交互提示1】

duncanwang@duncanwang:~/work/eos-1.0.5$ ./eosio_build.sh

输出:

-bash: ./eosio_build.sh: Permission denied

解决方案:

duncanwang@duncanwang:~/work/eos-1.0.5$ chmod 755 ./eosio_build.sh

【信息交互提示2】

duncanwang@duncanwang:~/work/eos-1.0.5$ ./eosio_build.sh

输出:

This build script only works with sources cloned from git Please clone a new eos directory with ‘git clone https://github.com/EOSIO/eos –recursive’

See the wiki for instructions: https://github.com/EOSIO/eos/wiki

4.2 【错误2】Github下载提示连不上github

【信息交互提示】

duncanwang@duncanwang:~/work$ git clone -b v1.0.5 https://github.com/EOSIO/eos –recursive

输出:

Cloning into ‘eos’…
fatal: unable to access ‘https://github.com/EOSIO/eos/‘: Could not resolve host: github.com

解决方案:

提示表明链接不上github网站,增加了香港服务器解决。

  • 加入香港线路

sudo vim /etc/hosts

  • 加入以下配置后保存

192.30.253.113 github.com

  • 命令行增加配置

git config –global http.sslversion tlsv1

4.3 【错误3】Github下载提示端口错误

【信息交互提示】

duncanwang@duncanwang:~/work$ git clone https://github.com/EOSIO/eos –recursive

Cloning into ‘eos’…
fatal: unable to access ‘https://github.com/EOSIO/eos/‘: Failed to connect to github.com port 443: No route to host

duncanwang@duncanwang:~/work$ ping github.com

PING github.com (192.30.253.113) 56(84) bytes of data.

From 192.168.1.100 icmp_seq=1 Destination Host Unreachable

From 192.168.1.100 icmp_seq=2 Destination Host Unreachable

From 192.168.1.100 icmp_seq=3 Destination Host Unreachable

From 192.168.1.100 icmp_seq=4 Destination Host Unreachable

From 192.168.1.100 icmp_seq=5 Destination Host Unreachable

解决方案:

参考网上方法,运行以下命令,但是结果还是不行。

sudo iptables -I INPUT -p tcp –dport 443 -j ACCEPT

古哥的建议是先解决linux翻墙的问题,有点小难度。辉哥就重启了一下Ubuntu虚拟机,然后重新下载,发现下载成功了。

4.4 【成功】版本下载成功

duncanwang@duncanwang:~$ git clone -b v1.0.5 https://github.com/EOSIO/eos –recursive

Cloning into ‘eos’…

remote: Counting objects: 107783, done.

remote: Compressing objects: 100% (66/66), done.

remote: Total 107783 (delta 25), reused 34 (delta 13), pack-reused 107700

Receiving objects: 100% (107783/107783), 105.34 MiB | 2.61 MiB/s, done.

Resolving deltas: 100% (85696/85696), done.

Note: checking out ‘c9b7a2472dc3c138e64d07ec388e64340577bb34’.

You are in ‘detached HEAD’ state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.

4.5 【错误4】编译提示RAM空间不足

输入:

duncanwang@duncanwang:~/eos$ ./eosio_build.sh

错误提示:

 Beginning build version: 1.2

    Wed Jun 27 10:24:48 UTC 2018

    User: duncanwang

cat: .git/refs/heads/master: No such file or directory

    git head id:

     Current branch: HEAD

    ARCHITECTURE: Linux

    OS name: Ubuntu

    OS Version: 18.04

    CPU speed: 3192.622Mhz

    CPU cores: 2

    Physical Memory: 974 Mgb

    Disk install: /dev/sda2

    Disk space total: 19G

    Disk space available: 13G

    Your system must have 7 or more Gigabytes of physical memory installed.

    Exiting now.

解决方法:

进到eos/scripts/路径,修改对应的sh文件,找到“Your system must have 7 or more Gigabytes of physical memory installed”字样,或者You must have at least %sGB of available storage to install EOSIO,将后面的exit 1命令去掉即可。

if [ "${MEM_MEG}" -lt 7000 ]; then

        printf "\\tYour system must have 7 or more Gigabytes of physical memory installed.\\n"

        printf "\\tExiting now.\\n"

  #     exit 1

 fi

顺道把硬盘不足的提示也注释掉,测试发现13G的空闲硬盘是可以编译成功的。

if [ “{DISK_AVAIL%.*}" -lt " {DISK_AVAIL%.*}" -lt " {DISK_MIN}” ]; then

    printf "\\tYou must have at least %sGB of available storage to install EOSIO.\\n" "${DISK_MIN}"

    printf "\\tExiting now.\\n"

exit 1

fi

4.6 【错误5】mongoDB无法下载

编译过程中错误提示:

  Boost successfully installed @ /home/duncanwang/opt/boost.

    Checking MongoDB installation. 

   Installing MongoDB 3.6.3.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:30 --:--:--     0

curl: (28) Operation timed out after 30002 milliseconds with 0 out of 0 bytes received

    Unable to download MongoDB at this time.

    Exiting now.

分析:

eosio_build_ubuntu.sh 查找 “Unable to download MongoDB at this time.”关键字可知这个语句执行失败。

–STATUS=$(curl -LO -w ‘%{http_code}’ –connect-timeout 30 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz)

解决办法:

  • 本地下载2个文件“mongodb-linux-x86_64-3.6.3.tgz”和“mongo-c-driver-1.9.3.tar.gz”,上传到虚拟机的软件存放目录“/home/duncanwang/work/software”,

  • 修改脚本,重新运行./eosio_build.sh即可解决。这2个下载文件可在辉哥的知识星球找到,也可以上官网下载。

#STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz)

        #if [ "${STATUS}" -ne 200 ]; then

        #   printf "\\tUnable to download MongoDB at this time.\\n"

        #   printf "\\n\\tExiting now.\\n\\n"

        #   exit 1;

        #fi

        cp /home/duncanwang/work/software/mongodb-linux-x86_64-3.6.3.tgz "${HOME}/opt/"

#       STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz)

#       if [ "${STATUS}" -ne 200 ]; then

#           if ! rm -f "${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz"

#           then

#               printf "\\n\\tUnable to remove file %s/mongo-c-driver-1.9.3.tar.gz.\\n" "${TEMP_DIR}"

#           fi

#           printf "\\tUnable to download MongoDB C driver at this time.\\n"

#           printf "\\tExiting now.\\n\\n"

#           exit 1;

#       fi

   cp /home/duncanwang/work/software/mongo-c-driver-1.9.3.tar.gz "${TEMP_DIR}/"

4.7 【错误6】RPC错误

编译过程中错误提示:

error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

    Unable to clone clang repo @ https://github.com/llvm-mirror/clang.git.

    Exiting now.

Cloning into 'llvm'...

remote: Counting objects: 24803, done.

remote: Compressing objects: 100% (23960/23960), done.

error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.

fatal: The remote end hung up unexpectedlyfatal:

 early EOF

fatal: index-pack failed

解决方法

提示RPC错误,古千峰反馈说,主网RPC服务不稳定。

  • 辉哥想到的方法是把需要的git clone –depth 1 –single-branch –branch release_40 https://github.com/llvm-mirror/llvm.git,git clone –depth 1 –single-branch –branch release_40 https://github.com/llvm-mirror/clang.git单独执行或者从windows下载转放到Ubuntu对应目录。

    编译的提示如下,还是搞不定。有大侠认为是因为我们下载的llvm.git,clang.git用的是最新版本的原因,没有用 release_40的版本,没有做重新尝试。

CMake Error at tools/clang/tools/diagtool/CMakeLists.txt:14 (target_link_libraries):

  The keyword signature for target_link_libraries has already been used with

  the target "diagtool".  All uses of target_link_libraries with a target

  must be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * cmake/modules/LLVM-Config.cmake:105 (target_link_libraries)

   * cmake/modules/AddLLVM.cmake:785 (target_link_libraries)
  • 辉哥第二天早晨过来,把 /tmp/llvm-compiler文件夹删除,重新编译一下,结果什么都成了。

4.8【成功】编译成功

完成4.7的删除文件夹重编译后,编译就成功了。

image

EOS编译成功.png

4.9【成功】安装包

sudo make install

执行结果为成功,如下:

-- Installing: /usr/local/bin/nodeos

-- Installing: /usr/local/var/log/eosio

-- Installing: /usr/local/var/lib/eosio

-- Installing: /usr/local/bin/cleos

-- Installing: /usr/local/bin/keosd

-- Installing: /usr/local/bin/eosio-launcher

-- Installing: /usr/local/bin/eosio-abigen

-- Installing: /usr/local/bin/eosiocpp

duncanwang@duncanwang:~/eos/build$ make test

4.10【部分失败】验证安装是否成功

  • 运行mongod,在Ubuntu系统中,运行:

~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &
输出内容:

[1] 24769

  • 检验eosio是否安装成功命令

duncanwang@duncanwang:~/eos/build$ make test

26/36 Test #26: unit_test_binaryen ...................   Passed  130.46 sec

      Start 27: unit_test_wavm27/36 Test #27: unit_test_wavm .......................***Exception: SegFault433.62 sec

      Start 28: validate_deferred_test_abi28/36 Test #28: validate_deferred_test_abi ...........   Passed    0.04 sec      

Start 29: plugin_test29/36 Test #29: plugin_test ..........................   Passed    0.10 sec

      Start 30: nodeos_run_test30/36 Test #30: nodeos_run_test ......................   Passed   61.58 sec     

 Start 31: p2p_dawn515_test31/36 Test #31: p2p_dawn515_test .....................   Passed    8.18 sec     

 Start 32: distributed-transactions-test32/36 Test #32: distributed-transactions-test ........   Passed   74.44 sec     

 Start 33: restart-scenarios-test-resync33/36 Test #33: restart-scenarios-test-resync ........   Passed  126.77 sec      

Start 34: restart-scenarios-test-hard_replay34/36 Test #34: restart-scenarios-test-hard_replay ...   Passed  123.08 sec      Start 35: restart-scenarios-test-none35/36 Test #35: restart-scenarios-test-none ..........   Passed  130.01 sec

      Start 36: validate_dirty_db_test36/36 Test #36: validate_dirty_db_test ...............   Passed    2.41 sec

97% tests passed, 1 tests failed out of 36

Total Test time (real) = 1091.60 sec

The following tests FAILED:

     27 - unit_test_wavm (SEGFAULT)

Errors while running CTest

Makefile:119: recipe for target 'test' failed

make: *** [test] Error 8

5

编译总结

EOS成功的编译总是相同的,不成功的编译各个各的不幸。这儿总结下成功的步骤,一般是及其简单的。

1)下载最新代码

git clone https://github.com/EOSIO/eos.git –recursive

2)内存限制修改
ubuntu:eosio_build_ubuntu.sh 25行7000改成3000

3)编译
./eosio_build.sh

4)安装命令:cd build 然后maker install

6

【成功】私有节点运行

辉哥解决不了哪个安装测试错误的问题,就当做没有发生了。

直接输入命令启动私有节点。

cd ~/eos/build/programs/nodeos

./nodeos -e -p eosio –plugin eosio::chain_api_plugin –plugin eosio::history_api_plugin

输出结果如下:

1672402ms thread-0   chain_plugin.cpp:208          plugin_initialize    ] initializing chain plugin

1672402ms thread-0   chain_plugin.cpp:391          plugin_initialize    ] Starting up fresh blockchain with default genesis state.

CHAINBASE:   Failed to pin chainbase shared memory (of size 1024 MB) in RAM. Performance degradation is possible.

CHAINBASE:   Failed to pin chainbase shared memory (of size 340 MB) in RAM. Performance degradation is possible.

1672457ms thread-0   http_plugin.cpp:290           plugin_initialize    ] configured http to listen on 127.0.0.1:8888

1672458ms thread-0   net_plugin.cpp:2947           plugin_initialize    ] Initialize net plugin

1672458ms thread-0   net_plugin.cpp:2971           plugin_initialize    ] host: 0.0.0.0 port: 9876

 1672458ms thread-0   net_plugin.cpp:3043           plugin_initialize    ] my node_id is dd1b4640288cfefc56f90bc02f92b7ddd5f8e2e6f1d46d0422f7a5f43dafce8e1672459ms thread-0   main.cpp:104                  main                 ] nodeos version c9b7a247

1672459ms thread-0   main.cpp:105                  main                 ] eosio root is /home/duncanwang/.local/share1672459ms thread-0   controller.cpp:1190           startup              ] No head block in fork db, perhaps we need to replay

1672459ms thread-0   controller.cpp:304            initialize_fork_db   ]  Initializing new blockchain with genesis state

                  1672496ms thread-0   chain_plugin.cpp:446          plugin_startup       ] starting chain in read/write mode

1672496ms thread-0   chain_plugin.cpp:451          plugin_startup       ] Blockchain started; head block is #1, genesis timestamp is 2018-06-01T12:00:00.000

1672496ms thread-0   http_plugin.cpp:331           plugin_startup       ] start listening for http requests1672496ms thread-0   chain_api_plugin.cpp:75       plugin_startup       ] starting chain_api_plugin

1672496ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/abi_bin_to_json

1672496ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/abi_json_to_bin

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_abi

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_account

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_block

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_block_header_state

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_code

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_currency_balance

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_currency_stats

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_info

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_producers

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_required_keys

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/get_table_rows

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/push_block

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/push_transaction

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/chain/push_transactions

1672497ms thread-0   history_api_plugin.cpp:38     plugin_startup       ] starting history_api_plugin

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/history/get_actions

1672497ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/history/get_controlled_accounts

1672498ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/history/get_key_accounts

1672498ms thread-0   http_plugin.cpp:377           add_handler          ] add api url: /v1/history/get_transaction

1672498ms thread-0   net_plugin.cpp:3055           plugin_startup       ] starting listener, max clients is 25

1672498ms thread-0   producer_plugin.cpp:577       plugin_startup       ] producer plugin:  plugin_startup() begin

1672498ms thread-0   producer_plugin.cpp:592       plugin_startup       ] Launching block production for 1 producers at 2018-06-29T09:27:52.498.

1672499ms thread-0   producer_plugin.cpp:604       plugin_startup       ] producer plugin:  plugin_startup() end

1673001ms thread-0   producer_plugin.cpp:1073      produce_block        ] Produced block 000000024e3c9579... #2 @ 2018-06-29T09:27:53.000 signed by eosio [trxs: 0, lib: 0, confirmed: 0]

1673502ms thread-0   producer_plugin.cpp:1073      produce_block        ] Produced block 00000003176eba27... #3 @ 2018-06-29T09:27:53.500 signed by eosio [trxs: 0, lib: 2, confirmed: 0]

1674001ms thread-0   producer_plugin.cpp:1073      produce_block        ] Produced block 00000004726778be... #4 @ 2018-06-29T09:27:54.000 signed by eosio [trxs: 0, lib: 3, confirmed: 0]

1674502ms thread-0   producer_plugin.cpp:1073      produce_block        ] Produced block 0000000546ea9c4a... #5 @ 2018-06-29T09:27:54.500 signed by eosio [trxs: 0, lib: 4, confirmed: 0]

7

参考文档

1)Windows10下 opencv2.4.9+dlib19.7+Visual Studio 2017 配置教程

(https://blog.csdn.net/v645589437/article/details/78373728)

2) EOS智能合约开发(一):EOS环境搭建和启动节点[P叔]

(https://blog.csdn.net/qq_42204339/article/details/80395981)

3)官网本地环境搭建

(https://github.com/EOSIO/eos/wiki/Local-Environment)

4)EOSIO编译安装[古千峰@BTCMedia]

(https://github.com/eoshackathon/eos_dapp_development_cn/blob/master/docs/eos_compile_install.md)

5)EOS测试环境快速搭建

(https://www.jianshu.com/p/c47091d69dde)

本文作者:HiBlock区块链技术布道群-辉哥

原文发布于简书

原文链接:https://www.jianshu.com/p/55cd194eff7a

加微信baobaotalk_com,加入技术布道群

以下是我们的社区介绍,欢迎各种合作、交流、学习:)

image

错误:xxx target_link_libraries xxx must be either all-keyword or all-plain 如果是使用关键字方式,则都应该使用关键字方式,如果是使用非关键字方式,则都应该使用非关键字方式。函数有两种使用方式,即关键字方式和非关键字方式。这两种方式不能混用在同一个目标上。那么就所有都要标明,如果没有标明的话,那就全部都不要标明。函数的关键字签名被混用了,这是不允许的。的使用方式是一致的。在 CMake 中, 阅读详情

相关推荐

EOS开发环境搭建

EOS开发环境搭建   在上一篇文章《扒一扒EOS的前世今生》中,我们已经了解了EOS以及他的创始人Daniel Larimer的故事,本次为大家带来的是关于EOS开发环境搭建的内容。首先我们来了解一下EOS的核心架构和白皮书。 1. EOS的核心架构   EOS网络由21个超级节点和100个备选节点构成,这21个超级节点负责轮流产生区块,避免了挖矿竞赛的问题,有效的提高同步数据的性能。 2...

P叔的博客 703

编译一个开源软件遇到的问题总结

安装这个软件遇到了两个比较麻烦的事情,一个是Threads这个问题,在百度上几乎没有解决方法,即使有的,也不全,只有部分。可怜的国内程序员,解决问题都如此难。第二个是TBB的版本问题,搞得不得安生,亏得有人帮忙,才解决了。国内的软件安装太麻烦了,好多软件都下载不了,包括Github也经常断网,更别提别的了。下个虚拟机,也得等上半天。在线安装Qt,不断让重试。而且使用的Gcc版本有点高,即使Supra编译成功了,也有大量的警告,如果使用Gcc9就没有这些警告。

fpcc的专栏 1230

EOS主网账号,钱包申请 教程(未完全版本)

没玩过虚拟机,更不会ubuntu的数据分析师,不是好的币圈投机者。我说了虾米?我也不知道,只知道我现在要写的是什么,那就是,敲黑板啦,记录下搭建环境爬坑过程。在这个过程中,可能会出现这样或者那样的问题,怎么办咧,GOOGLE或者百度一下,基本都能够解决。我花了三天时间(对比别人的5分钟解决,53333实在得捂脸)。 下载虚拟机VMware 18.04版本 安装ubuntu ...

AIYA_aya的博客 2088

【已解决】The plain signature for target_link_libraries has already been used with the target “run_imag

一、问题描述 cmake时报错 CMake Error at example/CMakeLists.txt:74 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "run_image_slam". All uses of target_link_libraries with a target must be either al

weixin_45617478的博客 8459

一、EOS智能合约开发环境的搭建

欲要舒适的畅游在EOS合约开发的海洋里, 必须要有一艘稳固的小船载着你, 而在这里我用的是VSCODE这一利器。 笔者系统环境:win10企业版 整体运行环境:在win10里面开启hyper-v虚拟机服务, 然后在虚拟机里面安装ubantu16.04系统, 接着在ubantu16.04系统里安装eosio, 包含命令行环境(cleos等)以及智能合约编译环境(eosio.cdt), 到这里就完成了...

凝视深渊 436

【ROS2】ROS2+Qt6在编译时报错:target_link_libraries

查看ROS2源码:/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake。将自己的CMakeLists.txt中 ament_target_dependencies 替换成 target_link_libraries。ROS2 的 ament_target_dependencies 内部使用了没有关键字的 target_link_libraries。注意:CMake 要求对。

郭老二 381

【CMake报错&解决】项目中所有链接库要么都是Private要么都不是,否则会报错

一个项目中所有链接库要么都是Private要么都不是,否则会报错:(如蓝色框所示)

Zoey的博客 664

MT6816角度传感器SPI通信避坑指南:从数据手册到稳定读取的3个关键步骤

本文详细解析了MT6816角度传感器SPI通信中的常见问题与解决方案,包括寄存器地址计算、SPI时序配置和数据校验等关键步骤。通过实测波形和代码示例,帮助工程师避开数据手册中的隐藏陷阱,实现稳定可靠的角度数据读取,特别适用于高精度电机控制场景。

weixin_42520573的博客 534

在Ubuntu16.04 上搭建EOS 环境

本文主要介绍如何在 Ubuntu 16.04 上搭建 EOS 环境 (喷血吐槽: MMP,从来没有一行代码没写,搭个环境搭了一个礼拜...) 参考文章: https://www.jianshu.com/p/47ea4d11d997 https://www.jianshu.com/p/c47091d69dde 搭建环境前注意事项: 虚拟机要求分配至少 8G...

qq1169091731的博客 394

从jieba分词到BERT-wwm——中文自然语言处理(NLP)基础分享系列(12)

今天是本系列的最后一期,完整代码呈现Huggingface transformers平台上微调BERT-wwm-ext的过程方法。

weixin_49518391的博客 3773

android so文件攻防实战-美团libmtguard.so反混淆

接下来的代码很多都是这种动态计算跳转地址的。修复结束之后跟踪指令,0x3434处的代码跳到了0x345A,0x345A处的代码主要逻辑是在0x34C6跳到0x34EC通过0x34EC动态计算地址跳到了0x3520,0x3524处的代码跳到了0x365C,0x366E处的代码跳到了0x35A8,0x35A8是JNI_OnLoad的主要逻辑。BEQ和BNE是一对条件相反的跳转,这之前计算出接下来指令的地址0x3430赋值给R4,loc_340C处的代码通过POP指令将R4的值给PC,看0x3430处的代码。

2503_90751938的博客 1398

第4课 如何在UBUNTU虚拟机上编译EOS完成环境搭建?

1,摘要 【本文目标】 通过本文实践,能在WINDOWS操作系统搭建UBUNTU 18.04 LTS环境,并在此环境编译成功EOS v1.0.5正式发布版本。 【前置条件】 有学习EOS环境搭建意向,不怕折腾。 【技术收获】 1)搭建UBUNTU 18.04 LTS环境 2)在硬件要求不满足官方要求的环境下EOS环境编译成功 3) EOS编译过程中的踩坑排查能力 2,编译血泪史 EOS主网上线没...

辉哥的技术投资路 1073

BERTopic模型入门教程(附代码+参数调节)

BERTopic 是一种用于从文本数据中提取主题模型的新型方法。通过结合 BERT嵌入和传统的主题模型来生成语义丰富的主题。传统的主题模型(如LDA)主要依赖于词频矩阵,而 BERTopic 通过预训练语言模型生成高维语义嵌入来捕捉词语间的复杂关系,因此可以更好地处理上下文信息。BERTopic模型可以看作是创建其主题表示的一系列步骤。核心原理如下:就本质而言,BERTopic就是一个拼装框架,可以把每部分都替换成其他模型,只要完成任务即可。

m0_52069102的博客 1万+

EOS环境搭建

MongoDB下载本篇教程适用于以下系统,但是不论你的电脑是 windows 还是 mac,都强烈建议安装一个虚拟机,在 Ubuntu 上搞,因为 Mac 上有很多坑。安装 Ubuntu 虚拟机有关教程大家可以在网上搜到。•Amazon 2017.09 and higher.•Centos 7.•Fedora 25 and higher (Fedora 27 recommended).•Min...

nsh119的博客 2274

别再只盯着DDR5了!聊聊3D DRAM:它凭什么能解决AI算力的内存墙难题?

本文深入探讨了3D DRAM技术如何突破AI算力的内存墙限制。通过立体堆叠架构,3D DRAM在存储密度、带宽和延迟方面实现显著提升,有效解决AI训练和推理中的内存瓶颈问题。文章还分析了三星、SK海力士等巨头的技术路线图,并指出商业化面临的挑战与机遇。

weixin_42685438的博客 205

LSTM 深度解析从原理推演到现代序列建模的演进

LSTM(Long Short-Term Memory,长短期记忆网络)是一种特殊的递归神经网络(RNN),它通过引入记忆单元(Cell State)来解决普通RNN在长序列数据处理中的梯度消失问题。LSTM可以在长时间的序列中捕捉依赖关系,是一种非常适合处理时间序列、自然语言处理、语音识别等任务的深度学习模型。在LSTM中,记忆单元(Cell State)是一个贯穿整个序列的数据通道,用于存储和传递关键信息。记忆单元在LSTM的时间步之间保持信息的持久性,可以看作是一个长期记忆的“容器”。

hello.reader 3万+

EOS源码编译安装踩坑血泪史

EOS使得区块链进入了3.0时代,处理交易的速度更快,DPos共识机制让资源消耗更小。要学习EOS,先从其源码的编译安装开始。 源码安装的过程参考EOS官网教程:Shell Scripts | EOSIO Developer Docs 安装环境:Ubuntu18.04 官网的教程看起来操作非常简单,但是我在安装的过程中遇到了很多问题,卡了好几天才彻底解决。下面按照我的操作过程,依次描述遇到的主要问题以及找到其对应解决方法的血泪史。 一、下载源码中的问题 将源码下载到eosio/eos文件夹中后,因

ClarkCC的博客 1万+

【fpdlink显示】DS90UB948关于941连接948 GPIO调试问题

1. 前言 使用一个941连接2 948显示: 941的GPIO0/1/2/3到前948的GPIO0/1/2/3和941的D_GPIO0/1/2/3到948的GPIO0/1/2/3。 设置gpio3输出,则941的D_GPIO3设置高,而948的gpio3设置不高; 但设置gpio3输入后,看到941的D_GPIO3跟随948的gpio3变化。 2. 原理图连接 3. 测试代码 static int du90ub941_enable_port(struct goodix_ts_d

jzwjzw19900922的博客 2566

Ubuntu虚拟机EOS安装教程

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录前言一、pandas是什么?二、使用步骤1.引入库2.读入数据总结欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入

JerryViolet的博客 777

手把手教你学simulink(42.1)--储能系统场景示例:基于Simulink的电池+超级电容器混合储能系统

混合储能系统(HESS)结合了电池和超级电容器的优点,能够在满足高功率需求的同时提供较长的持续放电时间。这种组合特别适合用于电动汽车、可再生能源发电系统、电网频率调节等应用场景。本项目将详细介绍如何在MATLAB/Simulink中搭建一个完整的基于电池和超级电容器的混合储能系统,并提供具体的代码实现和设计步骤。如果你需要实现更复杂的控制逻辑,可以使用MATLAB Function模块。以下是一个简单的例子,展示了如何在该模块中实现一个条件逻辑,以分配电池和超级电容器的充放电任务。Matlab。

MHD0815的博客 551

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

eos开发(一) eos开发环境搭建

区块链最近挺火的,我又是个非常缺钱的人,所以紧跟了潮流一头扎进区块链的研究中。 这EOS项目是目前比较火的一个项目,相信很多朋友拿到这份EOS的源代码后都会一脸懵逼,因为……这代码写得太高级了,老纸看不懂(各种宏各种模板元编程各种智能指针和所谓的石墨烯技术……在哪里?) 目前EOS项目是只能运行在Linux和Mac操作系统上的,要想在Windows上运行,得想想点特别得招,至于什么招...

aan5489的博客 237

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

上一篇: 区块链100讲:Solidity语法难点解析及故障排查
下一篇: 区块链100讲:以太坊开发环境部署(附代码)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址