Opened 13 years ago

Closed 13 years ago

#32609 closed defect (fixed)

quartz-wm 1.2.1_0 does not build on PPC Leopard because of "Undefined symbols"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: powerpc leopard Cc:
Port: quartz-wm

Description

A few times during the build process GCC reports:

frame.h:40:2: warning: #warning "Old libXplugin version detected.  Some features may not be supported."

In the end the build fails with:

  OBJCLD quartz-wm
Undefined symbols:
  "__dispatch_main_q", referenced from:
      __dispatch_main_q$non_lazy_ptr in dock-support.o
  "_dispatch_async", referenced from:
      _DockRestoreItemAsync in dock-support.o
      ___DockRestoreItemAsync_block_invoke_1 in dock-support.o
  "__NSConcreteStackBlock", referenced from:
      __NSConcreteStackBlock$non_lazy_ptr in dock-support.o
  "_dispatch_get_current_queue", referenced from:
      _dock_message_handler in dock-support.o
  "_dispatch_queue_create", referenced from:
      _DockInit in dock-support.o
ld: symbol(s) not found

There are also a lot of messages about "shadowed declarations".

Attachments (2)

main.log (41.4 KB) - added by ballapete (Peter "Pete" Dyballa) 13 years ago.
main.log
quartz-wm.patch (1.1 KB) - added by jeremyhu (Jeremy Huddleston Sequoia) 13 years ago.
quartz-wm.patch

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

main.log

comment:1 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Those should all be weak in dock-support.o

comment:2 in reply to:  1 ; Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Those should all be weak in dock-support.o

If you mean with "weak" weak binding, then this happens *after* link time, at run time of the linked object.

When you mean with "weak" that the symbols do not need to be available at link time, then quartz-wm needs to be built using a two-level namespace.

comment:3 in reply to:  1 Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Those should all be weak in dock-support.o

Maybe this excerpt from ld man page helps to solve the problem:

     -undefined treatment
                 Specifies how undefined symbols are to be treated. Options are: error, warning,
                 suppress, or dynamic_lookup.  The default is error.

comment:4 in reply to:  2 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

What I mean is that these symbols are weak linked and checked for at runtime. The symbols are annotated with the weak_import attribute, so their absence shouldn't be an issue at link time.

comment:5 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Oh right, but they have to be there on the machine linking them... ugg...

comment:6 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Yeah, I guess the best solution really is -undefined suppress ... sigh

comment:7 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from macports-tickets@… to jeremyhu@…
Status: newassigned

Actually, dynamic_lookup is probably better for the built on 10.5 running on 10.6 case

comment:8 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Can you please test this patch?

Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Attachment: quartz-wm.patch added

quartz-wm.patch

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… removed
Keywords: powerpc leopard added; PPC Leopard "Undefined symbols" removed

comment:10 in reply to:  8 Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Can you please test this patch?

It looks much better now! Package is built. (I modified Portfile that the patch gets applied.)

comment:11 in reply to:  8 Changed 13 years ago by yaseppochi (Stephen J. Turnbull)

Replying to jeremyhu@…:

Can you please test this patch?

The patch also allows "port upgrade quartz-wm" to succeed on Mac OS X 10.5.8 "Leopard" on a MacBook Pro Intel Core Duo machine. Before it failed with the same symptoms as above.

However, I had to edit the patch to remove the leading "a/" and "b/".

comment:12 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: assignedclosed

Thanks. r88178

Note: See TracTickets for help on using tickets.