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

news2024/11/16 7:19:53

今天在尝试用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
Requirements
    boost/1.81.0 from 'pub' - Cache
    bzip2/1.0.8 from 'pub' - Cache
    libbacktrace/cci.20210118 from 'pub' - Cache
    zlib/1.2.13 from 'pub' - Cache
Packages
    boost/1.81.0:3aac81ffa04cca0028f0506d5a46ab398161b6d4 - Build
    bzip2/1.0.8:75c0a8a066a2422a4e85cba63decf52760f1010c - Cache
    libbacktrace/cci.20210118:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
    zlib/1.2.13:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
Build requirements
    b2/4.9.6 from 'conancenter' - Cache
Build requirements packages
    b2/4.9.6:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache

Cross-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-hdn

Component 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                     : building

make_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 887
	self.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报错问题》

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

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

相关文章

iOS——present相关属性以及dismiss多级的方法

push和present 两者的区别 push: push由视图栈控制&#xff0c;每一个视图都入栈&#xff0c;调用之前的视图则需要出栈&#xff0c;可返回任意一层&#xff0c;一般用于同一业务不同界面之间的切换。 push是由UINavigationController管理的视图控制器堆栈&#xff0c;在wind…

CSS3实现上下拉长加载动画效果

上下拉长加载动画效果 <!DOCTYPE html> <html><head><style>.container {display: flex;justify-content: center;align-items: center;width: 150px;height: 150px;margin: 50px auto;}.rectangle {width: 20px;height: 50px;background-color: #02A…

黑马JVM总结(十九)

&#xff08;1&#xff09;GC调优1 通过官网查看查看JVM的参数&#xff1a; 可以使用java命令查看当前环境下的虚拟机参数&#xff1a; 学会使用一些工具如前面学的jmap &#xff0c;jconsole等等工具 &#xff08;2&#xff09;GC调优2 垃圾回收调优只是众多调优中的一个方…

基于微信小程序的电动车智能充电系统设计与实现(源码+lw+部署文档+讲解等)

文章目录 前言运行环境说明用户的主要功能有&#xff1a;管理员的主要功能有&#xff1a;具体实现截图详细视频演示为什么选择我自己的网站自己的小程序&#xff08;小蔡coding&#xff09;有保障的售后福利 代码参考论文参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌…

THREE.JS 3D模型服务器报404问题(VUE fbx文件在本地能显示 服务器上不显示报404)

问题&#xff1a; 作为新手&#xff0c;新建立的threeJS模型&#xff0c;本地运行模型是可以显示的 &#xff0c;但服务器模型却报404 写法&#xff1a; fbxloader("TR7007Q").then((tree) > { tree.position.set(-1080, -20, 0);this.$refs.draw.scene.add(tree…

编辑.htaccess文件执行任意代码(CVE-2022-25578)

简介 CVE-2022-25578是Taocms v3.0.2中存在的一个安全漏洞&#xff0c;该漏洞允许攻击者通过任意编辑.htaccess文件来执行代码注入攻击。 Taocms是一个完善支持多数据库&#xff08;Sqlite/Mysql&#xff09;的CMS网站内容管理系统&#xff0c;是国内最小且功能完善的基于php…

DM/达梦数据库查询或更新某一列中多个字典码对应内容

准备工作&#xff08;建表、插入数据&#xff09; 1、建立表格&#xff1a;学生-学习科目表student_study 注意&#xff1a;科目kemu列内容是字典码&#xff0c;需要更换成对应内容。 CREATE TABLE "TEST"."STUDENT_STUDY" ( "NAME" VARCHAR(2…

技术分享| anyRTC音视频混流技术解析

一&#xff0c;简介 在视频通讯场景中&#xff0c;比如会议、直播等经常能看到图像合成的场景。图像合成是在指定的一块画面区域&#xff0c;在这个区域内&#xff0c;按画面的位置(坐标)布局&#xff0c;将区域中的每个视频画面的像素混合计算成一个像素&#xff08;RGB&…

深度学习中的激活函数 – 完整概述

1.什么是激活函数? 生物神经网络启发了人工神经网络的发展。然而,人工神经网络甚至不能近似代表大脑的工作方式。在我们知道为什么在人工神经网络中使用激活函数之前,了解生物神经网络中激活函数的相关性仍然很有用。 典型的神经元具有由细胞体、向其他神经元发送信息的轴…

源码:TMS FlexCel Studio for .NET 7.19

TMS FlexCel Studio for .NET 是100% 托管代码 Excel 文件操作引擎以及 Excel 和 PDF 报告生成&#xff0c;适用于 .NET、Xamarin.iOS、Xamarin.Android、Xamarin.Mac、Windows Phone 和 Windows Store 功能概述 使用 FlexCel Studio for .NET 创建可动态快速读写 Excel 文件的…

SQLite 3.43 发布,性能大提升!

前言 SQLite是一种被广泛运用的嵌入式关系型数据库管理系统&#xff0c;最新发布的SQLite 3.43版本带来了一个重要的改进&#xff0c;大幅提升了对JSON数据的处理性能&#xff0c;达到了之前的两倍。 主要更新 添加对 Contentless-Delete FTS5 索引的支持。这是 FTS5 全文搜索…

Go 常用命令介绍

Go 常用命令 文章目录 Go 常用命令一、Go 常用命令1.1 go build1.1.1 指定输出目录1.1.2 常用环境变量设置编译操作系统和 CPU 架构1.1.3 查看支持的操作系统和CPU架构 1.2 go test1.3 go vet1.4 go clean1.5 go fmt1.6 go get1.7 go install1.8 go tool1.9 go generate1.10 go…

iOS——KVC(键值编码)

键值编码&#xff08;KVC&#xff09; KVC&#xff08;Key Value Coding&#xff09;是一种允许以字符串形式间接操作对象属性的方式。 最基本的KVC是由NSKeyValueCoding协议提供支持&#xff0c;最基本的操作属性如下&#xff1a; setValue: 属性值 forKey: 属性名&#xff…

Flink1.14 Source概念入门讲解与源码解析

目录 Flink Source概念 Source Source源码 getBoundedness() createReader(SourceReaderContext readerContext) createEnumerator(SplitEnumeratorContext enumContext) SplitEnumerator restoreEnumerator(SplitEnumeratorContext enumContext, EnumChkT checkpoint) …

使用Selenium进行网页登录和会话管理

随着互联网的快速发展&#xff0c;网页登录和会话管理是许多网站和应用程序的基本功能。通过网页登录&#xff0c;用户可以访问个人账户、购物车订单、历史记录等个性化信息。为了提高用户体验和效率&#xff0c;自动化登录和会话管理成为一个重要的需求。而Selenium作为一种强…

信创办公–基于WPS的EXCEL最佳实践系列 (限制可录入内容)

信创办公–基于WPS的EXCEL最佳实践系列 &#xff08;限制可录入内容&#xff09; 目录 应用背景操作过程1、数据有效性&#xff08;支出证明单&#xff09;2、如何完成数据有效性的使用&#xff08;差旅报销申请表&#xff09;3、清除数据验证4、利用圈释无效数据&#xff0c;验…

Docker容器中的SSH免密登录

简介&#xff1a;在日常的开发和测试环境中经常需要创建和管理Docker容器。有时&#xff0c;出于调试或管理的目的&#xff0c;可能需要SSH到容器内部。本文将介绍如何创建一个Docker容器&#xff0c;它在启动时自动运行SSH服务&#xff0c;并支持免密登录。 历史攻略&#xf…

在github上设置不同分支,方便回滚

在github上设置不同分支&#xff0c;方便回滚 步骤可能出现的问题couldnt find remote ref gpuVersion1. 确保您处于正确的分支2. 添加并提交更改&#xff08;如果还未进行&#xff09;3. 推送本地分支到远程仓库4. 验证操作 步骤 之前在github上上传了一个项目代码&#xff0c…

用Win10自带画图3D抠图

文章目录 一、打开“画图3D”二、插入图片三、抠图操作四、保存抠图 一、打开“画图3D” 在搜索框输入“画图3D” 选择彩色水滴图标的软件 二、插入图片 选择“新建” 导航栏“菜单”–>“插入”&#xff0c;选择要扣的图片。&#xff08;我选择了一张自己随意画的图片…

【动态规划刷题 17】回文子串 最长回文子串

647. 回文子串 链接: 647. 回文子串 给你一个字符串 s &#xff0c;请你统计并返回这个字符串中 回文子串 的数目。 回文字符串 是正着读和倒过来读一样的字符串。 子字符串 是字符串中的由连续字符组成的一个序列。 具有不同开始位置或结束位置的子串&#xff0c;即使是由…