- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have just started using fort 19.0 and Xcode 10 under MacOS 10.14
We are trying to link to netcdf-fortran library with a simple test, when linking to macports /opt/local/lib built with fortran 7.3 and my build with fortran 7.3 in /usr/local/lib, the fort link fails, yet the two gcc/gfortran libs work just fine.
The error is listed below, but listed here -
dyld: __dyld section not supported in /usr/local/ifort/lib/libnetcdff.6.dylib
Abort trap: 6
I have tried searching for the error without any success. The ifort startup script is
#!/bin/sh
# ifort
# runs ifort command after setting up variables
dir=/opt/intel
. $dir/bin/compilervars.sh -arch intel64 -platform mac
ifort "$@"
The results are -
bash-3.2# ifort hello.f -L/usr/local/ifort/lib/ -lnetcdff
bash-3.2# ./a.out
dyld: __dyld section not supported in /usr/local/ifort/lib/libnetcdff.6.dylib
Linking to gcc/gfortran library works fine -
bash-3.2# ifort hello.f -L/usr/local/gfortran/lib/ -lnetcdff
bash-3.2# ./a.out
Netcdf version = 4.6.1 of Oct 25 2018 12:24:45 $
bash-3.2# ifort hello.f -L/opt/local/lib/ -lnetcdff
bash-3.2# ./a.out
Netcdf version = 4.6.1 of Oct 25 2018 12:24:45 $
bash-3.2# cat hello.f
character*80 nf_inq_libvers
print *, 'Netcdf version = ', trim (nf_inq_libvers())
end
bash-3.2# ifort -v
ifort version 19.0.0.117
bash-3.2#
[mac27:~] bmcinnes%
bash-3.2# ifort hello.f -L/usr/local/ifort/lib/ -lnetcdff
bash-3.2# otool -L a.out
a.out:
/usr/local/ifort/lib/libnetcdff.6.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
bash-3.2# ls -l /opt/intel
total 8
drwxr-xr-x 6 root wheel 192 Jun 28 08:10 .pset
drwxr-xr-x 45 root wheel 1440 Oct 12 07:20 .scripts
-rw-r--r-- 1 root wheel 11 Oct 12 07:20 .version
drwxr-xr-x 17 root wheel 544 Oct 12 07:20 bin
lrwxr-xr-x 1 root wheel 30 Oct 12 07:20 compilers_and_libraries -> ./compilers_and_libraries_2019
drwxr-xr-x 3 root wheel 96 Oct 12 07:20 compilers_and_libraries_2019
drwxr-xr-x 5 root wheel 160 Oct 12 07:19 compilers_and_libraries_2019.0.117
drwxr-xr-x 5 root wheel 160 Oct 12 07:20 conda_channel
drwxr-xr-x 6 root wheel 192 Oct 12 07:20 debugger_2019
drwxr-xr-x 3 root wheel 96 Oct 12 07:19 documentation_2019
lrwxr-xr-x 1 root wheel 37 Oct 12 07:20 include -> ./compilers_and_libraries/mac/include
lrwxr-xr-x 1 root wheel 45 Oct 5 2017 intel_sdp_products.tgz.db -> /opt/intel/.pset/db/intel_sdp_products.tgz.db
drwxr-xr-x 5 root wheel 160 Oct 12 07:20 ism
lrwxr-xr-x 1 root wheel 33 Oct 12 07:20 lib -> ./compilers_and_libraries/mac/lib
drwxr-xr-x 3 root bin 96 Jun 28 08:10 licenses
lrwxr-xr-x 1 root wheel 27 Oct 12 07:20 man -> ./documentation_2019/en/man
lrwxr-xr-x 1 root wheel 33 Oct 12 07:20 mkl -> ./compilers_and_libraries/mac/mkl
lrwxr-xr-x 1 root wheel 31 Oct 12 07:20 parallel_studio_xe_2019 -> ./parallel_studio_xe_2019.0.030
drwxr-xr-x 9 root wheel 288 Oct 12 07:20 parallel_studio_xe_2019.0.030
drwxr-xr-x 3 root wheel 96 Oct 12 07:20 samples_2019
lrwxr-xr-x 1 root wheel 33 Oct 12 07:20 tbb -> ./compilers_and_libraries/mac/tbb
bash-3.2#
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Libraries built with gfortran are not compatible with program compiled and linked with ifort. At least, you have to link the libgfortran as well, but I am not sure that it works in that case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for looking at the problem. I have edited the original to make the error a bit clearer (I hope).
The links to fortran/gcc libraries works fine with fort, it is the fort compiled library link that causes the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found an easy solution to this problem: downgrade to Xcode 9.4.1, which Apple says is still compatible with Mojave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion, we have been on furlough, so sorry its taken so long to reply.
We cannot really go back to 9.4, so have logged it with Apple and hoping to try Xcode 10.2 beta but the current download fails to install 10.2 CLT beta.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page