Bug 163699 - [PATCH] x11/kde4-runtime doesn't compile with clang
Summary: [PATCH] x11/kde4-runtime doesn't compile with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-29 19:10 UTC by heathn
Modified: 2011-12-31 03:00 UTC (History)
0 users

See Also:


Attachments
file.shar (2.33 KB, text/plain)
2011-12-29 19:10 UTC, heathn
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description heathn 2011-12-29 19:10:12 UTC
Building the kde4-runtime project with clang results in 3 different compile time errors:

1)
In file included from /usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/lib/createresourcejob.cpp:22:
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/lib/createresourcejob.h:78:49: error: 
      no function named 'createResource' with type 'Nepomuk::CreateResourceJob
      *(const QList<QUrl> &, const QString &, const QString &, const
      KComponentData &)' was found in the specified scope
    friend Nepomuk::CreateResourceJob* Nepomuk::createResource(const ...
                                                ^

2)
[ 24%] Building CXX object nepomuk/services/storage/lib/CMakeFiles/nepomukdatamanagement.dir/describeresourcesjob.o
In file included from /usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/lib/describeresourcesjob.cpp:22:
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/lib/describeresourcesjob.h:77:52: error: 
      no function named 'describeResources' with type
      'Nepomuk::DescribeResourcesJob *(const QList<QUrl> &, bool)' was found in
      the specified scope
    friend Nepomuk::DescribeResourcesJob* Nepomuk::describeResources(...
                                                   ^

3)
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/resourcemerger.cpp:499:27: warning: 
      parentheses were disambiguated as a function declarator
  ...dateTime( Soprano::LiteralValue( QDateTime::currentDateTime() ) );
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/resourcemerger.cpp:499:63: error: 
      parameter declarator cannot be qualified
  ...dateTime( Soprano::LiteralValue( QDateTime::currentDateTime() ) );
                                      ~~~~~~~~~~~^
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/resourcemerger.cpp:500:14: error: 
      no matching member function for call to 'addStatement'
    m_model->addStatement( newUri, NAO::created(), dateTime, m_graph );
    ~~~~~~~~~^~~~~~~~~~~~
/usr/local/include/Soprano/../soprano/filtermodel.h:81:26: note: candidate
      function not viable: no known conversion from 'Soprano::Node
      (Soprano::LiteralValue ((*)()))' to 'const Soprano::Node' for 3rd
      argument;
        Error::ErrorCode addStatement( const Node& subject, const Node& ...
                         ^
/usr/local/include/Soprano/../soprano/filtermodel.h:76:34: note: candidate
      function not viable: requires 1 argument, but 4 were provided
        virtual Error::ErrorCode addStatement( const Statement &statement );
                                 ^
/usr/ports/x11/kde4-runtime/work/kde-runtime-4.7.3/nepomuk/services/storage/resourcemerger.cpp:501:14: error: 
      no matching member function for call to 'addStatement'
    m_model->addStatement( newUri, NAO::lastModified(), dateTime, m_graph );
    ~~~~~~~~~^~~~~~~~~~~~
/usr/local/include/Soprano/../soprano/filtermodel.h:81:26: note: candidate
      function not viable: no known conversion from 'Soprano::Node
      (Soprano::LiteralValue ((*)()))' to 'const Soprano::Node' for 3rd
      argument;
        Error::ErrorCode addStatement( const Node& subject, const Node& ...
                         ^
/usr/local/include/Soprano/../soprano/filtermodel.h:76:34: note: candidate
      function not viable: requires 1 argument, but 4 were provided
        virtual Error::ErrorCode addStatement( const Statement &statement );

Fix: The first two errors were similar.  The third had me scratching my head for a while until I saw: 
http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.21

Patch is attached.

Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/x11/kde4-runtime
make install
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-29 19:10:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-12-31 02:53:59 UTC
rakuco      2011-12-31 02:53:48 UTC

  FreeBSD ports repository

  Added files:
    x11/kde4-runtime/files 
                           patch-nepomuk__services__storage__lib__createresourcejob.h 
                           patch-nepomuk__services__storage__lib__describeresourcejob.h 
                           patch-nepomuk__services__storage__resourcemerger.cpp 
  Log:
  Fix a few build issues with clang.
  
  Import my commit f1794e4 upstream (based on the PR's patch) as well as the
  patch to describeresourcejob.h in the PR (which does not apply upstream because
  the line it adds is already there).
  
  No need to bump PORTREVISION, this commit only fixes the build for people who
  had never been able to build the port anyway.
  
  PR:             ports/163699
  Submitted by:   Heath Nielson <heathn@gmail.com>
  Approved by:    avilla (mentor, implicit)
  
  Revision  Changes    Path
  1.1       +8 -0      ports/x11/kde4-runtime/files/patch-nepomuk__services__storage__lib__createresourcejob.h (new)
  1.1       +10 -0     ports/x11/kde4-runtime/files/patch-nepomuk__services__storage__lib__describeresourcejob.h (new)
  1.1       +10 -0     ports/x11/kde4-runtime/files/patch-nepomuk__services__storage__resourcemerger.cpp (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2011-12-31 02:54:29 UTC
State Changed
From-To: open->closed

Committed upstream, area51 and the ports tree. Thanks a lot!