<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 style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Bogdan, well that is interesting because the CI builds did not run into the compilation error that Manikantan noted. Maybe it is something specific to the CI environment that does not raise the error? You can view the logs here:
<a href="https://urldefense.us/v3/__https://dev.azure.com/conda-forge/84710dde-1620-425b-80d0-4cf5baca359d/_apis/build/builds/302195/logs/19__;!!PvBDto6Hs4WbVuu7!eOuwkOZ8sUbX_7YwN6ieNux_o1wOVYK5MoBAk4_W0qSYdgAhnUiOfUiC1mAriSP2Go2NadzhYF8i2Q$" id="LPlnk355183">
https://dev.azure.com/conda-forge/84710dde-1620-425b-80d0-4cf5baca359d/_apis/build/builds/302195/logs/19</a> to see if there is a cause. In any case it is easy enough to add the patch to the cspice-feedstock so I may do that pre-emptively.<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Bogdan Nicula <bogdan@oma.be><br>
<b>Sent:</b> Sunday, April 11, 2021 1:32 PM<br>
<b>To:</b> Andrew Annex <aannex1@jhu.edu><br>
<b>Cc:</b> Manikantan Ramadas <manikantan@istrac.gov.in>; Wright, Edward D (US 392N) <edward.d.wright@jpl.nasa.gov>; spice_discussion@naif.jpl.nasa.gov <spice_discussion@naif.jpl.nasa.gov>; mramadas@gmail.com <mramadas@gmail.com><br>
<b>Subject:</b> Re: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
      External Email - Use Caution<br>
<br>
<br>
<br>
unistd.h should definitely be included for the `access` function, according to both Single UNIX Specification and the Linux man page. It just happened to work without before macOS 11. This has to be done when NON_UNIX_STDIO is defined.<br>
<br>
Cheers,<br>
Bogdan<br>
<br>
> On 11 Apr 2021, at 7:04 PM, Andrew Annex <aannex1@jhu.edu> wrote:<br>
><br>
> Hey All,<br>
><br>
> Relevant to this discussion, CSPICE for aarch64 and osx-arm64 is now available through the conda-forge (<a href=""></a>https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fconda-forge.org%2F&amp;data=04%7C01%7Caannex1%40jhu.edu%7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637537591809067785%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2i4jghobGQ1hd6Cc821Y%2F6hqs%2FPRXKZIWJzomqStxLE%3D&amp;reserved=0,
<a href="https://urldefense.us/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Fanaconda.org*2Fconda-forge*2Fcspice&amp;data=04*7C01*7Caannex1*40jhu.edu*7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e*7C9fa4f438b1e6473b803f86f8aedf0dec*7C0*7C0*7C637537591809067785*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=MHi8*2FLC96*2BdrucojgTBZ7Dknzhv9GSqNO8KYwKGhRY4*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!PvBDto6Hs4WbVuu7!eOuwkOZ8sUbX_7YwN6ieNux_o1wOVYK5MoBAk4_W0qSYdgAhnUiOfUiC1mAriSP2Go2NadyRQM5ztA$">
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fanaconda.org%2Fconda-forge%2Fcspice&amp;data=04%7C01%7Caannex1%40jhu.edu%7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637537591809067785%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=MHi8%2FLC96%2BdrucojgTBZ7Dknzhv9GSqNO8KYwKGhRY4%3D&amp;reserved=0</a>
 ). However, I don't own a Raspberry Pi or M1 mac to personally verify them. CI tests for spiceypy pass at least on aarch64, but tests are not currently run on osx-arm64 builds.<br>
><br>
> Once you have anaconda/miniconda installed on those systems you should be able to run 'conda install cspice -c conda-forge' to install CSPICE for those platforms. SpiceyPy will also work similarly by running 'conda install spiceypy -c conda-forge'. You maybe
 able to extract the compiled libraries/executable utilities from the zip files hosted by anaconda as well.<br>
><br>
> You can view the changes (not that many) I needed to perform to get it working at
<a href="https://urldefense.us/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2Fconda-forge*2Fcspice-feedstock*2Ftree*2Fmaster*2Frecipe&amp;data=04*7C01*7Caannex1*40jhu.edu*7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e*7C9fa4f438b1e6473b803f86f8aedf0dec*7C0*7C0*7C637537591809067785*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=QzsHgDzlNmlD*2BEY8NScMl0AGDQt2T6vNKm0JEBWr96Q*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!PvBDto6Hs4WbVuu7!eOuwkOZ8sUbX_7YwN6ieNux_o1wOVYK5MoBAk4_W0qSYdgAhnUiOfUiC1mAriSP2Go2NadzsRXmBcA$">
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fconda-forge%2Fcspice-feedstock%2Ftree%2Fmaster%2Frecipe&amp;data=04%7C01%7Caannex1%40jhu.edu%7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637537591809067785%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=QzsHgDzlNmlD%2BEY8NScMl0AGDQt2T6vNKm0JEBWr96Q%3D&amp;reserved=0</a>.
 Interestingly, I did not need to patch inquire.c which maybe down to the various GCC flags that their CI workers configure for me, although I didn't investigate this difference. The only change I really needed to do was remove the use of the '-m64' GCC flag
 from the various mkprodct.csh scripts.<br>
