Opened 5 years ago
Closed 5 years ago
#59391 closed defect (fixed)
icu @65.1 fails to build on 10.9
Reported by: | jmroot (Joshua Root) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | mavericks | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
Port: | icu |
Change History (6)
comment:1 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
comment:2 Changed 5 years ago by kencu (Ken)
It looks like clang fixed this in <https://reviews.llvm.org/rL201729>.. Presumably that made it into clang-3.7.
comment:3 follow-up: 5 Changed 5 years ago by kencu (Ken)
While we sort this out, for the impatient, sudo port -v upgrade icu configure.compiler=macports-clang-3.7
or a newer clang than that.
comment:4 Changed 5 years ago by erikbs
I am also on 10.9 and encountered this problem. Even though I have set clang 9.0 (mp-clang-9.0
) as my default compiler (and also llvm 9.0 as my default llvm), MacPorts chose to use the one from Xcode 6.2 instead:
:debug:configure Preferred compilers: clang macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.7 macports-clang-3.4 :debug:configure Using compiler 'Xcode Clang' […] :debug:configure CC='/usr/bin/clang' […] /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstddef:55:21: note: 'std::max_align_t' declared here
The path /Library/Developer/CommandLineTools
belongs to the Xcode command line tools, which have not been updated for Mavericks in years. I examined the file mentioned, and just as the compiler output says, there is no definition of a max_align_t
type in there. It is, however, defined in the std
namespace, just as the compiler suggests. Xcode 6.2’s clang is apparently based on LLVM 3.5.
Then I looked into the version that llvm/clang 9.0 provides, i.e. /opt/local/libexec/llvm-9.0/include/c++/v1/cstddef
, and in it I found these lines:
#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \ defined(__DEFINED_max_align_t) || defined(__NetBSD__) // Re-use the compiler's <stddef.h> max_align_t where possible. using ::max_align_t; #else typedef long double max_align_t; #endif
So the fix did make it into more recent versions of clang then and icu
built just fine with the configure.compiler
option set, but why does MacPorts ignore my compiler choice?
comment:5 Changed 5 years ago by jmroot (Joshua Root)
Replying to kencu:
While we sort this out, for the impatient,
sudo port -v upgrade icu configure.compiler=macports-clang-3.7
or a newer clang than that.
Interestingly, macports-clang-3.4 also works.
comment:6 Changed 5 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The problem seems to be that Clang does not provides max_align_t in stdio.h as it should for a C11 compiler.
This causes problems in at least three files.
One solution is to patch the three files.
The other option is to use a more standards compliant compiler (see the pull request).
N.B. that this fix requires another pull request to be merged first.