proxychains-ng
proxychains-ng copied to clipboard
Missing compatible architecture on Apple Silicon & macOS Ventura
After upgrading my MBP to macOS Ventura 13.0, proxychains4 fails to run and throws this erorr:
It's weird that error message said have 'x86_64,arm64e', need '', I have no idea why arm64e doesn't work again (see https://github.com/rofl0r/proxychains-ng/issues/453 ). My proxychain4 is x86_64 + arm64 and libproxychains4.dylib is x86_64 + arm64e.
A temprary solution to bypass this issue is use arch -x86_64, like arch -x86_64 /opt/homebrew/bin/proxychains4 curl -I https://www.google.com could normally run:
cc @rofl0r
the need '' error message suggests this is a new bug in "ventura". maybe ask apple about it. you can also try to rebuild proxychains-ng with --fat-binary-m1.
what's interesting is that the fat binary "proxychains4" itself runs, but the dylib is considered inappropriate. i take it your MBP is x86_64 ?
... is a new bug in "ventura", agree. But I haven't find anyone else reports this issue on Google yet.
My compiling options is ./configure --prefix=/opt/homebrew/Cellar/proxychains-ng/4.16 --sysconfdir=/opt/homebrew/etc --fat-binary-m1 and my MBP's CPU is M1 Max. The arch -x86_64 could run because of Rosetta2.
seems like we can't do anything here for the moment until more intel is gathered...
Hi there, I found that different program is using different arch, for example, for curl, the default is working.
but using git, you'll need to specify the arch using arch -x86_64 prefix.
Don't know whether there's a fix, but anyway, it's usable.
Note: I'm building this using --fat-binary-m1.
but using git, you'll need to specify the arch using arch -x86_64 prefix.
is git from system or from homebrew ? if the latter, as i highly suspect, then probably homebrew is configured for the wrong architecture and what it produces works accidentally via rosetta.
Thanks @malash , your workaround "arch -x86_64 /opt/homebrew/bin/proxychains4" is also OK for me currently. Hope someone can fix this issue.
Apple Silicon & macOS Monterey 12.3 I have the same problem. from homebrew "arch -x86_64 /opt/homebrew/bin/proxychains4" is not suitable for me currently.
[proxychains] config file found: /opt/homebrew/etc/proxychains.conf [proxychains] preloading /opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib dyld[3012]: terminating because inserted dylib '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' could not be loaded: tried: '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/usr/local/lib/libproxychains4.dylib' (no such file), '/usr/lib/libproxychains4.dylib' (no such file) dyld[3012]: tried: '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/usr/local/lib/libproxychains4.dylib' (no such file), '/usr/lib/libproxychains4.dylib' (no such file) [1] 3012 abort proxychains4 curl ipinfo.io
@kingz40o use --fat-binary-m1
@kingz40o use --fat-binary-m1
is good
Here we go.
# shutdown & long press Power button to recovery mode -> Terminal
csrutil disable
# enable arm64e support
sudo nvram boot-args=-arm64e_preview_abi
# reboot
Then,
git clone https://github.com/rofl0r/proxychains-ng
cd proxychains-ng
CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e" ./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1
make
$ file ./proxychains4
./proxychains4: Mach-O universal binary with 3 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64] [arm64e:Mach-O 64-bit executable arm64e]
./proxychains4 (for architecture x86_64): Mach-O 64-bit executable x86_64
./proxychains4 (for architecture arm64): Mach-O 64-bit executable arm64
./proxychains4 (for architecture arm64e): Mach-O 64-bit executable arm64e
$ ./proxychains4 -f /opt/homebrew/etc/proxychains.conf ncat 127.0.0.1 22 -v
[proxychains] config file found: /opt/homebrew/etc/proxychains.conf
[proxychains] preloading /xxx/proxychains-ng/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.16-git-10-g199d03d
Ncat: Version 7.93 ( https://nmap.org/ncat )
[proxychains] Strict chain ... 127.0.0.1:1080 ... 127.0.0.1:22 ... OK
Ncat: Connected to 127.0.0.1:22.
SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
m2 max
[proxychains] config file found: /opt/homebrew/etc/proxychains.conf
[proxychains] preloading /Users/tange/proxychains-ng/libproxychains4.dylib
dyld[1692]: terminating because inserted dylib '/Users/tange/proxychains-ng/libproxychains4.dylib' could not be loaded: tried: '/Users/tange/proxychains-ng/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/tange/proxychains-ng/libproxychains4.dylib' (no such file), '/Users/tange/proxychains-ng/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
dyld[1692]: tried: '/Users/tange/proxychains-ng/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/tange/proxychains-ng/libproxychains4.dylib' (no such file), '/Users/tange/proxychains-ng/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
./configure --prefix=/opt/homebrew/Cellar/proxychains-ng/4.16 --sysconfdir=/opt/homebrew/etc --fat-binary-m2
./configure --prefix=/opt/homebrew/Cellar/proxychains-ng/4.16 --sysconfdir=/opt/homebrew/etc --fat-binary-m1
make
printf '#define VERSION "%s"\n' "$(sh tools/version.sh)" > src/version.h
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/version.o src/version.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/core.o src/core.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/common.o src/common.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/libproxychains.o src/libproxychains.c
src/libproxychains.c:917:2: warning: incompatible function pointer types assigning to 'freeaddrinfo_t' (aka 'int (*)(struct addrinfo *)') from 'void (*)(struct addrinfo *)' [-Wincompatible-function-pointer-types]
SETUP_SYM(freeaddrinfo);
^~~~~~~~~~~~~~~~~~~~~~~
src/libproxychains.c:904:57: note: expanded from macro 'SETUP_SYM'
#define SETUP_SYM(X) do { if (! true_ ## X ) true_ ## X = &X; } while(0)
^ ~~
src/libproxychains.c:90:14: warning: unused function 'load_sym' [-Wunused-function]
static void* load_sym(char* symname, void* proxyfunc, int is_mandatory) {
^
2 warnings generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/allocator_thread.o src/allocator_thread.c
src/allocator_thread.c:327:9: warning: 'PTHREAD_STACK_MIN' macro redefined [-Wmacro-redefined]
#define PTHREAD_STACK_MIN 64*1024
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:115:9: note: previous definition is here
#define PTHREAD_STACK_MIN 16384
^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/rdns.o src/rdns.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/hostsreader.o src/hostsreader.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/hash.o src/hash.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/debug.o src/debug.c
cc -fPIC -ldl -lpthread -Wl,-install_name,libproxychains4.dylib \
-shared -o libproxychains4.dylib src/version.o src/core.o src/common.o src/libproxychains.o src/allocator_thread.o src/rdns.o src/hostsreader.o src/hash.o src/debug.o
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/main.o src/main.c
cc src/common.o src/main.o -ldl -o proxychains4
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/daemon/hsearch.o src/daemon/hsearch.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/daemon/sblist.o src/daemon/sblist.c
In file included from src/daemon/sblist.c:3:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/daemon/sblist_delete.o src/daemon/sblist_delete.c
In file included from src/daemon/sblist_delete.c:1:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/daemon/daemon.o src/daemon/daemon.c
src/daemon/daemon.c:8:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE
^
<command line>:6:9: note: previous definition is here
#define _GNU_SOURCE 1
^
In file included from src/daemon/daemon.c:20:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
^
In file included from src/daemon/daemon.c:21:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
^
3 warnings generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR=\"/opt/homebrew/Cellar/proxychains-ng/4.16/lib\" -DSYSCONFDIR=\"/opt/homebrew/etc\" -DDLL_NAME=\"libproxychains4.dylib\" -fPIC -c -o src/daemon/udpserver.o src/daemon/udpserver.c
In file included from src/daemon/udpserver.c:1:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
^
1 warning generated.
cc src/daemon/hsearch.o src/daemon/sblist.o src/daemon/sblist_delete.o src/daemon/daemon.o src/daemon/udpserver.o -o proxychains4-daemon
找到m2 max [proxychains] 配置文件:/opt/homebrew/etc/proxychains.conf [proxychains] 预加载 /Users/tange/proxychains-ng/libproxychains4.dylib dyld[1692]:终止,因为插入了 dylib '/Users/tange/ proxychains-ng/libproxychains4.dylib' 无法加载:试过:'/Users/tange/proxychains-ng/libproxychains4.dylib'(mach-o 文件,但它是一个不兼容的架构(有 'arm64',需要 'x86_64' )), '/System/Volumes/Preboot/Cryptexes/OS/Users/tange/proxychains-ng/libproxychains4.dylib' (没有这样的文件), '/Users/tange/proxychains-ng/libproxychains4.dylib' (mach- o 文件,但它是一个不兼容的架构(有“arm64”,需要“x86_64”)) dyld[1692]:试过:'/Users/tange/proxychains-ng/libproxychains4.dylib'(mach-o 文件,但它是一个不兼容的架构(有'arm64',需要'x86_64')),'/System/Volumes /Preboot/Cryptexes/OS/Users/tange/proxychains-ng/libproxychains4.dylib'(没有这样的文件),'/Users/tange/proxychains-ng/libproxychains4.dylib'(mach-o 文件,但它是一个不兼容的架构(有'arm64',需要'x86_64'))
./configure --prefix=/opt/homebrew/Cellar/proxychains-ng/4.16 --sysconfdir=/opt/homebrew/etc --fat-binary-m2 ./configure --prefix=/opt/homebrew/Cellar/ proxychains-ng/4.16 --sysconfdir=/opt/homebrew/etc --fat-binary-m1
制作
printf '#define VERSION "%s"\n' "$(sh tools/version.sh)" > src/version.h cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR="/opt/homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/等”-DDLL_NAME="libproxychains4.dylib"-fPIC -c -o src/version.o src/version.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME - Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR="/opt/homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" - DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/core.o src/core.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/common.o src/common.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR="/opt/homebrew/Cellar /proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/libproxychains.o src/libproxychains.c src/libproxychains.c:917:2: 警告:从 'void ( )(struct addrinfo )_ ' [ -Wincompatible-function-pointer -types] __ SETUP_SYM(freeaddrinfo); __ ^~~~~~~~~~~~~~~~~~~~~~ __ src/libproxychains.c:904:57:注意:从宏“SETUP_SYM”扩展 #define SETUP_SYM(X) do { if (! true ## X ) true_ ## X = &X; } while(0) __ ^ ~~ __ src/libproxychains.c:90:14: warning: unused function 'load_sym' [-Wunused-function] __ static void load_sym(char____ symname, void* proxyfunc, int is_mandatory) { ^ 生成 2 个警告. cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/allocator_thread.o src/allocator_thread.c src/ allocator_thread .c:327:9: 警告:“PTHREAD_STACK_MIN”宏重新定义 [-Wmacro-redefined] #define PTHREAD_STACK_MIN 64*1024 ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:115: 9:注意:以前的定义在这里 #define PTHREAD_STACK_MIN 16384 ^ 1 生成警告。 cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/rdns.o src/rdns.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR="/opt/homebrew/Cellar /proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/hostsreader.o src/hostsreader.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/hash.o src/hash.c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -DLIB_DIR="/opt/homebrew/Cellar /proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/debug.o src/debug.c cc -fPIC -ldl - lpthread -Wl,-install_name,libproxychains4.dylib -shared -o libproxychains4.dylib src/version.o src/core.o src/common.o src/libproxychains.o src/allocator_thread.o src/rdns.o src/hostsreader.o src/hash.o src/debug .o cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -="/DLIB opt/homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/main.o src/main.c cc src/common.o src/main.o -ldl -o proxychains4 cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR自制软件/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/daemon/hsearch.o src/daemon/hsearch. c cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=="/DLIB_DIR /homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/daemon/sblist.o src/daemon/sblist .c 在 src/daemon/sblist.c:3 包含的文件中: src/daemon/sblist.h:90:9: 警告:忽略未知编译指示 [-Wunknown-pragmas] #pragma RcB2 DEP “sblist.c” “sblist_delete.c” ^ 生成 1 个警告。 cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR homebrew/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/daemon/sblist_delete.o src/daemon/sblist_delete. c 在 src/daemon/sblist_delete.c:1 中包含的文件中: src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas] #pragma RcB2 DEP "sblist.c" " 生成 1 个警告。 cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR自制软件/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/daemon/daemon.o src/daemon/daemon. c src/daemon/daemon.c:8:9: 警告:'_GNU_SOURCE' 宏重新定义 [-Wmacro-redefined] #define _GNU_SOURCE ^ :6:9: 注意:以前的定义在这里 #define _GNU_SOURCE 1 ^ 在包含的文件中src/daemon/daemon.c:20: src/daemon/udpserver.h:11:9: 警告:忽略未知编译指示 [-Wunknown-pragmas] #pragma RcB2 DEP“udpserver.c” ^ 在 src/daemon/daemon.c:21 中包含的文件中: src/daemon/sblist.h:90:9:警告:未知编译指示被忽略 [-Wunknown-pragmas] #pragma RcB2 DEP "sblist.c" "sblist_delete.c" ^ 生成了 3 个警告。 cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -DIS_MAC=1 -opt/DLIB_DIR自制软件/Cellar/proxychains-ng/4.16/lib" -DSYSCONFDIR="/opt/homebrew/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/daemon/udpserver.o src/daemon/udpserver. c 在 src/daemon/udpserver.c:1 包含的文件中: src/daemon/udpserver.h:11:9: 警告:忽略未知编译指示 [-Wunknown-pragmas] #pragma RcB2 DEP "udpserver.c" ^ 生成 1 个警告。 cc src/daemon/hsearch.o src/daemon/sblist.o src/daemon/sblist_delete.o src/daemon/daemon.o src/daemon/udpserver.o -o proxychains4-daemon
同样用了./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1也不可以
@gusechuisheng what's the point of your comments ?
@pich4ya Thank you, I tried your solution and it does work. cc @rofl0r
我试着用他们的方式编译,直接报错。
M1 + macOS 13.3.1 (22E261) + SIP enabled: all seems ok
It worked
CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e" ./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1 make
Works.
Hello, after I tried to install proxychains-ng for the first time and closed csrutil, I ran a random command: proxychains4 brew install gedit. But it seems to be missing something, which may not be user-friendly for newbies. Please see:
peng@bogon etc % proxychains4 brew install gedit
[proxychains] config file found: /opt/homebrew/etc/proxychains.conf
[proxychains] preloading /opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.16
dyld[1571]: terminating because inserted dylib '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' could not be loaded: tried: '/opt/homebrew/Cellar/proxychains-ng/4.16/ lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/proxychains-ng /4.16/lib/libproxychains4.dylib' (no such file), '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64 ', need ''))
dyld[1571]: tried: '/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/proxychains-ng/4.16/lib/libproxychains4.dylib' (no such file), '/opt/homebrew/Cellar/proxychains-ng/4.16/ lib/libproxychains4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need ''))
My system information is: Sonoma-14.1.2, M2-max
@pengweizhong: the error you're getting is precisely what this thread is about and solutions are presented. as far as "user-friendly" is concerned, the mess presented to us by OS X makes it almost impossible, and proxychains-ng isn't meant to be used by "newbies" anyway - see the big fat warning on top of the README.
Here we go.
# shutdown & long press Power button to recovery mode -> Terminal csrutil disable # enable arm64e support sudo nvram boot-args=-arm64e_preview_abi # rebootThen,
git clone https://github.com/rofl0r/proxychains-ng cd proxychains-ng CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e" ./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1 make $ file ./proxychains4 ./proxychains4: Mach-O universal binary with 3 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64] [arm64e:Mach-O 64-bit executable arm64e] ./proxychains4 (for architecture x86_64): Mach-O 64-bit executable x86_64 ./proxychains4 (for architecture arm64): Mach-O 64-bit executable arm64 ./proxychains4 (for architecture arm64e): Mach-O 64-bit executable arm64e $ ./proxychains4 -f /opt/homebrew/etc/proxychains.conf ncat 127.0.0.1 22 -v [proxychains] config file found: /opt/homebrew/etc/proxychains.conf [proxychains] preloading /xxx/proxychains-ng/libproxychains4.dylib [proxychains] DLL init: proxychains-ng 4.16-git-10-g199d03d Ncat: Version 7.93 ( https://nmap.org/ncat ) [proxychains] Strict chain ... 127.0.0.1:1080 ... 127.0.0.1:22 ... OK Ncat: Connected to 127.0.0.1:22. SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
I used this method to install Proxychains on my Apple M1 Pro chip and Sonoma 14.5 operating system, but I ultimately failed.
After my search and attempt, I finally used the method here to successfully install Proxychains on my computer🎉.
After my search and attempt, I finally used the method here to successfully install Proxychains on my computer🎉.
did you also try the new --fat-binary-m2 switch ?
So was the need '' part of a macOS bug? I have someone reporting the following error fat file, but missing compatible architecture (have 'x86_64,arm64,arm64e', need '')), and this was the only thread i found that mentioned a similar issue with the empty need statement. The odd thing is, this user has the following output for uname -a:
Darwin xxx-MBP.fios-router.home 22.6.0 Darwin Kernel Version 22.6.0: Mon Apr 22 20:50:39 PDT 2024; root:xnu-8796.141.3.705.2~1/RELEASE_ARM64_T8103 arm64
I find it interesting that the architecture shows arm64 when I could have sworn it would be arm64e for all Apple Silicon Macs. They are running the latest Ventura version on an original M1 Mac (SIP disabled)
looks definitely like a bug to me. whether it is fixed these days is unknown.