Opened 8 years ago

Closed 3 years ago

#50800 closed defect (fixed)

cairo, cairo-devel: fix for build failures against Xcode 7.3 linker when /usr/local/lib is absent

Reported by: howarth.at.macports@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc: kencu (Ken)
Port: cairo, cairo-devel

Description (last modified by ryandesign (Ryan Carsten Schmidt))

The Xcode 7.3 linker produces a new warning...

ld: warning: directory not found for option '-L/usr/local/lib'

when the /usr/local/lib directory is absent. The configure script in cairo uses its own pthread test, which doesn't cope with warnings, rather than the standard one from pthread.m4. The attached Portfile.diff adds a simple fix to prune the results from 'cat conftest.err' of lines with these warnings. Tested on 10.11 with Xcode 7.3 beta 5 and /usr/local/lib missing.

Attachments (1)

Portfile.diff (410 bytes) - added by howarth.at.macports@… 8 years ago.
Portfile diff to solve pthread detection against Xcode 7.3 new linker warnings

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by howarth.at.macports@…

Attachment: Portfile.diff added

Portfile diff to solve pthread detection against Xcode 7.3 new linker warnings

comment:1 Changed 8 years ago by howarth.at.macports@…

Since the build fails on Xcode 7.3 when /usr/local/lib is absent due failure to detect the pthread support...

./cairo-mutex-impl-private.h:262:3: error: "XXX: No mutex implementation found. Cairo will not work with multiple threads. Define CAIRO_NO_MUTEX to 1
      to acknowledge and accept this limitation and compile cairo without thread-safety support."

it seems unnecessary to bump the revision.

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

Cc: ryandesign@… removed
Description: modified (diff)
Keywords: haspatch added
Owner: changed from macports-tickets@… to ryandesign@…
Port: cairo-devel added
Summary: fix for cairo build failures against Xcode 7.3 linker when /uer/local/lib is absentcairo, cairo-devel: fix for build failures against Xcode 7.3 linker when /usr/local/lib is absent

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

Have you discussed this problem with the developers of cairo? Do they agree this is the correct solution?

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

This same error occurs for other reasons that cause linker warnings as well. It appears that anything that throws a linker warning causes the pthread tests to fail, and that in turn causes the error: "XXX: No mutex implementation found. error above.

I just patched this out today building cairo +universal on mojave (where the warning is presumably that i386 is deprecated).

see also

<https://bugs.freedesktop.org/show_bug.cgi?id=30910>

and

<https://bugs.freedesktop.org/show_bug.cgi?id=33417>

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

one useful thing to consider is that adding -Wl,-w to the build ldflags appears to suppress warnings coming out the linker.

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

Cc: kencu added

Ken, does the problem still occur with cairo 1.16.0 (available in the cairo-devel port)? If so, please ping the developers about fixing it via the upstream bug report that you found above.

comment:7 Changed 3 years ago by JDLH (Jim DeLaHunt)

Update: as of 2018-08-25, https://bugs.freedesktop.org/show_bug.cgi?id=33417 had been marked as a duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=30910 , which in turn was migrated to their GitLab instance as https://gitlab.freedesktop.org/cairo/cairo/issues/121 . I don't see any more progress in issues/121 as of 2021-01-24.

comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

In 2268b7cf23920f46c1cb75fb8fc17efd63d7451b/macports-ports (master):

cairo, cairo-devel: Ignore stderr in configure tests

Closes: #50800
Closes: #57742

Note: See TracTickets for help on using tickets.