Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

oneAPI requires Xcode on macOS

Matthew_Grismer
Beginner
2,300 Views

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?

Labels (1)
0 Kudos
11 Replies
Soumya_M_Intel
Moderator
2,262 Views

Hi Matthew_Grismer,


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.


Regards,

Soumya


0 Kudos
VarshaS_Intel
Moderator
2,208 Views

Hi,


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,

Varsha


0 Kudos
Matthew_Grismer
Beginner
2,194 Views
0 Kudos
VarshaS_Intel
Moderator
2,163 Views

Hi,


Thanks for providing the information.


Could you please find the below link for the System Requirements for Fortran using macOS?

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/oneapi-fortran-compiler-system-requirements.html


Thanks & Regards,

Varsha


0 Kudos
Matthew_Grismer
Beginner
2,153 Views

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.
      • Workaround

Install Xcode

 

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?

0 Kudos
Ron_Green
Moderator
2,129 Views

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-found-with-macos-big-sur.html

 

Show what you have for 

echo $0

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

0 Kudos
Matthew_Grismer
Beginner
2,119 Views

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

Password:

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

program test

  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.

0 Kudos
Ron_Green
Moderator
2,067 Views

I have been looking into this.  Try this:

 

export LIBRARY_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:${LIBRARY_PATH}

 

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.

 

 

0 Kudos
Matthew_Grismer
Beginner
2,046 Views
0 Kudos
Ron_Green
Moderator
2,060 Views

I opened a bug report  CMPLRIL0-34744 

0 Kudos
Barbara_P_Intel
Moderator
1,704 Views

This bug with the macOS compiler driver is fixed in last week's release of oneAPI 2022.3. Please try it.



0 Kudos
Reply