Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

Portfile.diff (524 bytes) - added by gallafent 12 years ago.
Portfile diff to apply dependent template patch
patch-hashset-dependent-template.diff (1.3 KB) - added by gallafent 12 years ago.
Minimal patch to fix build with clang (4.0 in my case)

Download all attachments as: .zip

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 failskdelibs4: Building with Clang 3.2 fails

comment:3 Changed 12 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

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:8 Changed 12 years ago by mymacports@…

Cc: mymacports@… removed

Cc Me!

comment:9 Changed 12 years ago by mymacports@…

Cc: mymacports@… added

Cc Me!

comment:10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: barbara456x@… added

Has duplicate #35531.

comment:11 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:12 Changed 12 years ago by soehn@…

Cc: soehn@… added

Cc Me!

comment:13 Changed 12 years ago by mtughan@…

Cc: mtughan@… added

Cc Me!

comment:14 in reply to:  11 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:15 Changed 12 years ago by thomas@…

Cc: thomas@… added

Cc Me!

comment:16 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: lightoml@… added

Has duplicate #35643.

comment:17 Changed 12 years ago by whcordis@…

Cc: whcordis@… added

Cc Me!

comment:18 Changed 12 years ago by mparchet@…

Cc: mparchet@… added

Cc Me!

comment:19 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 in reply to:  19 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.

comment:22 Changed 12 years ago by NicosPavlov

Cc: nicos@… added

Cc Me!

comment:23 Changed 12 years ago by litherum@…

Cc: litherum@… added

Cc Me!

comment:24 Changed 12 years ago by jjstickel (Jonathan Stickel)

Cc: jjstickel@… added

Cc Me!

Changed 12 years ago by gallafent

Attachment: Portfile.diff added

Portfile diff to apply dependent template patch

Changed 12 years ago by gallafent

Minimal patch to fix build with clang (4.0 in my case)

comment:25 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #36008.

comment:26 Changed 12 years ago by cjones051073 (Chris Jones)

Cc: jonesc@… added

Cc Me!

comment:27 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mail.pourri@… added
Keywords: haspatch added

Has duplicate #36114.

comment:28 Changed 12 years ago by mparchet@…

Cc: mparchet@… removed

Cc Me!

comment:29 Changed 12 years ago by mparchet@…

Cc: mparchet@… added

Cc Me!

comment:30 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: william@… added
Resolution: fixed
Status: newclosed

Thanks for the patch, William. Committed in r97738 (maintainer timeout).

comment:31 Changed 12 years ago by mkae (Marko Käning)

Cc: mk@… removed

Cc Me!

comment:32 Changed 12 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

Note: See TracTickets for help on using tickets.