#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:
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)
Change History (8)
Changed 11 years ago by daniel@…
Attachment: | 0001-zlib-Build-fix-for-using-clang-as-default-compiler.patch added |
---|
comment:1 Changed 11 years ago by daniel@…
Cc: | daniel@… added |
---|
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: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: | new → closed |
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.
Cc Me!