><br>
> I would be curious for people with the relevant hardware to try out spiceypy/cspice conda-forge distributions.<br>
><br>
> -Andrew<br>
><br>
> From: Spice_discussion <spice_discussion-bounces@naif.jpl.nasa.gov> on behalf of Manikantan Ramadas <manikantan@istrac.gov.in><br>
> Sent: Friday, April 9, 2021 12:32 AM<br>
> To: Wright, Edward D (US 392N) <edward.d.wright@jpl.nasa.gov><br>
> Cc: spice_discussion@naif.jpl.nasa.gov <spice_discussion@naif.jpl.nasa.gov>; mramadas@gmail.com <mramadas@gmail.com><br>
> Subject: Re: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs<br>
><br>
><br>
>       External Email - Use Caution<br>
><br>
><br>
> Hi all,<br>
><br>
> Please see the email below. This earlier mail didn't go through because of the PDF attachment, I had, I understand.<br>
><br>
> 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.<br>
><br>
><br>
> Thanks and Regards,<br>
> Manikantan Ramadas<br>
> --<br>
> "By being pleasant always and smiling, it takes you nearer to God,<br>
> nearer than any prayer." - Sri Ramakrishna Paramahamsa<br>
> ------------------------------------------------------------------<br>
><br>
><br>
><br>
><br>
><br>
><br>
> From: mramadas@gmail.com <mramadas@gmail.com><br>
> Sent: Thursday, April 8, 2021 12:17 AM<br>
> To: Wright, Edward D (US 392N)<br>
> Cc: spice_discussion@naif.jpl.nasa.gov; Manikantan Ramadas<br>
> Subject: Re: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs<br>
><br>
> Hi Mr.Edward Wright,<br>
><br>
> Sorry about the delay in getting back. I couldn’t spend much time on this until now.<br>
><br>
> Tonight, I did put in some time, and was able to make the SPICE Library compile on MacOS on Apple Silicon.<br>
> 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<br>
><br>
> 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.<br>
><br>
> 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:<br>
> patch inquire.c inquire.c.diff<br>
><br>
> Thanks and Regards<br>
> R.Manikantan<br>
><br>
><br>
>> On 05-Mar-2021, at 9:31 PM, Wright, Edward D (US 392N) <edward.d.wright@jpl.nasa.gov> wrote:<br>
>><br>
>> To: R Manikantan<br>
>> From: Edward Wright<br>
>><br>
>> 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>
>><br>
>> What compile errors did you observe?<br>
>><br>
>> As always,<br>
>> Edward Wright<br>
>><br>
>><br>
>><br>
>> From: spice_discussion-bounces@naif.jpl.nasa.gov <spice_discussion-bounces@naif.jpl.nasa.gov> on behalf of Manikantan Ramadas <mramadas@gmail.com><br>
>> Sent: Wednesday, March 3, 2021 9:20:06 AM<br>
>> To: spice_discussion@naif.jpl.nasa.gov<br>
>> Subject: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs<br>
>><br>
>> Hi all,<br>
>><br>
>> I was wondering if any of us have successfully compiled and using CSPICE library on the new Apple Silicon (ARM64) M1 Macs?<br>
>><br>
>> 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>
>><br>
>> Thanks & Regards,<br>
>> R Manikantan<br>
>> _______________________________________________<br>
>> Spice_discussion mailing list<br>
>> Spice_discussion@naif.jpl.nasa.gov<br>
>> <a href="https://urldefense.us/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Fnaif.jpl.nasa.gov*2Fmailman*2Flistinfo*2Fspice_discussion&amp;data=04*7C01*7Caannex1*40jhu.edu*7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e*7C9fa4f438b1e6473b803f86f8aedf0dec*7C0*7C0*7C637537591809067785*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=cFhwT2N3Bv0wsU9oc0cHspwvtaVsxmXy7UtiFefbx5w*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJQ!!PvBDto6Hs4WbVuu7!eOuwkOZ8sUbX_7YwN6ieNux_o1wOVYK5MoBAk4_W0qSYdgAhnUiOfUiC1mAriSP2Go2NadwFwekaHQ$">
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnaif.jpl.nasa.gov%2Fmailman%2Flistinfo%2Fspice_discussion&amp;data=04%7C01%7Caannex1%40jhu.edu%7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637537591809067785%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=cFhwT2N3Bv0wsU9oc0cHspwvtaVsxmXy7UtiFefbx5w%3D&amp;reserved=0</a><br>
><br>
> _______________________________________________<br>
> Spice_discussion mailing list<br>
> Spice_discussion@naif.jpl.nasa.gov<br>
> <a href="https://urldefense.us/v3/__https://nam02.safelinks.protection.outlook.com/?url=http*3A*2F*2Fnaif.jpl.nasa.gov*2Fmailman*2Flistinfo*2Fspice_discussion&amp;data=04*7C01*7Caannex1*40jhu.edu*7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e*7C9fa4f438b1e6473b803f86f8aedf0dec*7C0*7C0*7C637537591809067785*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=AXyAl4BVn3m9fVNgO6VFc5rquptVnCEOqCXkfF7dKKs*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJQ!!PvBDto6Hs4WbVuu7!eOuwkOZ8sUbX_7YwN6ieNux_o1wOVYK5MoBAk4_W0qSYdgAhnUiOfUiC1mAriSP2Go2NadwbqoepJw$">
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnaif.jpl.nasa.gov%2Fmailman%2Flistinfo%2Fspice_discussion&amp;data=04%7C01%7Caannex1%40jhu.edu%7C1e6c4b2b5f7e44a9b69d08d8fd0fd91e%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637537591809067785%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AXyAl4BVn3m9fVNgO6VFc5rquptVnCEOqCXkfF7dKKs%3D&amp;reserved=0</a><br>
<br>
</div>
</span></font></div>
</body>
</html>