[MacPorts] #53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[MacPorts] #53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set

MacPorts
#53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set
----------------------+------------------------
 Reporter:  tenomoto  |      Owner:  michaelld
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:
 Keywords:            |       Port:  cmake, gcc
----------------------+------------------------
 When MACOSX_DEPLOYMENT_TARGET is set, gfortran fails to build a simple
 test program during cmake. The attachment is a minimal CMakeLists.txt to
 reproduce the problem. I used gfrotran-mp-6 on Sierra, but I also had the
 same problem with gfortran-mp-5.

 {{{
 $ tail CMakeFiles/CMakeError.log
 /opt/local/bin/gfortran-mp-6    -isysroot
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
 -mmacosx-version-min=10.11   -c
 /tmp/cmake/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o
 CMakeFiles/cmTC_7967f.dir/testFortranCompiler.f.o
 Linking Fortran executable cmTC_7967f
 /opt/local/bin/cmake -E cmake_link_script
 CMakeFiles/cmTC_7967f.dir/link.txt --verbose=1
 /opt/local/bin/gfortran-mp-6       -isysroot
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
 -mmacosx-version-min=10.11
 CMakeFiles/cmTC_7967f.dir/testFortranCompiler.f.o  -o cmTC_7967f
 ld: unexpected token: !tapi-tbd-v2 file
 '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd'
 for architecture x86_64
 collect2: error: ld returned 1 exit status
 make[1]: *** [cmTC_7967f] Error 1
 make: *** [cmTC_7967f/fast] Error 2
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/53565>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set

MacPorts
#53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set
-------------------------+-----------------------
  Reporter:  tenomoto    |      Owner:  michaelld
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  cmake, gcc  |
-------------------------+-----------------------
Changes (by tenomoto):

 * Attachment "CMakeLists.txt" added.


--
Ticket URL: <https://trac.macports.org/ticket/53565>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set

MacPorts
In reply to this post by MacPorts
#53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set
------------------------------+-----------------------
  Reporter:  tenomoto         |      Owner:  michaelld
      Type:  defect           |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:                   |   Keywords:
      Port:  cmake gcc5 gcc6  |
------------------------------+-----------------------
Changes (by mf2k):

 * port:  cmake, gcc => cmake gcc5 gcc6


--
Ticket URL: <https://trac.macports.org/ticket/53565#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set

MacPorts
In reply to this post by MacPorts
#53565: cmake: Fortran build error with MACOSX_DEPLOYMENT_TARGET set
------------------------------+-----------------------
  Reporter:  tenomoto         |      Owner:  michaelld
      Type:  defect           |     Status:  closed
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:  invalid          |   Keywords:
      Port:  cmake gcc5 gcc6  |
------------------------------+-----------------------
Changes (by tenomoto):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 A workaround is to unset `macosx_deployment_target`. See #54472 and
 [386d7e7ff8cf5bc1c89e12389bb2e81dfe0d015b/macports-ports].

--
Ticket URL: <https://trac.macports.org/ticket/53565#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...