<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>Please see the email below. This earlier mail didn't go through because of the PDF attachment, I had, I understand. </p>
<p><br>
</p>
<p>Here I am sending the note in Text format. Hope it would help someone who is trying to get C SPICE library working on the Apple Silicon Macs.</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt"><br>
Thanks and Regards,<br>
Manikantan Ramadas<font size="2"><font size="2"></font></font><br>
-- <br>
</span></font></div>
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt"><span style="font-family:Arial,serif,EmojiFont; font-size:13.3333px">"By being pleasant always and smiling, it takes you nearer to God,</span><br style="font-family:Arial,serif,EmojiFont; font-size:13.3333px">
<span style="font-family:Arial,serif,EmojiFont; font-size:13.3333px">nearer than any prayer." - Sri Ramakrishna Paramahamsa</span><br style="font-family:Arial,serif,EmojiFont; font-size:13.3333px">
<span style="font-family:Arial,serif,EmojiFont; font-size:13.3333px">------------------------------------------------------------------</span></span></font></div>
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt">
<div></div>
<br>
</span></font></div>
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt">
<div><br>
</div>
</span></font></div>
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt">
<div style="font-family:Tahoma; font-size:13px"><br>
</div>
<div style="font-family:Tahoma; font-size:13px"><font size="2" face="Arial"><span style="font-size:10pt"></span></font></div>
<br>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mramadas@gmail.com <mramadas@gmail.com><br>
<b>Sent:</b> Thursday, April 8, 2021 12:17 AM<br>
<b>To:</b> Wright, Edward D (US 392N)<br>
<b>Cc:</b> spice_discussion@naif.jpl.nasa.gov; Manikantan Ramadas<br>
<b>Subject:</b> Re: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs</font>
<div> </div>
</div>
<div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Mr.Edward Wright,
<div class=""><br class="">
</div>
<div class="">Sorry about the delay in getting back. I couldn’t spend much time on this until now.</div>
<div class=""><br class="">
</div>
<div class="">Tonight, I did put in some time, and was able to make the SPICE Library compile on MacOS on Apple Silicon.</div>
<div class="">It had to do with the inclusion of the unistd.h header file that gives the access() function explicitly in the cspice/src/inquire.c</div>
<div class=""><br class="">
</div>
<div class="">I have written a short note on this. I have also include an Appendix in this Note on how to get the C Compiler environment going on Apple Silicon - because it was a bit of a learning curve for me, and it might help someone else.</div>
<div class=""><br class="">
</div>
<div class="">I have attached the Note, and a short file inquire.c.diff that you may use to quickly patch the inquire.c file (for Apple Silicon - if you were to make a SPICE library package for this hardware platform) as in:</div>
<div class="">patch inquire.c inquire.c.diff</div>
<div class=""><br class="">
</div>
<div class="">Thanks and Regards</div>
<div class="">R.Manikantan</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space">
<div></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 05-Mar-2021, at 9:31 PM, Wright, Edward D (US 392N) <<a href="mailto:edward.d.wright@jpl.nasa.gov" class="">edward.d.wright@jpl.nasa.gov</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div dir="ltr" class="" style="font-family:Optima-Regular; font-size:16px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div id="x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div class="">To: R Manikantan<br class="">
From: Edward Wright<br class="">
<br class="">
As of now, no work on an Apple ARM64 Mac by NAIF. We built and successfully tested CSPICE on the Raspberry Pi platform, so I believe an ARM64 build a solvable problem.<br class="">
<br class="">
What compile errors did you observe?<br class="">
<br class="">
As always,<br class="">
Edward Wright<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:725.1875px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span><a href="mailto:spice_discussion-bounces@naif.jpl.nasa.gov" class="">spice_discussion-bounces@naif.jpl.nasa.gov</a>
 <<a href="mailto:spice_discussion-bounces@naif.jpl.nasa.gov" class="">spice_discussion-bounces@naif.jpl.nasa.gov</a>> on behalf of Manikantan Ramadas <<a href="mailto:mramadas@gmail.com" class="">mramadas@gmail.com</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Wednesday, March 3, 2021 9:20:06 AM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span><a href="mailto:spice_discussion@naif.jpl.nasa.gov" class="">spice_discussion@naif.jpl.nasa.gov</a><br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>[Spice_discussion] CSPICE on M1 Apple-Silicon Macs</font>
<div class=""> </div>
</div>
</div>
<font size="2" class="" style="font-family:Optima-Regular; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none"><span class="" style="font-size:10pt">
<div class="x_PlainText">Hi all,<br class="">
<br class="">
I was wondering if any of us have successfully compiled and using CSPICE library on the new Apple Silicon (ARM64) M1 Macs?<br class="">
<br class="">
I got the gcc from Apple via Developer-Tools / XCODE package, but ran into certain compilation errors in the process. It would be good to know if anyone had already run into / solved issues on this front..<br class="">
<br class="">
Thanks & Regards,<br class="">
R Manikantan<br class="">
_______________________________________________<br class="">
Spice_discussion mailing list<br class="">
<a href="mailto:Spice_discussion@naif.jpl.nasa.gov" class="">Spice_discussion@naif.jpl.nasa.gov</a><br class="">
<a href="https://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion" class="">https://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion</a></div>
</span></font></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</body>
</html>