#34378 closed defect (fixed)
kdelibs4: Building with Clang 3.2 fails
Reported by: | fraser.hutchison@… | Owned by: | sharky@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | clang mountainlion haspatch | Cc: | michaelld (Michael Dickens), bjoern.baumeier@…, joeslomp@…, mymacports@…, barbara456x@…, soehn@…, mtughan@…, ryandesign (Ryan Carsten Schmidt), thomas@…, lightoml@…, whcordis@…, marianhiire@…, NicosPavlov, litherum@…, jjstickel (Jonathan Stickel), cjones051073 (Chris Jones), mail.pourri@…, mparchet@…, gallafent, mkae (Marko Käning) |
Port: | kdelibs4 |
Description
From main.log after a failed attempt to install Kdevelop:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4/kdelibs4/work/kdelibs-4.8.2/kjs/wtf/HashSet.h:184:23: error: use 'template' keyword to treat 'find' as a dependent template name :info:build return m_impl.find<T, Adapter>(value); :info:build ^ :info:build template :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4/kdelibs4/work/kdelibs-4.8.2/kjs/wtf/HashSet.h:193:23: error: use 'template' keyword to treat 'find' as a dependent template name :info:build return m_impl.find<T, Adapter>(value); :info:build ^ :info:build template :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4/kdelibs4/work/kdelibs-4.8.2/kjs/wtf/HashSet.h:201:23: error: use 'template' keyword to treat 'contains' as a dependent template name :info:build return m_impl.contains<T, Adapter>(value); :info:build ^ :info:build template :info:build 3 errors generated.
The issue can be fixed easily by modifying ..../kdelibs-4.8.2/kjs/wtf/HashSet.h at the indicated points by adding "template" e.g. changing to:
return m_impl.template find<T, Adapter>(value);
Attachments (2)
Change History (34)
comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | sharky@… michaelld@… added |
---|---|
Owner: | changed from macports-tickets@… to snc@… |
Port: | kdelibs4 added |
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | clang added |
---|---|
Summary: | Building kdelibs4 with Clang 3.2 fails → kdelibs4: Building with Clang 3.2 fails |
comment:3 Changed 12 years ago by mkae (Marko Käning)
Cc: | mk@… added |
---|
comment:4 Changed 12 years ago by nerdling (Jeremy Lavergne)
Cc: | sharky@… removed |
---|---|
Owner: | changed from snc@… to sharky@… |
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | bjoern.baumeier@… added |
---|
Has duplicate #35404.
comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | joeslomp@… added |
---|---|
Keywords: | mountainlion added |
Has duplicate #35495.
comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mymacports@… added |
---|
Has duplicate #35520.
comment:10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | barbara456x@… added |
---|
Has duplicate #35531.
comment:11 follow-up: 14 Changed 12 years ago by barbara456x@…
Sorry, but I have no idea what I am suppose to do. So this is a known problem? Is the macports lib broken? I have a Mac running 10.7.4 with MacPorts 2.1.2
comment:14 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
As with most clang-specific issues, you can work around it by using a different compiler, i.e. running
sudo port clean kdelibs4 sudo port install kdelibs4 configure.compiler=llvm-gcc-4.2
comment:16 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | lightoml@… added |
---|
Has duplicate #35643.
comment:19 follow-up: 20 Changed 12 years ago by mparchet@…
Hello,
Note : This bug also occurs on macport 2.1.2
can you fix it (quickly if possible) ?
Best regards
mparchet
comment:20 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to mparchet@…:
can you fix it (quickly if possible) ?
You can work around the problem and install the port immediately by using the above instructions.
comment:21 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | marianhiire@… added |
---|
Has duplicate #35742.
Changed 12 years ago by gallafent
Attachment: | Portfile.diff added |
---|
Portfile diff to apply dependent template patch
Changed 12 years ago by gallafent
Attachment: | patch-hashset-dependent-template.diff added |
---|
Minimal patch to fix build with clang (4.0 in my case)
comment:27 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mail.pourri@… added |
---|---|
Keywords: | haspatch added |
Has duplicate #36114.
comment:30 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | william@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks for the patch, William. Committed in r97738 (maintainer timeout).
Cc Me!