Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-256

Symbol not found: _clock_gettime with Xcode 8 on OS X 10.11 El Capitan

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.0.2
    • Fix Version/s: 19.2
    • Component/s: None
    • Labels:
      None

      Description

      Tested with Erlang 19.0.2 but probably affects all versions that use clock_gettime.

      The Erlang build fails with Xcode 8 on OS X 10.11 El Capitan with the following error:

      {code}
      (cd preloaded/src && /Applications/Xcode.app/Contents/Developer/usr/bin/make ../ebin/erts.app)
      sed -e 's;%VSN%;8.0.2;' erts.app.src > ../ebin/erts.app
      cd lib && \
      ERL_TOP=/private/tmp/erlang-20160917-946-19or0nl/otp-OTP-19.0.2 PATH=/private/tmp/erlang-20160917-946-19or0nl/otp-OTP-19.0.2/bootstrap/bin:"${PATH}" \
      make opt SECONDARY_BOOTSTRAP=true
      Makefile:72: warning: overriding commands for target `clean'
      /private/tmp/erlang-20160917-946-19or0nl/otp-OTP-19.0.2/make/otp_subdir.mk:29: warning: ignoring old commands for target `clean'
      === Entering application hipe
      (cd ../main && /Applications/Xcode.app/Contents/Developer/usr/bin/make hipe.hrl)
      sed -e "s;%VSN%;3.15.1;" ../../hipe/main/hipe.hrl.src > ../../hipe/main/hipe.hrl
      erlc -W +debug_info -Werror +inline +warn_unused_import +warn_export_vars -o../ebin hipe_rtl.erl
      dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
      Referenced from: /private/tmp/erlang-20160917-946-19or0nl/otp-OTP-19.0.2/bin/x86_64-apple-darwin15.6.0/beam.smp
      Expected in: /usr/lib/libSystem.B.dylib

      dyld: Symbol not found: _clock_gettime
      Referenced from: /private/tmp/erlang-20160917-946-19or0nl/otp-OTP-19.0.2/bin/x86_64-apple-darwin15.6.0/beam.smp
      Expected in: /usr/lib/libSystem.B.dylib

      make[3]: *** [../ebin/hipe_rtl.beam] Trace/BPT trap: 5
      make[2]: *** [opt] Error 2
      make[1]: *** [opt] Error 2
      make: *** [secondary_bootstrap_build] Error 2{code}

      As a workaround I can set

      {code}
      export erl_cv_clock_gettime_monotonic_default_resolution=no
      export erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=no
      export erl_cv_clock_gettime_wall_default_resolution=no{code}

      Full build log here: https://gist.github.com/ilovezfs/a6c565d14b817f2f6efa65895ad69011

        Attachments

          Activity

            People

            Assignee:
            rickard Rickard Green
            Reporter:
            ilovezfs ilovezfs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: