V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  cnbatch  ›  全部回复第 58 页 / 共 72 页
回复总数  1422
1 ... 54  55  56  57  58  59  60  61  62  63 ... 72  
@zed1018 刚刚右键打开了下,这效果真的……
WinUI 3 的界面用着中文宋体,怎么看都觉得怪怪的
@YamatoRyou
@ooxxcc

可以看看新增的附言,并没有安装 MacType
@fkdog 然而我的放大倍数是整数倍,Windows 10 和 Windows 11 都是 DPI 200%,而且更神奇的是,Windows 11 并非所有区域都有这个 Bug ,其他地方比如选项卡、标题栏都一切正常。
@superrichman 为了一目了然,附言加上了写字板的情况,因为这样可以把显示效果、字体名称、字号大小、系统版本全都在一张图列出来,结果发现写字板的显示一切正常
最简单的测试:iperf (还有 iperf3 )

例如,路由器上面开一个 iperf3 -s -p 54321 ,然后在外面连过去试试 iperf3 -p 54321 -c IP 地址
2022-12-13 18:00:11 +08:00
回复了 wanmyj 创建的主题 宽带症候群 光猫改桥接,还有啥必要?
我用软路由的其中一个原因是因为我这边的 IPv6 的前缀分配很奇怪。

我目前有两条广东电信的宽带,都是同城,只不过一个在中心城区西侧,另一个在中心城区东侧。
东侧那条宽带比较正常,哪怕我不指定前缀长度,分配给我的 IPv6 地址前缀基本上都是 /60 ,以前还出现过分配 /56 。
而西侧那条宽带就很奇怪,只要我不指定前缀长度,它就一定给我分配 /64 ,导致没办法进一步自动划分子网。于是我只好用软路由发送前缀长度提示,这样才能让该区电信给我分配 /60 的前缀(在软路由内我是设置成发送 /56 的提示,目的是让该区电信设备给我返回此线路支持的最短前缀)
2022-12-12 19:02:00 +08:00
回复了 emma3 创建的主题 宽带症候群 问个简单的 DHCP 问题。
@VZMZZZ
@viberconnection
除了“免费 ARP”,还有另一个没那么怪的称呼:无故 ARP

当然了,最精准的应该还是维基百科采纳的通用翻译:无回报 ARP (这个翻译也能 google 得到相关资料)
确实最好还是针对每个 arch 以及每个 libc / libstdc++ (libc++) 分别编译。

libc 不仅仅有 glibc ,还有 musl

这是大坑,尽管默认使用 musl 的发行版并不多
@Neur2n 还不至于复杂到需要文档的地步吧
目前位于 Readme 的介绍就是完整的功能介绍了,可以配置的选项都写在了表格内
@Neur2n udphop 并非一定要 VPS ,我自己就没把 udphop 放在 VPS 上,而是放在路由器(服务端模式)和自己的电脑(客户端模式)
@lly8666 前几天更新了静态链接版本,可以再试试
2022-12-04 21:33:11 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@pagxir
@ec0

好了,这下搞清楚原因在哪了,确实是 GCC 的锅。
我在 Debian 测试版运行了一次 apt upgrade ,把所有能够更新的都更新一遍,其中就包括 GCC 。我记得应该有两个月没更新过了。

升级完成后,原本 GCC 10 会失败的命令
c++ aes.cpp -I./include/botan-2 -lstdc++ -L:./lib/ -lbotan-2 -static
在最新版 GCC 12.2.0-9 一次性成功

至于是什么 bug 就懒得查了。我只能说,GCC 真不是省油的灯。
2022-12-04 18:23:10 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
Debian 10 、11 、最新的测试版,试了我很多次,都是一堆 undefined reference ,心累
2022-12-04 18:20:00 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@pagxir 首先可以肯定的是,botan 库在编译的时候已经附带 index 的选项,这是 Botan 自己生成的 makefile 开头:
CXX = g++
LINKER = $(CXX)
AR = ar
AR_OPTIONS = crs
PYTHON_EXE = /usr/bin/python3


为了简单起见,就以我给 Botan 作者贴出的 aes.cpp 做编译。

