Comments (11)
我手头只有14年的MBP,所以麻烦你试一下这个版本
https://github.com/iceonsun/rsock/releases/tag/v1.5.1
from rsock.
v1.5.1 不好用,但我在我的 14MBP 上重编完在 12later 上能跑。奇怪。
顺手改了一个编译不过的问题。虽然不知道为啥 !data 还要判断 data <= 0?我本能地加个强转。XD
diff --git a/util/rhash.cpp b/util/rhash.cpp
index 12b4c2f..488662b 100644
--- a/util/rhash.cpp
+++ b/util/rhash.cpp
@@ -24,7 +24,7 @@ static bool hash_equal(const HashBufType &hashed_buf, const std::string &key, co
static int8_t compute_hash(HashBufType &hash, const std::string &key, const char *data, int data_len);
int8_t compute_hash(HashBufType &hash, const std::string &key, const char *data, int data_len) {
- if (!data || data <= 0) {
+ if (!data || (size_t)data <= 0) {
return -1;
}
assert(hash.size() <= MD5_LEN);
from rsock.
v1.5.1 不好用
不好用指的是速度变慢了还是仍然不能跑
但我在我的 14MBP 上重编完在 12later 上能跑
你重编用的是project中的Darwin,还是用的CMakeLists.txt
data 还要判断 data <= 0?
错了错了,应该是判断 data_len <= 0。
from rsock.
不好用是指还是 Illegal instruction。
我是用 CMakeList.txt 重编的,mkdir build; cd build; cmake ..; make
这么编的,好使。
from rsock.
你mini的系统和pro一样吗,检查一下有没有这个库 /usr/lib/libc++.dylib
from rsock.
我现在 mini 连接不上,不过这两个系统我都升级到了 high sierra 10.13.3 了,libc++.dylib 应该是苹果的标配吧,libstdc++ 反而需要另安。
Illegal instruction 这个问题我们之前也遇到过,基本就是加 march=amd64 或 x86-64 来解决,但那都是手写 Makefile 才需要加,CMake 我们没加倒也没出现问题。你能说明一下你发布的二进制的详细的编译方法吗?我用你的方法试试。
from rsock.
编译步骤:
cd path/to/rSock/
mkdir xbuild/build/Darwin_x86_64 && cd xbuild/build/Darwin_x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Darwin_x86_64.toolchain.cmake ../../..
这个macos toolchain指定了用clang++(所以不用装libstdc++)。
在前一个版本已经取消了-O2优化。
我网上查了一下,很可能是你说的那个问题。昨天那个1.5.1已经在cmake中加了march=x86-64。你说也不行,我就先撤销了。我手上目前也只有一台14年的pro,所以不大方便测试更旧机子。
你要是不介意的话,麻烦你测试一下。直接在CMakeLists.txt 中(##release之前)添加一行 add_definitions(march=amd64) 或者 add_definitions(march=x86-64)
from rsock.
我试试看能否重现这个问题。
from rsock.
果然用你的方法 Illegal instruction……
不加 toolchain.cmake 其实是用我本机的 libuv, libnet, libpcap 的动态库动态编译。而使用你的 toolchain.cmake 用的你的 xbuild/lib 下的静态库编译,所以判断问题应该出在你的静态库里。如果你的静态库也是从 brew 里取的,那你是否 export HOMEBREW_ARCH=x86_64 再安装的这三个库呢?因为 Homebrew 在编译安装的时候,也需要指定 -march,才能架构兼容。
我刚刚用我的 home-brew 的这三个库替换掉了你的,在 12later 上好用了。
from rsock.
如果你的静态库也是从 brew 里取的
对的。是直接从brew里面取出来的。
我用了你的方法,重新编译了一下, 麻烦你试试看。
https://github.com/iceonsun/rsock/releases/tag/v1.6.0
from rsock.
这回好使了。
from rsock.
Related Issues (15)
- 单独用 kcptun 10Mbps,而加上 rsock 600Kbps HOT 33
- 请问如何修复 "pcap init failed"? HOT 24
- 在VPC网络的云平台中,rsock工作异常 HOT 1
- windows客户端运行问题(ss+kcptun+rsock) HOT 1
- unable to find default device HOT 3
- need some help for rsock client HOT 1
- 报文中掺杂额外字节 HOT 8
- [新功能]Rsock 断开后连接自动恢复的问题 HOT 4
- 如何给ss的udp转发呢 HOT 1
- FreeBSD support HOT 2
- 双边混肴么 HOT 11
- 修改wiki里面的编译指南 HOT 1
- CentOs 上报错 Assertion `p.targetCapInt != 0' failed HOT 1
- windows client can not run HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsock.