It appears that while the oneAPI Basekit and HPC kit will install and build code on macOS without having Xcode installed, the compiled code will not run until Xcode is installed. I don't see this in the oneAPI hardware/software requirements page for macOS. We normally only install the Apple command line tools, unless a user explicitly wants to use Xcode (Xcode is a very large install). Was Xcode an intentional requirement for oneAPI? If not, perhaps there is a way for oneAPI to only rely on the command line tools instead?
Thanks for your patience while we were checking with our higher team. Since the nature of the query is related to product use, we are moving this topic to the 'Intel® oneAPI Base Toolkit' community for better assistance. Our internal team will get back to you there promptly.
Have a nice day ahead.
Thanks for posting in Intel Communities.
>>compiled code will not run until Xcode is installed.
Could you please let us know which component/compiler of Intel you are using?
Thanks & Regards,
Thanks for providing the information.
Could you please find the below link for the System Requirements for Fortran using macOS?
Thanks & Regards,
So, from that support page:
Keep in mind that installation of Xcode is still recommended, as command line tools from Xcode are required by the command line compiler. However, you can install just the Xcode Command Line Tools with this command from a terminal window:
and then later:
- Xcode 12 and Xcode 13 available for command line tools use only.
- Fortran Integration into Xcode removed.
- When linking with Xcode 12.0, Xcode 12.1 or Xcode 12.2 some libraries are not found.
So, this suggests that installing Xcode is just a workaround at the moment. Will a future version of oneAPI fix this and only require the command line tools, as is suggested but the first paragraph from the support page?
Command line tools should be sufficient, if you follow Solution #1, not #2, from https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/error-ld-library-not-foun...
Show what you have for
what version of macOS
and show us the output when you try to build a hello world program and run it. Start simple, don't try to build WRF or HDF5 right out of the box.
Then show your application's build log
The b) step of solution #1 does not work, as when only the command line tools are installed there is no /Applications/Xcode.app.
% sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'
I am using zsh on macOS Monterey 12.3.1 with command line tools for Xcode 13.3.1. Here's the output from my screen:
:: initializing oneAPI environment ...
-zsh: ZSH_VERSION = 5.8
args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: compiler -- latest
:: dal -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: intelpython -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: tbb -- latest
:: vtune_profiler -- latest
:: oneAPI environment initialized ::
% more test.f90
write(*,*) "Hello World!"
end program test
% ifort -v
ifort version 2021.6.0
% ifort test.f90
ld: library not found for -lSystem
I did try pointing at the command line tools with "xcode-select -s /Library/Developer/CommandLineTools", but it did not make a difference.
I have been looking into this. Try this:
this worked for me. This path is normally set with an xcode-select query by our driver. but that query is not working for Command Line tools as of Big Sur (when they hid the dynamic libs)
I will get a change request into the ifort driver team to add that -L path by default instead of querying the system with xcode-select.