第一次,用 Debian 自带软件包管理器安装出来的 Botan:
c++ -lbotan-2 -I/usr/include/botan-2 -lstdc++ -lpthread aes.cpp
c++ -I/usr/include/botan-2 -lbotan-2 -lstdc++ -lpthread aes.cpp
c++ -I/usr/include/botan-2 -lstdc++ -lbotan-2 -lpthread aes.cpp
c++ -I/usr/include/botan-2 -lstdc++ -lpthread -lbotan-2 aes.cpp

c++ -static -lbotan-2 -I/usr/include/botan-2 -lstdc++ -lpthread aes.cpp
c++ -static -I/usr/include/botan-2 -lbotan-2 -lstdc++ -lpthread aes.cpp
c++ -static -I/usr/include/botan-2 -lstdc++ -lbotan-2 -lpthread aes.cpp
c++ -static -I/usr/include/botan-2 -lstdc++ -lpthread -lbotan-2 aes.cpp
c++ -static -I/usr/include/botan-2 -lstdc++ -lpthread aes.cpp -lbotan-2

以上命令全部失败,undefined reference 一堆。唯一成功的就是作者给出的命令
c++ -I/usr/include/botan-2 -lstdc++ -lpthread aes.cpp -lbotan-2
这样会编译出动态库版本,而不是静态库版本。

接着用我下载 Botan 源码手动编译的版本:
c++ -L:./lib/libbotan-2.a -I./include/botan-2 -lstdc++ -lpthread aes.cpp
c++ -I./include/botan-2 -L:./lib/libbotan-2.a -lstdc++ -lpthread aes.cpp
c++ -I./include/botan-2 -lstdc++ -L:./lib/libbotan-2.a -lpthread aes.cpp
c++ -I./include/botan-2 -lstdc++ -lpthread aes.cpp -L:./lib/libbotan-2.a

c++ -static -L:./lib/libbotan-2.a -I./include/botan-2 -lstdc++ -lpthread aes.cpp
c++ -static -I./include/botan-2 -L:./lib/libbotan-2.a -lstdc++ -lpthread aes.cpp
c++ -static -I./include/botan-2 -lstdc++ -L:./lib/libbotan-2.a -lpthread aes.cpp
c++ -static -I./include/botan-2 -lstdc++ -lpthread aes.cpp -L:./lib/libbotan-2.a

以上命令依旧全部失败,仍然还是 undefined reference 一大堆。

