[MacPorts] #59347: gildas @201910b build failure: ld: framework not found CoreFoundation

MacPorts noreply at macports.org
Wed Nov 6 14:17:05 UTC 2019


#59347: gildas @201910b build failure: ld: framework not found CoreFoundation
------------------------------+----------------------
  Reporter:  isabellemontoya  |      Owner:  bardeau
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.6.1
Resolution:                   |   Keywords:
      Port:  gildas           |
------------------------------+----------------------

Comment (by bardeau):

 Sorry for the late answer. You will find below a detailed description of
 the problem and workaround(s). Your feedback (success/failure) is welcome.

 * Symptom

 Gildas build fails. The end of the main.log file shows:
 {{{
   :info:build /opt/local/bin/gfortran-mp-9  -Wl,-commons,use_dylibs
 -L/opt/local/lib -Wl,-headerpad_max_install_names  built/x86_64-darwin-
 gfortran/hlp2tex.o  -o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gildas/gildas/work
 /gildas-src-oct19b/integ/x86_64-darwin-gfortran/bin/hlp2tex \
   :info:build
 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gildas/gildas/work
 /gildas-src-oct19b/integ/x86_64-darwin-gfortran/lib
 -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib
 -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgio-2.0
 -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage
 -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0
 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype
 -lgthread-2.0 -lglib-2.0 -lintl -L/opt/local/lib -lpng16
 -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib -ldl
 -framework CoreFoundation -lpython2.7 -L/opt/local/lib -lcfitsio -lcurl
 -lm -ldl
   :info:build ld: framework not found CoreFoundation
   :info:build collect2: error: ld returned 1 exit status
 }}}
 The framework named CoreFoundation is not found while it is present in the
 linker default search paths (see man ld):
 {{{
 Users/bardeau> ls -ld /System/Library/Frameworks/CoreFoundation.framework/
 drwxr-xr-x  7 root  wheel  224 Nov  5 18:22
 /System/Library/Frameworks/CoreFoundation.framework/
 }}}

 * Context

 The bug is reported under MacOSX Mojave 10.14 in conjunction with Xcode
 11. Other
 combinations do not seem to fail.

 * Explanation

 The linker is not correctly invoked by the compiler (gfortran-mp-9). It
 uses and/or misses
 options (in particular default paths) which are not suited for Xcode 11.
 This has been
 identified e.g. in this bug report: https://trac.macports.org/ticket/58895
 Basically, the installed version of compiler (mp-gcc9) is pre-compiled by
 a buildbot on
 MacPorts servers, but the resulting binaries do not seem correctly
 configured for Xcode 11.

 * Workarounds (choose only one of the 3 proposed solutions)

 1) If possible, stick to Xcode 10. But it is unclear if downgrading Xcode
 is possible.

 2) If possible, go for MacOSX Catalina. We have been reported the bug is
 not present in that version (to be confirmed).

 3) Reinstall the compilers FROM SOURCES (i.e. taking correctly into
 account your environment) thanks to the -s flag:
 {{{
      sudo port uninstall gcc9
      sudo port -v -s install gcc9
 }}}
 This process will take about 1 or 2 HOURS. The same is also true for
 Python 2.7: the default binaries won't be able to compile the Gildas-
 Python binary modules (pygreg.so etc). The solution is also to reinstall
 Python from sources:
 {{{
      sudo port uninstall python27
 }}}
 Answer yes even if MacPorts warns this will leave broken ports. This is
 temporary for Python to be rebuilt. Then rebuild it
 {{{
      sudo port -v -s install python27
 }}}
 Finally, reinstall Gildas. For safety restart the compilation from
 scratch:
 {{{
      sudo port uninstall gildas
      sudo port install gildas
 }}}


 * Fixing the issue

 We are documenting or creating tickets to MacPorts. It is unclear yet if a
 decent fix will be found.

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


More information about the macports-tickets mailing list