- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm using Intel Fortran version 14.0.2 20140121 on Mac OS X and Xcode 6.1.1.
After Installing and sourcing files like
source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/mkl/bin/intel64/mklvars_intel64.sh
tried to compile a test file (Hello world) and got the following error:
**********************
Undefined symbols for architecture x86_64:
"__Unwind_Backtrace", referenced from:
_tbk_trace_stack in libirc.a(tbk_backtrace.o)
"__Unwind_ForcedUnwind", referenced from:
_tbk_trace_stack in libirc.a(tbk_backtrace.o)
"__Unwind_GetIP", referenced from:
_tbk_stop_unwind_callback in libirc.a(tbk_backtrace.o)
_backtrace_callback in libirc.a(tbk_backtrace.o)
"__Unwind_GetRegionStart", referenced from:
_tbk_stop_unwind_callback in libirc.a(tbk_backtrace.o)
ld: symbol(s) not found for architecture x86_64
**********************
I've read that this combination of OS and Xcode is not supported by the version 14,
but as I saw a similar error when I compiled the same file with gfortran,
I think this might not be due to the combination problem.
I'm glad if someone could find how to fix this error.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you check whether libunwind is linked. If not, does specifying it help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your comment !
I couldn't find libunwind.a in /opt/intel/lib/intel64.
There is libunwind.h in an irreverent folder, but I guess this is for another compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know nothing about Mac, however it does name libraries more like libunwind.dylib than libunwind.a . Maybe you can modify your search accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have gcc installed? That is required. Missing gcc could cause this error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have not been able to coax ld into shedding light on where those external references are resolved so I cannot tell which location might be used. On our Mac running OS X 10.10 (Yosemite) with Xcode 6.1 it has:
/usr/lib/system/libunwind.dylib
-OR-
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/system/libunwind.dylib
I somewhat suspect the latter is used since the compiler-driver includes most of the path to the latter copy on the ld command-line for the -syslibroot argument.
i.e.
-syslibroot \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk \
Along the lines of Steve’s comment, I was wondering whether a trivial C/C++ program will compile and link.
Also, did you install the Intel 14.0 release after the Xcode 6.1 install? If not, you should reinstall the Intel 14.0 release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just confirmed that it is the version found under the -syslibroot path. You can compile using the ifort -dryrun option to see what path the compiler uses for -syslibroot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much for the people who kindly commented!
The one causing the trouble was gcc.
I could compile a c program, but after I installed another gcc via macports,
the error on ifort disappeared.
Thank you all again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. I'm not sure what the root cause was but am glad you were able to resolve this.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page