GCC 的版本:
$ c++ --version
c++ (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
2022-12-04 02:24:54 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
上面那个好像失效了,再放一个:
https://temp.sh/CAfSj/botan2.19.3.log
2022-12-03 18:17:44 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@lixile Log 太长,放在临时网盘了:
https://file.io/SSNkzdCvnASo
2022-12-03 17:23:53 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@zoumouse 就以我给 Botan 提 issue 时的测试代码为例
https://github.com/randombit/botan/issues/3085

即使加了 -static ,还是一样报错。

@changnet 十分奇怪的是,我自己编译 Botan 源码自己链接,还是不行( Debian 11 和 Debian 最新测试版),但 alpine 用户可以。我按照 alpine 用户给出的经验操作去试,报错信息依然爆了一堆。

而同样都是 .a 静态编译,clang 工具链一下子就完成了,非常顺畅; VS 解决起来相对也是好一点,vcpkg 同样可以指定编译成动态库还是静态库,我是两种库都备好,这样就可以根据自己的设置选择正确的版本,选对了基本都能编译成功。

目前 clang 唯一不足的是对于 C++新标准的完善度相对较落后,其他方面我觉得比 GNU 好得多
2022-12-03 17:00:21 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::secure_allocator<unsigned char>::allocate(unsigned long)':
share_defines.cpp:(.text._ZN5Botan16secure_allocatorIhE8allocateEm[_ZN5Botan16secure_allocatorIhE8allocateEm]+0x1d): undefined reference to `Botan::allocate_memory(unsigned long, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::secure_allocator<unsigned long>::deallocate(unsigned long*, unsigned long)':
share_defines.cpp:(.text._ZN5Botan16secure_allocatorImE10deallocateEPmm[_ZN5Botan16secure_allocatorImE10deallocateEPmm]+0x28): undefined reference to `Botan::deallocate_memory(void*, unsigned long, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x28): undefined reference to `Botan::SHA_3::add_data(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x30): undefined reference to `Botan::SHA_3::final_result(unsigned char*)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x38): undefined reference to `Botan::SHA_3::clone() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x40): undefined reference to `Botan::SHA_3::provider[abi:cxx11]() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x48): undefined reference to `Botan::SHA_3::clear()'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x50): undefined reference to `Botan::SHA_3::name[abi:cxx11]() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_384E[_ZTVN5Botan9SHA_3_384E]+0x60): undefined reference to `Botan::SHA_3::copy_state() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x28): undefined reference to `Botan::SHA_3::add_data(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x30): undefined reference to `Botan::SHA_3::final_result(unsigned char*)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x38): undefined reference to `Botan::SHA_3::clone() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x40): undefined reference to `Botan::SHA_3::provider[abi:cxx11]() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x48): undefined reference to `Botan::SHA_3::clear()'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x50): undefined reference to `Botan::SHA_3::name[abi:cxx11]() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTVN5Botan9SHA_3_256E[_ZTVN5Botan9SHA_3_256E]+0x60): undefined reference to `Botan::SHA_3::copy_state() const'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTIN5Botan9SHA_3_384E[_ZTIN5Botan9SHA_3_384E]+0x10): undefined reference to `typeinfo for Botan::SHA_3'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o):(.data.rel.ro._ZTIN5Botan9SHA_3_256E[_ZTIN5Botan9SHA_3_256E]+0x10): undefined reference to `typeinfo for Botan::SHA_3'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/udphop.dir/build.make:100: udphop] Error 1
make[2]: Leaving directory '/home/USERNAME/udphop/build'
make[1]: *** [CMakeFiles/Makefile2:134: CMakeFiles/udphop.dir/all] Error 2
make[1]: Leaving directory '/home/USERNAME/udphop/build'
make: *** [Makefile:91: all] Error 2
2022-12-03 17:00:11 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
[100%] Linking CXX executable udphop
/usr/bin/cmake -E cmake_link_script CMakeFiles/udphop.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/udphop.dir/src/main.cpp.o -o udphop -lstdc++ -lbotan-2 src/shares/libSHAREDEFINES.a src/networks/libNETCONNECTIONS.a src/shares/libSHAREDEFINES.a
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): warning: relocation against `_ZTVN5Botan5SHA_3E' in read-only section `.text._ZN5Botan5SHA_3D2Ev[_ZN5Botan5SHA_3D5Ev]'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::SHA_3::~SHA_3()':
share_defines.cpp:(.text._ZN5Botan5SHA_3D2Ev[_ZN5Botan5SHA_3D5Ev]+0xf): undefined reference to `vtable for Botan::SHA_3'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::SHA_3_256::SHA_3_256()':
share_defines.cpp:(.text._ZN5Botan9SHA_3_256C2Ev[_ZN5Botan9SHA_3_256C5Ev]+0x19): undefined reference to `Botan::SHA_3::SHA_3(unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::SHA_3_384::SHA_3_384()':
share_defines.cpp:(.text._ZN5Botan9SHA_3_384C2Ev[_ZN5Botan9SHA_3_384C5Ev]+0x19): undefined reference to `Botan::SHA_3::SHA_3(unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `aes_256_gcm::set_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
share_defines.cpp:(.text._ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f0): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x2c6): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x372): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_gcm7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x410): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `aes_256_ocb::set_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
share_defines.cpp:(.text._ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x342): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x418): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x4c4): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: share_defines.cpp:(.text._ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN11aes_256_ocb7set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x562): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `chacha20::set_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
share_defines.cpp:(.text._ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x2f6): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x3cc): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x478): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: share_defines.cpp:(.text._ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN8chacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x516): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `xchacha20::set_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
share_defines.cpp:(.text._ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x23c): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x312): undefined reference to `Botan::AEAD_Mode::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Cipher_Dir, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: share_defines.cpp:(.text._ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x3be): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: share_defines.cpp:(.text._ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9xchacha207set_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x45c): undefined reference to `Botan::SymmetricAlgorithm::set_key(unsigned char const*, unsigned long)'
/usr/bin/ld: src/shares/libSHAREDEFINES.a(share_defines.cpp.o): in function `Botan::secure_allocator<unsigned char>::deallocate(unsigned char*, unsigned long)':
share_defines.cpp:(.text._ZN5Botan16secure_allocatorIhE10deallocateEPhm[_ZN5Botan16secure_allocatorIhE10deallocateEPhm]+0x28): undefined reference to `Botan::deallocate_memory(void*, unsigned long, unsigned long)'
2022-12-03 16:59:06 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@lixile 由于 Log 太长,这里删掉了
/usr/include/botan-2/botan/sha3.h:15:13: warning: this header will be made internal in the future
15 | BOTAN_FUTURE_INTERNAL_HEADER(sha3.h)
| ^~~~~~~~~~~~~~~~~~~~~~~~
这样的警告,其他的都保留

$ make VERBOSE=1
/usr/bin/cmake -S/home/USERNAME/udphop -B/home/USERNAME/udphop/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/USERNAME/udphop/build/CMakeFiles /home/USERNAME/udphop/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/USERNAME/udphop/build'
make -f src/shares/CMakeFiles/SHAREDEFINES.dir/build.make src/shares/CMakeFiles/SHAREDEFINES.dir/depend
make[2]: Entering directory '/home/USERNAME/udphop/build'
cd /home/USERNAME/udphop/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/USERNAME/udphop /home/USERNAME/udphop/src/shares /home/USERNAME/udphop/build /home/USERNAME/udphop/build/src/shares /home/USERNAME/udphop/build/src/shares/CMakeFiles/SHAREDEFINES.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/USERNAME/udphop/build'
make -f src/shares/CMakeFiles/SHAREDEFINES.dir/build.make src/shares/CMakeFiles/SHAREDEFINES.dir/build
make[2]: Entering directory '/home/USERNAME/udphop/build'
[ 11%] Building CXX object src/shares/CMakeFiles/SHAREDEFINES.dir/share_defines.cpp.o
cd /home/USERNAME/udphop/build/src/shares && /usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT src/shares/CMakeFiles/SHAREDEFINES.dir/share_defines.cpp.o -MF CMakeFiles/SHAREDEFINES.dir/share_defines.cpp.o.d -o CMakeFiles/SHAREDEFINES.dir/share_defines.cpp.o -c /home/USERNAME/udphop/src/shares/share_defines.cpp
[ 22%] Linking CXX static library libSHAREDEFINES.a
cd /home/USERNAME/udphop/build/src/shares && /usr/bin/cmake -P CMakeFiles/SHAREDEFINES.dir/cmake_clean_target.cmake
cd /home/USERNAME/udphop/build/src/shares && /usr/bin/cmake -E cmake_link_script CMakeFiles/SHAREDEFINES.dir/link.txt --verbose=1
/usr/bin/ar qc libSHAREDEFINES.a CMakeFiles/SHAREDEFINES.dir/share_defines.cpp.o
/usr/bin/ranlib libSHAREDEFINES.a
make[2]: Leaving directory '/home/USERNAME/udphop/build'
[ 22%] Built target SHAREDEFINES
make -f src/networks/CMakeFiles/NETCONNECTIONS.dir/build.make src/networks/CMakeFiles/NETCONNECTIONS.dir/depend
make[2]: Entering directory '/home/USERNAME/udphop/build'
cd /home/USERNAME/udphop/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/USERNAME/udphop /home/USERNAME/udphop/src/networks /home/USERNAME/udphop/build /home/USERNAME/udphop/build/src/networks /home/USERNAME/udphop/build/src/networks/CMakeFiles/NETCONNECTIONS.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/USERNAME/udphop/build'
make -f src/networks/CMakeFiles/NETCONNECTIONS.dir/build.make src/networks/CMakeFiles/NETCONNECTIONS.dir/build
make[2]: Entering directory '/home/USERNAME/udphop/build'
[ 33%] Building CXX object src/networks/CMakeFiles/NETCONNECTIONS.dir/connections.cpp.o
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT src/networks/CMakeFiles/NETCONNECTIONS.dir/connections.cpp.o -MF CMakeFiles/NETCONNECTIONS.dir/connections.cpp.o.d -o CMakeFiles/NETCONNECTIONS.dir/connections.cpp.o -c /home/USERNAME/udphop/src/networks/connections.cpp
[ 44%] Building CXX object src/networks/CMakeFiles/NETCONNECTIONS.dir/client.cpp.o
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT src/networks/CMakeFiles/NETCONNECTIONS.dir/client.cpp.o -MF CMakeFiles/NETCONNECTIONS.dir/client.cpp.o.d -o CMakeFiles/NETCONNECTIONS.dir/client.cpp.o -c /home/USERNAME/udphop/src/networks/client.cpp
[ 55%] Building CXX object src/networks/CMakeFiles/NETCONNECTIONS.dir/server.cpp.o
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT src/networks/CMakeFiles/NETCONNECTIONS.dir/server.cpp.o -MF CMakeFiles/NETCONNECTIONS.dir/server.cpp.o.d -o CMakeFiles/NETCONNECTIONS.dir/server.cpp.o -c /home/USERNAME/udphop/src/networks/server.cpp
[ 66%] Building CXX object src/networks/CMakeFiles/NETCONNECTIONS.dir/stun.cpp.o
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT src/networks/CMakeFiles/NETCONNECTIONS.dir/stun.cpp.o -MF CMakeFiles/NETCONNECTIONS.dir/stun.cpp.o.d -o CMakeFiles/NETCONNECTIONS.dir/stun.cpp.o -c /home/USERNAME/udphop/src/networks/stun.cpp
[ 77%] Linking CXX static library libNETCONNECTIONS.a
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/cmake -P CMakeFiles/NETCONNECTIONS.dir/cmake_clean_target.cmake
cd /home/USERNAME/udphop/build/src/networks && /usr/bin/cmake -E cmake_link_script CMakeFiles/NETCONNECTIONS.dir/link.txt --verbose=1
/usr/bin/ar qc libNETCONNECTIONS.a CMakeFiles/NETCONNECTIONS.dir/connections.cpp.o CMakeFiles/NETCONNECTIONS.dir/client.cpp.o CMakeFiles/NETCONNECTIONS.dir/server.cpp.o CMakeFiles/NETCONNECTIONS.dir/stun.cpp.o
/usr/bin/ranlib libNETCONNECTIONS.a
make[2]: Leaving directory '/home/USERNAME/udphop/build'
[ 77%] Built target NETCONNECTIONS
make -f CMakeFiles/udphop.dir/build.make CMakeFiles/udphop.dir/depend
make[2]: Entering directory '/home/USERNAME/udphop/build'
cd /home/USERNAME/udphop/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/USERNAME/udphop /home/USERNAME/udphop /home/USERNAME/udphop/build /home/USERNAME/udphop/build /home/USERNAME/udphop/build/CMakeFiles/udphop.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/USERNAME/udphop/build'
make -f CMakeFiles/udphop.dir/build.make CMakeFiles/udphop.dir/build
make[2]: Entering directory '/home/USERNAME/udphop/build'
[ 88%] Building CXX object CMakeFiles/udphop.dir/src/main.cpp.o
/usr/bin/c++ -I/usr/include/botan-2 -std=c++17 -MD -MT CMakeFiles/udphop.dir/src/main.cpp.o -MF CMakeFiles/udphop.dir/src/main.cpp.o.d -o CMakeFiles/udphop.dir/src/main.cpp.o -c /home/USERNAME/udphop/src/main.cpp
1 ... 54  55  56  57  58  59  60  61  62  63 ... 72  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2586 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 05:03 · PVG 13:03 · LAX 21:03 · JFK 00:03
Developed with CodeLauncher
♥ Do have faith in what you're doing.