Opened 15 months ago

Last modified 7 weeks ago

#68179 assigned defect

emacs @29.1_1: Symbol not found: _clock_gettime

Reported by: rudi1602 (Rudi) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: elcapitan Cc: catap (Kirill A. Korinsky), cooljeanius (Eric Gallager)
Port: emacs

Description

Log says

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs/work/emacs-29.1" && /usr/bin/make -j2 -w all

So I ran commands manually and got:

dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs/work/emacs-29.1/src/./temacs
  Expected in: /usr/lib/libSystem.B.dylib

_clock_gettime isn't available in El Capitan. Can you skip its call?

Attachments (3)

macports_emacs.tiff (269.6 KB) - added by rudi1602 (Rudi) 14 months ago.
xcode_cli.tiff (75.2 KB) - added by rudi1602 (Rudi) 14 months ago.
emacs-on-ElCap-legacy.log (298.8 KB) - added by rmottola (Riccardo) 7 weeks ago.
Build on 10.11 El Cap with LegacySupport enabled

Download all attachments as: .zip

Change History (9)

comment:1 Changed 15 months ago by jmroot (Joshua Root)

Cc: catap added
Owner: set to drkp
Status: newassigned

comment:2 Changed 15 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:3 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: elcapitan added

If emacs requires clock_gettime now, legacysupport provides an implementation of it. In fact, legacysupport was added to this port over a year ago. Maybe there is just some small change needed to get the build to use it properly. However, we did have a successful build of this port on our OS X 10.11 build machine so maybe there is something specific about your machine that's making this not work. Or we may be looking at completely the wrong thing. You just said the build failed. The error message you showed (":info:build Command failed:") doesn't tell us anything about how it failed; we would need to see the main.log file to determine that, so please attach it. You showed us the error message you got from running commands manually, but unless you also set all the environment variables MacPorts sets when it runs commands for you, a manual build wouldn't necessary do everything that's needed to include legacysupport or do all the other things that a MacPorts build does for you.

Changed 14 months ago by rudi1602 (Rudi)

Attachment: macports_emacs.tiff added

Changed 14 months ago by rudi1602 (Rudi)

Attachment: xcode_cli.tiff added

comment:4 Changed 14 months ago by rudi1602 (Rudi)

I had no main.log, because I cleaned with

sudo port clean --all emacs

So I installed again today with

sudo port install emacs

and it worked.

I don't know if it went well because of the clean procedure or I ran

xcode-select --install

during the first try without cleaning. There was also a hint from MacPorts about this but I have XCode 8.2.1 and thought Command Line Tools are available by default.

There is only a warning left after successful install. I attached a screenshot. Can you say what it means?

Can you also say if you need to run

xcode-select --install

on El Capitan? I also attached a screenshot from XCode which made me think, Command Line Tools are active.

comment:5 in reply to:  4 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: emacs @29.1_1: does not work on Mac OS El Capitan 10.11.6emacs @29.1_1: Symbol not found: _clock_gettime

Replying to ryandesign:

If emacs requires clock_gettime now, legacysupport provides an implementation of it. In fact, legacysupport was added to this port over a year ago.

However this port only uses legacysupport on Darwin 13 (OS X 10.9) and earlier, and you're using Darwin 15 (OS X 10.11). Maybe changing the line legacysupport.newest_darwin_requires_legacy 13 to legacysupport.newest_darwin_requires_legacy 15 is the solution.

Another user has reported the same problem in #70022; maybe we can confirm the solution there.

Replying to rudi1602:

I have XCode 8.2.1 and thought Command Line Tools are available by default.

If you install Xcode, you can also use clang and xcodebuild and other tools from the command line.

Command Line Tools is the name of a separate package available from Apple that installs those command line tools (minus xcodebuild) without the need to install the full Xcode.

MacPorts can build most ports with either of these. If both are available, MacPorts will use the Command Line Tools, unless the port indicates that it requires the full Xcode, in which case it will use the full Xcode and cannot be built if only the Command Line Tools are installed.

There is only a warning left after successful install. I attached a screenshot. Can you say what it means?

You can learn about that warning at the WimplicitFunctionDeclaration wiki page.

comment:6 Changed 7 weeks ago by rmottola (Riccardo)

I have built emacs-app on darwin 15 (10.11) and enabled legacy support there.

I now get a different error, I don't know if it is past clock_gettime, so we improved and get a new error, or instead a new error got introduced. Missing is _renameatx_np.

make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.4/lisp'
make[4]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.4/lisp'
'../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)"  \
		-l comp -f byte-compile-refresh-preloaded \
		--eval '(batch-native-compile t)' align.el
'../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)"  \
		-l comp -f byte-compile-refresh-preloaded \
		--eval '(batch-native-compile t)' allout-widgets.el
dyld: lazy symbol binding failed: Symbol not found: _renameatx_np
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.4/lisp/../src/emacs
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _renameatx_np
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.4/lisp/../src/emacs
  Expected in: /usr/lib/libSystem.B.dylib

make[4]: *** [align.eln] Abort trap: 6
make[4]: *** Waiting for unfinished jobs....
dyld: lazy symbol binding failed: Symbol not found: _renameatx_np
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.4/lisp/../src/emacs
  Expected in: /usr/lib/libSystem.B.dylib

Changed 7 weeks ago by rmottola (Riccardo)

Attachment: emacs-on-ElCap-legacy.log added

Build on 10.11 El Cap with LegacySupport enabled

Note: See TracTickets for help on using tickets.