Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing compatible architecture on Apple Silicon & macOS Ventura #481

Open
malash opened this issue Oct 28, 2022 · 24 comments
Open

Missing compatible architecture on Apple Silicon & macOS Ventura #481

malash opened this issue Oct 28, 2022 · 24 comments

Comments

@malash
Copy link

malash commented Oct 28, 2022

After upgrading my MBP to macOS Ventura 13.0, proxychains4 fails to run and throws this erorr:

image

It's weird that error message said have 'x86_64,arm64e', need '', I have no idea why arm64e doesn't work again (see #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:

image

cc @rofl0r

@rofl0r
Copy link
Owner

rofl0r commented Oct 28, 2022

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 ?

@malash
Copy link
Author

malash commented Oct 29, 2022

... 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.

@rofl0r
Copy link
Owner

rofl0r commented Oct 30, 2022

seems like we can't do anything here for the moment until more intel is gathered...

@mr-m0nst3r
Copy link

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.

@rofl0r
Copy link
Owner

rofl0r commented Nov 20, 2022

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.

@bobshao
Copy link

bobshao commented Nov 22, 2022

Thanks @malash , your workaround "arch -x86_64 /opt/homebrew/bin/proxychains4" is also OK for me currently. Hope someone can fix this issue.

@kingz40o
Copy link

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

@rofl0r
Copy link
Owner

rofl0r commented Feb 21, 2023

@kingz40o use --fat-binary-m1

@kingz40o
Copy link

@kingz40o use --fat-binary-m1

is good

@pich4ya
Copy link

pich4ya commented Mar 6, 2023

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

@gusechuisheng

This comment was marked as off-topic.

@gusechuisheng

This comment was marked as off-topic.

@rofl0r
Copy link
Owner

rofl0r commented Mar 9, 2023

@gusechuisheng what's the point of your comments ?

@malash
Copy link
Author

malash commented Mar 11, 2023

@pich4ya Thank you, I tried your solution and it does work. cc @rofl0r

@gusechuisheng
Copy link

我试着用他们的方式编译,直接报错。

@urugang
Copy link

urugang commented Apr 8, 2023

M1 + macOS 13.3.1 (22E261) + SIP enabled: all seems ok

@longjiahui
Copy link

It worked

@gavinchou
Copy link

CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e" ./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1
make

Works.

@pengweizhong
Copy link

pengweizhong commented Dec 3, 2023

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

@rofl0r
Copy link
Owner

rofl0r commented Dec 3, 2023

@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.

@healchow
Copy link

healchow commented Jul 2, 2024

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

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🎉.

@rofl0r
Copy link
Owner

rofl0r commented Jul 2, 2024

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 ?

@zlshames
Copy link

zlshames commented Jul 12, 2024

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)

@rofl0r
Copy link
Owner

rofl0r commented Jul 13, 2024

looks definitely like a bug to me. whether it is fixed these days is unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests