byronknoll / cmix

cmix is a lossless data compression program aimed at optimizing compression ratio at the cost of high CPU/memory usage.
http://www.byronknoll.com/cmix.html
GNU General Public License v3.0
622 stars 45 forks source link

Support Apple M1 #51

Open chenrui333 opened 2 years ago

chenrui333 commented 2 years ago

It builds fine in apple arm, but has some segmentation fault issue when running it.

GssMahadevan commented 1 year ago

I too faced this issue on MacBook Pro M1.

Here are commands were added on MacBook for getting core-dump. Here is the stack-trace. Hope this helps you in identifying the issue.

(base) gssm-mbp1:cmp8 gssm$ /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" tmp.entitlements File Doesn't Exist, Will Create: tmp.entitlements

(base) gssm-mbp1:cmp8 gssm$ codesign -s - -f --entitlements tmp.entitlements cmix1 cmix1: replacing existing signature

(base) gssm-mbp1:cmp8 gssm$ ls -la /cores total 0 drwxr-xr-x 2 root wheel 64 Sep 18 2021 . drwxr-xr-x 20 root wheel 640 Oct 18 18:06 .. (base) gssm-mbp1:cmp8 gssm$ sudo ./cmix1 -c qq qq.c Password: Detected block types: DEFAULT: 100.0% progress: 0.00%Segmentation fault: 11 (base) gssm-mbp1:cmp8 gssm$ ls -la /cores total 38838800 drwxr-xr-x 3 root wheel 96 Jan 20 20:19 . drwxr-xr-x 20 root wheel 640 Oct 18 18:06 .. -r-------- 1 root wheel 39770931200 Jan 20 20:20 core.32375 (base) gssm-mbp1:cmp8 gssm$ ls -la /cores total 38G drwxr-xr-x 3 root wheel 96 Jan 20 20:19 . drwxr-xr-x 20 root wheel 640 Oct 18 18:06 .. -r-------- 1 root wheel 38G Jan 20 20:20 core.32375 (base) gssm-mbp1:cmp8 gssm$ sudo lldb -c /cores/core.32375 (lldb) target create --core "/cores/core.32375" Core file '/cores/core.32375' (arm64) was loaded. (lldb) bt

chenrui333 commented 1 year ago

Looks like I can build/test successfully with ventura arm in my local, https://github.com/Homebrew/homebrew-core/pull/153365