New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #34378 (closed defect: fixed)

Opened 13 months ago

Last modified 7 months ago

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

Portfile.diff (524 bytes) - added by william@… 9 months ago.
Portfile diff to apply dependent template patch
patch-hashset-dependent-template.diff (1.3 KB) - added by william@… 9 months ago.
Minimal patch to fix build with clang (4.0 in my case)

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:3 Changed 12 months ago by mk@…

  • Cc mk@… added

Cc Me!

comment:4 Changed 10 months ago by snc@…

  • Owner changed from snc@… to sharky@…
  • Cc sharky@… removed

comment:5 Changed 10 months ago by ryandesign@…

  • Cc bjoern.baumeier@… added

Has duplicate #35404.

comment:6 Changed 10 months ago by ryandesign@…

  • Cc joeslomp@… added
  • Keywords mountainlion added

Has duplicate #35495.

comment:7 Changed 10 months ago by ryandesign@…

  • Cc mymacports@… added

Has duplicate #35520.

comment:8 Changed 10 months ago by mymacports@…

  • Cc mymacports@… removed

Cc Me!

comment:9 Changed 10 months ago by mymacports@…

  • Cc mymacports@… added

Cc Me!

comment:10 Changed 10 months ago by ryandesign@…

  • Cc barbara456x@… added

Has duplicate #35531.

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:12 Changed 10 months ago by soehn@…

  • Cc soehn@… added

Cc Me!

comment:13 Changed 10 months ago by mtughan@…

  • Cc mtughan@… added

Cc Me!

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:15 Changed 10 months ago by thomas@…

  • Cc thomas@… added

Cc Me!

comment:16 Changed 9 months ago by ryandesign@…

  • Cc lightoml@… added

Has duplicate #35643.

comment:17 Changed 9 months ago by whcordis@…

  • Cc whcordis@… added

Cc Me!

comment:18 Changed 9 months ago by mparchet@…

  • Cc mparchet@… added

Cc Me!

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.

comment:21 Changed 9 months ago by ryandesign@…

  • Cc marianhiire@… added

Has duplicate #35742.

comment:22 Changed 9 months ago by nicos@…

  • Cc nicos@… added

Cc Me!

comment:23 Changed 9 months ago by litherum@…

  • Cc litherum@… added

Cc Me!

comment:24 Changed 9 months ago by jjstickel@…

  • Cc jjstickel@… added

Cc Me!

Changed 9 months ago by william@…

Portfile diff to apply dependent template patch

Changed 9 months ago by william@…

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

comment:25 Changed 9 months ago by ryandesign@…

Has duplicate #36008.

comment:26 Changed 8 months ago by jonesc@…

  • Cc jonesc@… added

Cc Me!

comment:27 Changed 8 months ago by ryandesign@…

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

Has duplicate #36114.

comment:28 Changed 8 months ago by mparchet@…

  • Cc mparchet@… removed

Cc Me!

comment:29 Changed 8 months ago by mparchet@…

  • Cc mparchet@… added

Cc Me!

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

comment:31 Changed 7 months ago by mk@…

  • Cc mk@… removed

Cc Me!

comment:32 Changed 7 months ago by mk@…

  • Cc mk@… added

Cc Me!

Note: See TracTickets for help on using tickets.