Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#39523 closed defect (fixed)

zlib doesn't build when clang is the default compiler (/usr/bin/cc)

Reported by: daniel@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc: jeremyhu (Jeremy Huddleston Sequoia), landonf (Landon Fuller), daniel@…
Port: zlib

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

When Clang is used as the default compiler (i.e., /usr/bin/cc) then the zlib configure script may fail to properly detect that the compiler is "gcc"-like. This in turn causes the configure script to follow a slightly different code path which then fails to properly compute the shared library extension on Darwin.

This is effectively the same problem as:

#28656

but when the compiler path doesn't include clang in it.

The attached patch (also submitted upstream to zlib maintainers) fixes the problem by patching the configure script.

Attachments (1)

0001-zlib-Build-fix-for-using-clang-as-default-compiler.patch (2.1 KB) - added by daniel@… 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by daniel@…

Cc: daniel@… added

Cc Me!

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

Cc: daniel@… removed
Keywords: clang removed
Owner: changed from macports-tickets@… to ryandesign@…

Thanks for the ticket. In the future, please Cc relevant port maintainers.

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

Cc: landonf@… added
Description: modified (diff)
Keywords: haspatch added

There should be no circumstance in MacPorts when $CC is /usr/bin/cc. See UsingTheRightCompiler for why.

Are you encountering an actual issue with this port in MacPorts? If so, could you describe it or show the error you get?

Are we perhaps in some way forgetting to tell the zlib configure script to use $CC?

comment:4 Changed 11 years ago by daniel@…

Cc: daniel@… added

Cc Me!

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

It's not using /use/bin/cc … It's using $CC and just not checking for "clang"

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

Resolution: fixed
Status: newclosed

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

I still don't understand what actual problem this was causing for any MacPorts users.

Note: See TracTickets for help on using tickets.