Opened 4 years ago

Closed 4 years ago

#60211 closed defect (fixed)

qemu @4.2.0: Undefined symbols: _clock_gettime

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: legacy-os haspatch Cc: franckbonin
Port: qemu

Description

Even though the qemu port includes the legacysupport portgroup, it fails to build on Lion with an error that including that portgroup should have corrected:

  LINK    qemu-nbd
Undefined symbols for architecture x86_64:
  "_clock_gettime", referenced from:
      _read_f in qemu-io-cmds.o
      _readv_f in qemu-io-cmds.o
      _write_f in qemu-io-cmds.o
      _writev_f in qemu-io-cmds.o
      _aio_read_f in qemu-io-cmds.o
      _aio_read_done in qemu-io-cmds.o
      _aio_write_f in qemu-io-cmds.o
      ...
ld: symbol(s) not found for architecture x86_64

Since the problem happens at link time, it makes me wonder if the build system might not be respecting our LDFLAGS. I can't see, because the build system uses silent rules.

Change History (7)

comment:1 Changed 4 years ago by raimue (Rainer Müller)

Keywords: legacy-os added

As this only affects outdated versions of macOS, I will not work on the issue myself. However, if anyone else can come up with patches, I will happily them.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Could you at least modify the build to disable silent rules, so that we can investigate further?

comment:3 Changed 4 years ago by kencu (Ken)

i fixed this already before. And then ionic took that fix and tweaked it. did this come back again?

qemu does not use link args normally. there's a lot of analysis in the previous ticket where we fixed yhis.

Version 1, edited 4 years ago by kencu (Ken) (previous) (next) (diff)

comment:4 Changed 4 years ago by kencu (Ken)

see also #59257

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: franckbonin added

Previously, it looks like the port was building correctly in the build phase, and then rebuilding incorrectly in the destroot phase. The fix was to prevent the incorrect rebuild.

Now, in #60494, we see that the problem still exists in 5.0.0 and that it fails during the initial build. It seems to just be ignoring our LDFLAGS entirely.

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:7 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In eae27eb1fc6dd2f1b1518c30fe15ce7590707fa2/macports-ports (master):

qemu: Use MacPorts LDFLAGS

Closes: #60211

Note: See TracTickets for help on using tickets.