Closed pronebird closed 2 months ago
Wanted to share that it seems that adding -fPIC
for static target in all makefiles works great, see gist:
https://gist.github.com/pronebird/1b66745ac00773e88b16508522ff8d81
If it makes sense, can we please patch all of the makefiles? It would be difficult to do as a part of single PR as there are submodules across the board.
Its however unusual that the project builds just fine on Ubuntu and Debian but not on Centos.
There is a rust binding for this project: https://github.com/heiher/tun2socks
I know, but they don't compile on macOS as a dependency to my project.
I know, but they don't compile on macOS as a dependency to my project.
Why link directly to hev-socks5-tunnel
instead of tun2socks
on macOS?
I think you can append -fPIC
to CFLAGS:
make CFLAGS=-fPIC
Why link directly to hev-socks5-tunnel instead of tun2socks on macOS?
Back then, tun2socks 1.0.2 didn't compile on Mac, so I pulled the C library directly. Then I started working on adding the possibility to start the tunnel using string config instead of file and the project just kept being linked directly ever since.
Today I pulled tun2socks 1.0.4 that you had released yesterday and it seems to compile just fine across the board. So I am switching over to rust crate. Thanks.
Hi,
Just stumbled upon a mysterious error today when linking the static lib into rust project on Centos9, a lot of errors like this:
Naive approach of simply passing the flag doesn't help either:
The thing is that the static lib builds fine, but then Rust fails to link the compiled static libraries. Do you happen to know what could be the problem?