<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Dear all,<div><br></div><div>After many tries, I finally succeed to compile xcrysden 1.6.2 on Apple silicon M2 using homebrew. </div><div><br></div><div>Here is my recipe. </div><div><br></div><div><div><div><div><div>1. Install homebrew. Command Line Tools (CLT) is required. </div><div><br></div><div>2. Install fftw using homebrew. This also installs gcc and gfortran (which is part of gcc). </div><div><br></div><div>3. cp system/Make.sys-semishared-macosx-x11-xquartz Make.sys</div><div><br></div><div>4. Add -L/opt/homebrew/lib and -I/opt/homebrew/include to FFTW3_LIB and FFTW3_INCDIR in Make.sys respectively. </div><div><br></div><div>5. make CC=/usr/bin/gcc all
</div><div>Instead of gcc installed by homebrew, use gcc provided in CLT: Apple clang version 15.0.0 (clang-1500.3.9.4) in my case. </div><div><br></div><div>6. The compilation will be stopped by the error from Togl. </div><div><br></div><div>7. Modify external/src/Togl2.0/togl.c follow the instruction <a href="https://cgit.freebsd.org/ports/commit/?id=0e77cfcef8a5677cff1ba81430b767a1089fd083">https://cgit.freebsd.org/ports/commit/?id=0e77cfcef8a5677cff1ba81430b767a1089fd083</a></div><div><br></div><div>8. Since libTogl2.0.dylib is not automatically generated in external/lib, we either do <br>1) add -L$(TOPDIR)/external/lib/Togl2.0 to TOGL_LIB in Make.sys or </div><div>2) ln -s external/lib/Togl2.0/libTogl2.0.dylib external/lib/</div><div><br></div><div>9. make CC=/usr/bin/gcc xcrysden</div><div><br></div><div>10. If the compilation succeed but no executable file is generated, it can be copied from Mac OS binary packages (pre-compiled packages downloadable from xcrysden homepage). </div><div><br></div><div>11. make install </div><div><br></div><div>12. If error occurs, add symbolic link of libTogl2.0.dylib to proper locations. </div></div></div></div></div><div><br></div><div>I hope it helps to someone struggling like me.</div><div><br></div><div>Best regards, </div><div><br></div><div>Minkyu Park</div><div><div>Korea Research Institute of Standards and Science</div></div><div><br></div><div><div><br><blockquote type="cite"><div>On Apr 4, 2024, at 3:40 PM, xcrysden-request@democritos.it wrote:</div><br class="Apple-interchange-newline"><div><div>Send XCrySDen mailing list submissions to<br><span class="Apple-tab-span" style="white-space:pre">        </span>xcrysden@democritos.it<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span class="Apple-tab-span" style="white-space:pre">        </span>http://www.democritos.it/mailman/listinfo/xcrysden<br>or, via email, send a message with subject or body 'help' to<br><span class="Apple-tab-span" style="white-space:pre">        </span>xcrysden-request@democritos.it<br><br>You can reach the person managing the list at<br><span class="Apple-tab-span" style="white-space:pre">        </span>xcrysden-owner@democritos.it<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of XCrySDen digest..."<br><br><br>Today's Topics:<br><br> 1. Compile on M2 (???)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Thu, 4 Apr 2024 14:09:24 +0900<br>From: ??? <minkyupark.phys@gmail.com><br>Subject: [xcrysden] Compile on M2<br>To: xcrysden@democritos.it<br>Message-ID: <340FFBBB-0CC3-4B84-AC9D-D20AA1DC9CC2@gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>Dear all,<br><br>I have been trying to compile xcrysden on M2 chip without success. <br><br>I found one relevant email<br>http://www.democritos.it/pipermail/xcrysden/2022-September/002116.html<br>But this does not work for me.<br><br>While ago, I was able to compile xcrysden on MacBook Pro with intel chip<br>by installing required libraries through homebrew. <br>But even if I follow the same procedure, it does not work in M2. <br><br>So does anyone succeed to compile xcrysden on M2 or any other apple silicon chips?<br><br>Attaches are my Make.sys and output error message.<br><br>Best,<br>Minkyu Park<br>Korea Research Institute of Standards and Science<br><br>??<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: http://www.democritos.it/pipermail/xcrysden/attachments/20240404/77eab2ad/attachment.html <br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: err.log<br>Type: application/octet-stream<br>Size: 33553 bytes<br>Desc: not available<br>Url : http://www.democritos.it/pipermail/xcrysden/attachments/20240404/77eab2ad/attachment.obj <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: http://www.democritos.it/pipermail/xcrysden/attachments/20240404/77eab2ad/attachment.htm <br>-------------- next part --------------<br>An embedded and charset-unspecified text was scrubbed...<br>Name: Make.sys.txt<br>Url: http://www.democritos.it/pipermail/xcrysden/attachments/20240404/77eab2ad/attachment.txt <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: http://www.democritos.it/pipermail/xcrysden/attachments/20240404/77eab2ad/attachment-0001.htm <br><br>------------------------------<br><br>_______________________________________________<br>XCrySDen mailing list<br>XCrySDen@democritos.it<br>http://www.democritos.it/mailman/listinfo/xcrysden<br><br><br>End of XCrySDen Digest, Vol 153, Issue 1<br>****************************************<br></div></div></blockquote></div><br></div></body></html>