[Spice_discussion] CSPICE on M1 Apple-Silicon Macs

Manikantan Ramadas mramadas at gmail.com
Wed Apr 7 11:47:16 PDT 2021


Hi Mr.Edward Wright,

Sorry about the delay in getting back. I couldn’t spend much time on this until now.

Tonight, I did put in some time, and was able to make the SPICE Library compile on MacOS on Apple Silicon.
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

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.

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:
patch inquire.c inquire.c.diff

Thanks and Regards
R.Manikantan



> On 05-Mar-2021, at 9:31 PM, Wright, Edward D (US 392N) <edward.d.wright at jpl.nasa.gov> wrote:
> 
> To: R Manikantan
> From: Edward Wright
> 
> 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.
> 
> What compile errors did you observe?
> 
> As always,
> Edward Wright
> 
> 
> 
> From: spice_discussion-bounces at naif.jpl.nasa.gov <spice_discussion-bounces at naif.jpl.nasa.gov> on behalf of Manikantan Ramadas <mramadas at gmail.com>
> Sent: Wednesday, March 3, 2021 9:20:06 AM
> To: spice_discussion at naif.jpl.nasa.gov
> Subject: [Spice_discussion] CSPICE on M1 Apple-Silicon Macs
>  
> Hi all,
> 
> I was wondering if any of us have successfully compiled and using CSPICE library on the new Apple Silicon (ARM64) M1 Macs?
> 
> 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..
> 
> Thanks & Regards,
> R Manikantan
> _______________________________________________
> Spice_discussion mailing list
> Spice_discussion at naif.jpl.nasa.gov <mailto:Spice_discussion at naif.jpl.nasa.gov>
> https://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion <https://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20210408/777afb6b/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SPICE-on-Apple-Silicon.pdf
Type: application/pdf
Size: 98438 bytes
Desc: not available
URL: <http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20210408/777afb6b/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20210408/777afb6b/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inquire.c.diff
Type: application/octet-stream
Size: 308 bytes
Desc: not available
URL: <http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20210408/777afb6b/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20210408/777afb6b/attachment-0005.html>


More information about the Spice_discussion mailing list