Ticket #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@…, bjoern.baumeier@…, joeslomp@…, mymacports@…, barbara456x@…, soehn@…, mtughan@…, ryandesign@…, thomas@…, lightoml@…, whcordis@…, marianhiire@…, nicos@…, litherum@…, jjstickel@…, jonesc@…, mail.pourri@…, mparchet@…, william@…, mk@… |
| 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
Change History
comment:1 Changed 13 months ago by ryandesign@…
- Cc sharky@…, michaelld@… added
- Owner changed from macports-tickets@… to snc@…
- Port set to kdelibs4
comment:2 Changed 13 months ago by ryandesign@…
- Keywords clang added
- Summary changed from Building kdelibs4 with Clang 3.2 fails to kdelibs4: Building with Clang 3.2 fails
comment:6 Changed 10 months ago by ryandesign@…
- Cc joeslomp@… added
- Keywords mountainlion added
Has duplicate #35495.
comment:11 follow-up: ↓ 14 Changed 10 months 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 in reply to: ↑ 11 Changed 10 months ago by ryandesign@…
- 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:19 follow-up: ↓ 20 Changed 9 months 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 in reply to: ↑ 19 Changed 9 months ago by ryandesign@…
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.
Changed 9 months ago by william@…
- Attachment Portfile.diff added
Portfile diff to apply dependent template patch
Changed 9 months ago by william@…
- Attachment patch-hashset-dependent-template.diff added
Minimal patch to fix build with clang (4.0 in my case)
comment:25 Changed 9 months ago by ryandesign@…
Has duplicate #36008.
comment:27 Changed 8 months ago by ryandesign@…
- Cc mail.pourri@… added
- Keywords haspatch added
Has duplicate #36114.
comment:30 Changed 8 months ago by ryandesign@…
- Cc william@… added
- Status changed from new to closed
- Resolution set to fixed
Thanks for the patch, William. Committed in r97738 (maintainer timeout).

