Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2012 03:08:49 GMT
From:      Heath Nielson <heathn@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/166271: [PATCH] deskutils/kdepimlibs4 doesn't compile with clang
Message-ID:  <201203200308.q2K38nhv084664@red.freebsd.org>
Resent-Message-ID: <201203200310.q2K3A9aB032387@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166271
>Category:       ports
>Synopsis:       [PATCH] deskutils/kdepimlibs4 doesn't compile with clang
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 20 03:10:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Heath Nielson
>Release:        FreeBSD 9.0-STABLE
>Organization:
>Environment:
FreeBSD hershey.bar.net 9.0-STABLE FreeBSD 9.0-STABLE #12: Thu Feb 23 08:16:05 MST 2012     heath@hershey.bar.net:/usr/obj/usr/src/sys/HERSHEY  amd64

>Description:
Building the kdepimlib4 project with clang results in 2 different compile time errors:

1) 
In file included from /usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.7.4/kmime/kmime_codecs.cpp:40:
/usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.7.4/kmime/kautodeletehash.h:67:26: error: use of undeclared identifier 'erase'
                         erase( QHash<Key, T *>::begin() );
                         ^
                         this->
/usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.7.4/kmime/kmime_codecs.cpp:65:5: note: in instantiation of member function 'KMime::KAutoDeleteHash<QByteArray, KMime::Codec>::~KAutoDeleteHash' requested here
    delete all;
    ^
/usr/local/include/qt4/QtCore/qhash.h:466:14: note: must qualify identifier to find this declaration in dependent base class
    iterator erase(iterator it);
             ^

2)
usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.7.4/kcal/listbase.h:118:13: error: use of undeclared identifier 'contains'
      if ( !contains( t ) ) {
            ^
            this->
/usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.7.4/kcal/incidence.cpp:535:17: note: in instantiation of member function 'KCal::ListBase<KCal::Incidence>::removeRef' requested here
  d->mRelations.removeRef( incidence );
                ^
/usr/local/include/qt4/QtCore/qlist.h:163:11: note: must qualify identifier to find this declaration in dependent base class
    QBool contains(const T &t) const;
          ^


>How-To-Repeat:
cd /usr/ports/deskutils/kdepimlibs4
make install
>Fix:
Patch is attached.

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patch-kcal-listbase.h
#	patch-kmime-kautodeletehash.h
#
echo x - patch-kcal-listbase.h
sed 's/^X//' >patch-kcal-listbase.h << '10075365810dd2627c007f58de7f43bf'
X--- kcal/listbase.h.orig	2012-03-19 20:45:25.000000000 -0600
X+++ kcal/listbase.h	2012-03-19 20:46:19.000000000 -0600
X@@ -115,7 +115,7 @@
X     */
X     bool removeRef( T *t )
X     {
X-      if ( !contains( t ) ) {
X+      if ( !QList<T*>::contains( t ) ) {
X         return false;
X       } else {
X         if ( mAutoDelete ) {
10075365810dd2627c007f58de7f43bf
echo x - patch-kmime-kautodeletehash.h
sed 's/^X//' >patch-kmime-kautodeletehash.h << '669e1396ddf18c705637fb4fd4bcbcdc'
X--- kmime/kautodeletehash.h.orig	2012-03-19 20:42:47.000000000 -0600
X+++ kmime/kautodeletehash.h	2012-03-19 20:42:51.000000000 -0600
X@@ -64,7 +64,7 @@
X    */
X   ~KAutoDeleteHash() { while ( ! QHash<Key, T *>::isEmpty() ) {
X                          T *value = *QHash<Key, T *>::begin();
X-                         erase( QHash<Key, T *>::begin() );
X+                         QHash<Key, T *>::erase( QHash<Key, T *>::begin() );
X                          delete value;
X                        }
X                      }
669e1396ddf18c705637fb4fd4bcbcdc
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203200308.q2K38nhv084664>