conan入门(二十七):因profile [env]字段废弃导致的boost/1.81.0 在aarch64-linux-gnu下交叉编译失败

今天在尝试用conan 1.60.0使用aarch64-linux-gnu编译器交叉编译boost/1.81.0时报错了:

conan install boost/1.81.0@ -pr:h aarch64-linux-gnu.jinja -pr:b default --build boost

输出如下:

Configuration (profile_host):
[settings]
arch=armv8
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
AR=aarch64-linux-gnu-ar
AS=aarch64-linux-gnu-as
CC=aarch64-linux-gnu-gcc
CHOST=aarch64-linux-gnu
CONAN_CMAKE_GENERATOR=Unix Makefiles
CONAN_CMAKE_TOOLCHAIN_FILE=/home/gyd/.conan/profiles/../cmake/aarch64-linux-gnu.toolchain.cmake
CROSS_COMPILER_PREFIX=/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu
CXX=aarch64-linux-gnu-g++
LD=aarch64-linux-gnu-ld
RANLIB=aarch64-linux-gnu-ranlib
STRIP=aarch64-linux-gnu-strip
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
os_build=Linux
[options]
[build_requires]
[env]boost/1.81.0: Forced build from source
Installing package: boost/1.81.0
Requirementsboost/1.81.0 from 'pub' - Cachebzip2/1.0.8 from 'pub' - Cachelibbacktrace/cci.20210118 from 'pub' - Cachezlib/1.2.13 from 'pub' - Cache
Packagesboost/1.81.0:3aac81ffa04cca0028f0506d5a46ab398161b6d4 - Buildbzip2/1.0.8:75c0a8a066a2422a4e85cba63decf52760f1010c - Cachelibbacktrace/cci.20210118:8fd38d381db52e2495321ce060b9f457656f6c8f - Cachezlib/1.2.13:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
Build requirementsb2/4.9.6 from 'conancenter' - Cache
Build requirements packagesb2/4.9.6:4db1be536558d833e52e862fd84d64d75c2b3656 - CacheCross-build from 'Linux:x86_64' to 'Linux:armv8'
Installing (downloading, building) binaries...
b2/4.9.6: Already installed!
bzip2/1.0.8: Already installed!
libbacktrace/cci.20210118: Already installed!
zlib/1.2.13: Already installed!
boost/1.81.0: Applying build-requirement: b2/4.9.6
boost/1.81.0: WARN: Build folder is dirty, removing it: /home/gyd/.conan/data/boost/1.81.0/_/_/build/3aac81ffa04cca0028f0506d5a46ab398161b6d4
boost/1.81.0: Building your package in /home/gyd/.conan/data/boost/1.81.0/_/_/build/3aac81ffa04cca0028f0506d5a46ab398161b6d4
boost/1.81.0: Generator txt created conanbuildinfo.txt
boost/1.81.0: Calling generate()
boost/1.81.0: Aggregating env generators
boost/1.81.0: Calling build()
boost/1.81.0: WARN: replace_in_file didn't find pattern '$(>) > $(<)' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/libs/stacktrace/build/Jamfile.v2' file.
boost/1.81.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.81.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.81.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/src/tools/gcc.jam' file.
boost/1.81.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/src/tools/gcc.jam' file.
boost/1.81.0: WARN: replace_in_file didn't find pattern '    <conditional>@numa' in '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/libs/fiber/build/Jamfile.v2' file.
boost/1.81.0: WARN: Patching user-config.jam
boost/1.81.0: WARN: 
using zlib : 1.2.13 : <include>"/home/gyd/.conan/data/zlib/1.2.13/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f/include" <search>"/home/gyd/.conan/data/zlib/1.2.13/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f/lib" <name>z ;
using bzip2 : 1.0.8 : <include>"/home/gyd/.conan/data/bzip2/1.0.8/_/_/package/75c0a8a066a2422a4e85cba63decf52760f1010c/include" <search>"/home/gyd/.conan/data/bzip2/1.0.8/_/_/package/75c0a8a066a2422a4e85cba63decf52760f1010c/lib" <name>bz2 ;
using "gcc" :  :  "/usr/bin/g++" : 
<compileflags>"-I/home/gyd/.conan/data/libbacktrace/cci.20210118/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f/include" <linkflags>"-L/home/gyd/.conan/data/libbacktrace/cci.20210118/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f/lib"  ;
boost/1.81.0: Cross building, detecting compiler...
boost/1.81.0: Cross building flags: []
boost/1.81.0: WARN: b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/home/gyd/.conan/data/libbacktrace/cci.20210118/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/home/gyd/.conan/data/boost/1.81.0/_/_/package/3aac81ffa04cca0028f0506d5a46ab398161b6d4 -j4 --abbreviate-paths -d0 --debug-configuration --build-dir="/home/gyd/.conan/data/boost/1.81.0/_/_/build/3aac81ffa04cca0028f0506d5a46ab398161b6d4/build-release"
notice: found boost-build.jam at /home/gyd/.conan/data/boost/1.81.0/_/_/source/src/boost-build.jam
notice: loading B2 from /home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel/bootstrap.jam
notice: Searching '/etc' '/home/gyd' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/util' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/build' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/tools' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/contrib' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/home/gyd' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/util' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/build' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/tools' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/contrib' '/home/gyd/.conan/data/b2/4.9.6/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/.'.
notice: Loading explicitly specified user configuration file:/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam
notice: Searching '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: will use '/usr/bin/g++' for gcc, condition <toolset>gcc-11
notice: using gcc libraries :: <toolset>gcc-11 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
notice: using gcc archiver :: <toolset>gcc-11 :: /usr/bin/ar
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam:5
notice: using rc compiler :: <toolset>gcc-11 :: /usr/bin/as
notice: [zlib] zlib is already configured
notice: [bzip2] bzip is already configured
notice: iostreams: not using lzma compression 
notice: iostreams: not using zstd compression 
notice: [python-cfg] Configuring python...
notice: [python-cfg] Checking interpreter command "python"...
notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg]   interpreter command: "python"
notice: [python-cfg]   include path: "/usr/include/python3.10"
notice: [python-cfg]   library path: "/usr/lib/python3.10/config" "/usr/lib"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy disabled. Reason:
notice: [python-cfg]   python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())" aborted with 
notice: [python-cfg]   Traceback (most recent call last):File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
Performing configuration checks- default address-model    : 64-bit [1]- default architecture     : x86 [1]- has std::atomic_ref      : no [2]- has statx                : yes [2]- has init_priority attribute : yes [2]- has stat::st_blksize     : yes [2]- has stat::st_mtim        : yes [2]- has stat::st_mtimensec   : no [2]- has stat::st_mtimespec   : no [2]- has stat::st_birthtim    : no [2]- has stat::st_birthtimensec : no [2]- has stat::st_birthtimespec : no [2]- has fdopendir(O_NOFOLLOW) : yes [2]- has POSIX *at APIs       : yes [2]- cxx11_auto_declarations  : yes [2]- cxx11_constexpr          : yes [2]- cxx11_defaulted_functions : yes [2]- cxx11_final              : yes [2]- cxx11_hdr_mutex          : yes [2]- cxx11_hdr_tuple          : yes [2]- cxx11_lambdas            : yes [2]- cxx11_noexcept           : yes [2]- cxx11_nullptr            : yes [2]- cxx11_rvalue_references  : yes [2]- cxx11_template_aliases   : yes [2]- cxx11_thread_local       : yes [2]- cxx11_variadic_templates : yes [2]- has_icu builds           : no [2]- zlib                     : yes [3]- bzip2                    : no [3]- cxx11_decltype           : yes [2]- cxx11_basic_alignas      : yes [2]- iconv (libc)             : yes [2]- cxx11_defaulted_moves    : yes [2]- cxx11_hdr_functional     : yes [2]- cxx11_hdr_type_traits    : yes [2]- cxx11_override           : yes [2]- cxx11_range_based_for    : yes [2]- cxx11_scoped_enums       : yes [2]- cxx11_smart_ptr          : yes [2]- cxx11_static_assert      : yes [2]- native atomic int32 supported : yes [2]- native syslog supported  : yes [2]- pthread supports robust mutexes : yes [2]- lockfree boost::atomic_flag : yes [2]- gcc visibility           : yes [2]- sfinae_expr              : yes [2]- cxx11_unified_initialization_syntax : yes [2]- cxx11_hdr_initializer_list : yes [2]- cxx11_hdr_chrono         : yes [2]- cxx11_numeric_limits     : yes [2]- cxx11_hdr_array          : yes [2]- cxx11_hdr_atomic         : yes [2]- cxx11_allocator          : yes [2]- cxx11_explicit_conversion_operators : yes [2]- long double support      : yes [2]- std::fstream is moveable and swappable : yes [2]- Has Large File Support   : yes [2]- Has attribute init_priority : yes [2]- libbacktrace builds      : yes [2]- addr2line builds         : yes [2]- WinDbg builds            : no [2]- WinDbg builds            : no [4]- WinDbgCached builds      : no [2]- WinDbgCached builds      : no [4]- BOOST_COMP_GNUC >= 4.3.0 : yes [2]- cxx11_hdr_thread         : yes [2]- cxx11_hdr_regex          : yes [2][1] gcc-11
[2] gcc-11/rls/abi-apcs/archt-arm/bst.l-lbc/bst.l-on/bst.l-off/lnk-sttc/nm-on/pythn-3.10/thrdp-pthrd/thrd-mlt/vsblt-hdn
[3] lnk-sttc
[4] gcc-11/rls/abi-apcs/archt-arm/bst.l-lbc/bst.l-on/bst.l-off/bld-no/lnk-sttc/nm-on/pythn-3.10/thrdp-pthrd/thrd-mlt/vsblt-hdnComponent configuration:- atomic                   : building- chrono                   : building- container                : building- context                  : building- contract                 : building- coroutine                : building- date_time                : building- exception                : building- fiber                    : building- filesystem               : building- graph                    : building- graph_parallel           : not building- headers                  : not building- iostreams                : building- json                     : building- locale                   : building- log                      : building- math                     : building- mpi                      : not building- nowide                   : building- program_options          : building- python                   : not building- random                   : building- regex                    : building- serialization            : building- stacktrace               : building- system                   : building- test                     : building- thread                   : building- timer                    : building- type_erasure             : building- url                      : building- wave                     : buildingmake_arm64_aapcs_elf_gas.S: Assembler messages:
make_arm64_aapcs_elf_gas.S:61: Error: too many memory references for `and'
make_arm64_aapcs_elf_gas.S:64: Error: too many memory references for `sub'
make_arm64_aapcs_elf_gas.S:68: Error: too many memory references for `str'
make_arm64_aapcs_elf_gas.S:72: Error: no such instruction: `adr x1,finish'
make_arm64_aapcs_elf_gas.S:73: Error: too many memory references for `str'
make_arm64_aapcs_elf_gas.S:75: Error: unsupported syntax for `ret'
make_arm64_aapcs_elf_gas.S:79: Error: expecting operand after ','; got nothing
make_arm64_aapcs_elf_gas.S:81: Error: no such instruction: `bl _exit'
...failed updating 1 target...
boost/1.81.0: 
boost/1.81.0: ERROR: Package '3aac81ffa04cca0028f0506d5a46ab398161b6d4' build failed
boost/1.81.0: WARN: Build folder /home/gyd/.conan/data/boost/1.81.0/_/_/build/3aac81ffa04cca0028f0506d5a46ab398161b6d4/build-release
ERROR: boost/1.81.0: Error in build() method, line 887self.run(full_command)ConanException: Error 1 while executing b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/home/gyd/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/home/gyd/.conan/data/libbacktrace/cci.20210118/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/home/gyd/.conan/data/boost/1.81.0/_/_/package/3aac81ffa04cca0028f0506d5a46ab398161b6d4 -j4 --abbreviate-paths -d0 --debug-configuration --build-dir="/home/gyd/.conan/data/boost/1.81.0/_/_/build/3aac81ffa04cca0028f0506d5a46ab398161b6d4/build-release"

从后面这段可以看出是编译器在编译arm64汇编代码时出错了
在这里插入图片描述
如果编译器设置正确应该不会出现这个错误,于是从输出日志再往上找我又找到了这段
在这里插入图片描述
果然是使用本机编译器g++而不是交叉编译器 aarch64-linux-gnu-g++

boost是由b2执行编译的,使用哪个编译器由环境变量CC来决定,CC定义在profile,所以问题应该出在profile.

如下是执行aarch64-linux-gnu交叉编译使用的profile,
aarch64-linux-gnu.jinja

include(default)
target_host=aarch64-linux-gnu
[settings]
arch=armv8
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=5.4
os=Linux
[options]
[env]
CHOST=$target_host
CC=$target_host-gcc
CXX=$target_host-g++
AR=$target_host-ar
AS=$target_host-as
RANLIB=$target_host-ranlib
LD=$target_host-ld
STRIP=$target_host-strip
#########################################################################################
# 指定./conan/cmake/aarch64-linux-gnu.toolchain.cmake 为cmake 工具链文件             #
#########################################################################################
{% set toolchain = os.path.join(profile_dir, "..","cmake","aarch64-linux-gnu.toolchain.cmake") %}
CONAN_CMAKE_TOOLCHAIN_FILE={{ toolchain }}
CONAN_CMAKE_GENERATOR="Unix Makefiles"

这个profile是我一年前写的,当时可以正确执行交叉编译,当然了,那个时候使用的conan 版本是1.45.0,一年多过去了,conan的版本迭代很快,目前我使用的是conan 1.x的接近最新版本1.60.0(1.x下当前最新版本是1.60.2),
会不会是因为版本更新来带的兼容性问题呢?
打开conan官方文档profile相关的页面 https://docs.conan.io/1/reference/profiles.html
第一眼就看到了这个
在这里插入图片描述
原来profile中的[env]字段名被废弃了,改为了[buildenv],
再看[buildenv]的说明:从1.35.0开始新增加了这个字段,用于替换[env]
在这里插入图片描述

立即把上面aarch64-linux-gnu.jinja profile中的[env]改为[buildenv]再如下执行boost交叉编译通过

conan install boost/1.81.0@ -pr:h aarch64-linux-gnu.jinja -pr:b default --build boost

conan系列文章

《conan入门(一):conan 及 JFrog Artifactory 安装》
《conan入门(二):conan 服务配置-密码管理及策略》
《conan入门(三):上传预编译的库(artifact)》
《conan入门(四):conan 引用第三方库示例》
《conan入门(五):conan 交叉编译引用第三方库示例》
《conan入门(六):conanfile.txt conanfile.py的区别》
《conan入门(七):将自己的项目生成conan包》
《conan入门(八):交叉编译自己的conan包项目》
《conan入门(九):NDK交叉编译自己的conan包项目塈profile的定义》
《conan入门(十):Windows下Android NDK交叉编译Boost》
《conan入门(十一):Linux下Android NDK交叉编译Boost》
《conan入门(十二):Windows NDK 编译 boost报错:CMake was unable to find a build program … MinGW Makefile》
《conan入门(十三):conan info 命令的基本用法》
《conan入门(十四):conan new 命令的新特性–模板功能(–template)》
《conan入门(十五):AttributeError: ‘CMake‘ object has no attribute ‘definitions‘》
《conan入门(十六):profile template功能实现不同平台下profile的统一》
《conan入门(十七):支持android NDK (armv7,armv8,x86,x86_64)交叉编译的统一profile jinja2模板》
《conan入门(十八):Cannot recognize the Windows subsystem, install MSYS2/cygwin or specify a build_require》
《conan入门(十九):封装第三方开源库cpp_redis示例》
《conan入门(二十):封装只包含头文件(header_only)的库示例》
《conan入门(二十一):解决MinGW编译Openssl的编译错误:crypto/dso/dso_win32.c》
《conan入门(二十二):编译 openssl要求python 3.7以上版本》
《conan入门(二十三):Windows下MinGW编译libcurl》
《conan入门(二十四):通过CONAN_DISABLE_CHECK_COMPILER禁用编译器检查》
《conan入门(二十五):imports将包安装到本地项目或其他指定位置》
《conan入门(二十七):因profile [env]字段废弃导致的boost/1.81.0 在aarch64-linux-gnu下交叉编译失败》
《conan入门(二十八):解决conan 1.60.0下 arch64-linux-gnu交叉编译openssl/3.1.2报错问题》
《conan入门(二十九):对第三方库mnn进行Conan封装塈conans.CMake和conan.tools.cmake.CMake的区别》
《conan入门(三十):对腾讯ncnn进行Conan封装》

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/144328.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

SQL做流水号

SELECT REPLICATE(0, 3 - LEN(3)) 3 AS 流水号 SELECT REPLICATE(0, 5 - LEN(3)) 3 AS 流水号 SELECT REPLICATE(0, 8 - LEN(3)) 3 AS 流水号

Java中String转换为double类型

这次的java作业是写一个数字转换的小项目&#xff0c;其中从输入框中获取的是String类型&#xff0c;但是要进行数字操作&#xff0c;此时要用到很多操作String类型数据的方法了。 从javafx输入框中获取到String类型后&#xff0c;首先是要判断是否能转换为数字或者小数形式&a…

实验三十三、三端稳压器 LM7805 稳压性能的研究

一、题目 LM7805 输出电压、电压调整率、电流调整率以及输出纹波电压的研究。 二、仿真电路 电路如图1所示。集成稳压芯片采用 LM7805CT。 三、仿真内容 &#xff08;1&#xff09;测量图1&#xff08;a&#xff09;LM7805CT 的电压调整率&#xff0c;测量条件为 I O 50…

嵌入式Linux应用开发-基础知识-第十七章异常与中断的概念及处理流程

嵌入式Linux应用开发-基础知识-第十七章异常与中断的概念及处理流程 第十七章 异常与中断的概念及处理流程17.1 中断的引入17.1.1 妈妈怎么知道孩子醒了17.1.2 嵌入系统中也有类似的情况 17.2 中断的处理流程17.3 异常向量表17.4 参考资料 第十七章 异常与中断的概念及处理流程…

【C语言】快速排序

文章目录 一、hoare版本二、挖坑法三、前后指针法四、非递归快排五、快速排序优化1、三数取中选key值2、小区间优化 六、代码测试 一、hoare版本 快速排序是Hoare于1962年提出的一种二叉树结构的交换排序方法&#xff0c;其基本思想为&#xff1a;任取待排序元素序列中的某元素…

今天刷到一条有用的抖音---网站文档copy的解禁

有的时候在网上查找一些资料&#xff0c;发现些有用的东西的时候&#xff0c;兴高采烈的复制一下&#xff0c;然后网站弹出一个菜单让你付钱~~如下图&#xff1a; 此时&#xff0c;可以在该网页上&#xff0c;按F12&#xff0c;召唤出调试窗口&#xff0c;在事件监听器中&#…

美国零售电商平台Target,值得入驻吗?如何入驻?

Target 是美国最大的零售商之一&#xff0c;在品牌出海为大势所趋的背景下&#xff0c;它在北美电商中的地位节节攀升。Target 商店在众多垂直领域提供各种价格实惠的自有品牌&#xff0c;吸引越来越多的跨境商家入驻&#xff0c;如美妆、家居、鞋服、日用百货等&#xff0c;随…

【STM32笔记】HAL库I2C通信配置、读写操作及通用函数定义

【STM32笔记】HAL库I2C通信配置、读写操作及通用函数定义 文章目录 I2C协议I2C配置I2C操作判断I2C是否响应I2C读写 附录&#xff1a;Cortex-M架构的SysTick系统定时器精准延时和MCU位带操作SysTick系统定时器精准延时延时函数阻塞延时非阻塞延时 位带操作位带代码位带宏定义总…

Python爬虫教程——解析网页中的元素

前言&#xff1a; 嗨喽~大家好呀&#xff0c;这里是小曼呐 ~ 在我们理解了网页中标签是如何嵌套&#xff0c;以及网页的构成之后&#xff0c; 我们就是可以开始学习使用python中的第三方库BeautifulSoup筛选出一个网页中我们想要得到的数据。 接下来我们了解一下爬取网页信息…

基于自适应启动策略的混合交叉动态约束多目标优化算法(MC-DCMOEA)求解CEC2015/CEC2018/CEC2023(MATLAB代码)

一、动态多目标优化问题 1.1问题定义 1.2 动态支配关系定义 二、 基于自适应启动策略的混合交叉动态多目标优化算法 基于自适应启动策略的混合交叉动态多目标优化算法&#xff08;Mixture Crossover Dynamic Constrained Multi-objective Evolutionary Algorithm Based on Se…

高速数字化仪为您带来高效RF测量秘籍!

模块数字化仪能够以16 bit高分辨率采集2 GHz带宽的RF信号。虹数字化仪能够使用许多RF和较低频率微波的测试。本文重点介绍使用虹科数字化仪进行RF测量相关内容。 高数据通量测试 基于多通道PCIe的数字化仪&#xff0c;可以以高达12.8 GBytes/s的速度传输数据&#xff0c;从而…

云中网络的隔离GREVXLAN

底层的物理网络设备组成的网络我们称为 Underlay 网络&#xff0c;而用于虚拟机和云中的这些技术组成的网络称为 Overlay 网络&#xff0c;这是一种基于物理网络的虚拟化网络实现。 第一个技术是 GRE&#xff0c;全称 Generic Routing Encapsulation&#xff0c;它是一种 IP-o…

Serverless 数仓技术与挑战(内含 PPT 下载)

近期&#xff0c;Databend Labs 联合创始人张雁飞发表了题为「Serverless 数仓技术与挑战」的主题分享。以下为本次分享的精彩内容&#xff1a; 主题&#xff1a; 「Serverless 数仓技术与挑战」 演讲嘉宾&#xff1a; 张雁飞 嘉宾介绍&#xff1a; Databend Labs 联合创始人…

c++迷宫小游戏

一、总结 一句话总结&#xff1a; 显示&#xff1a;根据map数组输出图像 走动&#xff1a;修改map数组的值&#xff0c;每走一步重新刷新一下图像就好 1、如果走函数用z()&#xff0c;出现输入s会向下走多步的情况&#xff0c;原因是什么&#xff1f; 向下走两层循环ij增加&a…

openlayers-18-聚合显示补充(切换聚合与非聚合状态)

最近有一些网友问我&#xff0c;聚合显示怎么实现聚合与不聚合之间的切换&#xff0c;有很多方法能够实现&#xff0c;下面是一个示例作为参考。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-…

LabVIEW开发低成本静脉监测和控制输液系统

LabVIEW开发低成本静脉监测和控制输液系统 信息技术的使用和进步彻底改变了现代医疗保健的面貌。医院、疗养院和其他姑息治疗院需要不同的人力资源&#xff0c;如医生、技术人员、护士和其他工作人员&#xff0c;他们共同提供最先进的医疗保健。COVID-19大流行表现出严重缺乏此…

【Linux学习】04Linux实用操作

Linux&#xff08;B站黑马&#xff09;学习笔记 01Linux初识与安装 02Linux基础命令 03Linux用户和权限 04Linux实用操作 文章目录 Linux&#xff08;B站黑马&#xff09;学习笔记前言04Linux实用操作各类小技巧&#xff08;快捷键&#xff09;ctrl c 强制停止ctrl d 退出或…

MySQL - group by分组查询 (查询操作 三)

功能介绍 group by: 对数据进行分组和聚合操作(可以操作单字段和多字段) having&#xff1a;过滤group by的结果&#xff0c;也就是在分组后添加筛选条件 基础语法 select 字段列表 from 表名 [ where 条件 ] group by 分组字段名 [ having ]; where 和 having的区…

ROS系统通过类定义实现数据处理并重新发布在另一话题

在实际应用中&#xff0c;经常需要在同一个节点内接受数据&#xff0c;在回调函数中将数据进行处理&#xff0c;再将新数据重新发布在另一个新话题上。 实现步骤&#xff1a; 1. 定义一个数据处理类SubscribeAndPublish&#xff0c;设置2个pub成员对象和1个sub成员对象为publ…

Mysql生产随笔

目录 1. Mysql批量Kill删除processlist 1.1查看进程、拼接、导出、执行 1.2常见错误解决方案 2.关于时区 3.内存占用优化 记录一下生产过程中的一些场景和命令使用方法&#xff0c;不定期进行更新 1. Mysql批量Kill删除processlist 1.1查看进程、拼接、导出、执行 sho…