V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  cnbatch  ›  全部回复第 58 页 / 共 71 页
回复总数  1414
1 ... 54  55  56  57  58  59  60  61  62  63 ... 71  
@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
2022-12-03 00:45:24 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@zoumouse 作者是回避 libbotan.a 的链接问题,给出的命令可以运行成功,编译出来的程序是使用动态库的版本,等于没回答
2022-12-03 00:43:42 +08:00
回复了 cnbatch 创建的主题 C++ GNU 工具链编译出来的 libbotan-2.a 形同虚设,无法用于静态链接
@lixile 用当前工具链,自己编译出来的 libbotan.a 照样无法用于后续的静态链接,而且无论是 Linux 还是 NetBSD 都一样
@hsly109 针对最新 Debian 11 弄了个 2.17 的版本,应该够用的了。

原本我是打算全部以 static linking 的方式发布二进制的,奈何 Linux 版本的 Botan 只有动态库方式能用,静态库几乎反倒没法用。其他平台却可以正常用静态库。

我刚刚去看了下作者本人对开发环境的描述 ( https://botan.randombit.net/handbook/support.html ),Linux 是主力,然后是 Windows ,剩下的都靠 Github 自动化工具。既然 Linux 是作者的主力平台,使用起来却最“拉跨”,实在费解。
2022-12-01 18:04:22 +08:00
回复了 Zizpop 创建的主题 C++ 使用类型转换后为何打印同一个变量会出现两个不同的结果
对于未定义行为就没必要去纠结了,这种情况下编译器想怎么干都行,甚至直接让整个程序崩溃都不奇怪
2022-12-01 18:01:40 +08:00
回复了 Zizpop 创建的主题 C++ 使用类型转换后为何打印同一个变量会出现两个不同的结果
可以查阅 C++标准,1 楼给出的那段文字,位于 ISO IEC 14882 2020-12 的 PDF 的第 126 页。

国内有转载:
https://bbs.pediy.com/thread-267401-1.htm
@lly8666 保险起见,我还是再另外弄了个专门用于 botan 2.9 的版本,以防万一
2022-11-30 15:28:45 +08:00
回复了 fox0001 创建的主题 Windows [求教]安全的远程桌面方案?
用 VPN 连回去就可以了,如果因为需要安装客户端而不想用 Open VPN ,那就用 Windows 自带的那些,比如 PPTP 、L2TP ,都是 Windows 内置的

而且搭建 PPTP 和 L2TP 服务器端也不难,配置比 Open VPN 更加简便
1 ... 54  55  56  57  58  59  60  61  62  63 ... 71  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2748 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 12:06 · PVG 20:06 · LAX 04:06 · JFK 07:06
Developed with CodeLauncher
♥ Do have faith in what you're doing.