Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#37916 closed defect (fixed)

pcre @8.32: libtool file breaks clang builds by adding the -pthread option

Reported by: jpeach@… Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: pcre

Description

/opt/local/lib/libpcre.la contains the line:

inherited_linker_flags=' -pthread'

This option is only valid for gcc, so when clang sees it, it emits a diagnostic. This can break the build of software that uses libpcre (especially when building with warnings as errors).

This only started happening recently, maybe around MacPorts 2.1.3. The workaround is to edit libpcre.la to remove the additional option, but it takes some time to figure out what the problem is.

Change History (5)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Port: pcre added; libpcre removed
Status: newassigned
Version: 2.1.2

Thanks, I’ll look into this shortly.

comment:2 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:3 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed
Summary: libprce libtool file breaks clang builds by adding the -pthread optionpcre @8.32: libtool file breaks clang builds by adding the -pthread option

Fixed in r102473. Not sure why PCRE does this, since libSystem already provides the pthreads API. GCC doesn’t need the flag either.

comment:4 in reply to:  description Changed 11 years ago by larryv (Lawrence Velázquez)

Oops; as you mentioned in the ticket, the libtool files record the linker flags. Revbumped in r102474.

comment:5 Changed 11 years ago by jpeach@…

Verified that this is fixed in pcre @8.32_1. Thanks!

Note: See TracTickets for help on using tickets.