bug(GIFT) GNU Image Finding Tool - Bugs: bug #14823, Compile error gift-0.1.14 :...

 
 

bug #14823: Compile error gift-0.1.14 : invalid covariant return type

Submitter:  None
Submitted:  Wed 19 Oct 2005 11:12:57 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  muellerw
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 27 May 2013 05:05:38 AM UTC, comment #9: 

again, have been through a round of compile fixes since this was submitted. if the isue persists, open a new ticket.

Julia Longtin <juri_>
Group administrator
  Spam posted by anonymous
Wed 07 Dec 2005 12:04:36 PM UTC, comment #7: 

Wim,

I have just tried your solution (just changing the one occurance).

It does not work in my case. It now complains about:
overriding `virtual std::pair<bool, TID>
CAccessor::URLToID(const std::string&)

So at least for my system I need to change all occurances.

Michiel Roos <tuurlijk>
Group Member
Thu 24 Nov 2005 10:39:19 AM UTC, comment #6: 

PS

there is thus only one change necessary in
cc/CAcPerl.cc from long int to TID , because
the includefile allready has TID there.

Wim bakker <wimbakker>
Thu 24 Nov 2005 10:37:50 AM UTC, comment #5: 

I have the following :
there is a discrepancy between :
include/CAcPerl.h 
void getAllIDs(list<TID> &) const;

and

cc/CAcPerl.cc
void CAcPerl::getAllIDs(list<long int> &) const{
    assert(0);
};

changing the latter to :
void CAcPerl::getAllIDs(list<TID> &) const{
    assert(0);
};

is enough to solve the compile error

Wim bakker <wimbakker>
Tue 22 Nov 2005 09:22:07 AM UTC, comment #4: 

And now . . .

  • drumroll *


The patch!

Finally attached ;-)

It's a trial and error fix. I have no theoretical backing for this fix, other than that it keeps my gcc from complaining when compiling. A person with thorough knowledge of Gift internals should take a look at this (Wolfgang?) before including.

Can this be included in CVS?

Michiel Roos <tuurlijk>
Group Member
Tue 15 Nov 2005 02:41:05 PM UTC, comment #3: 

Confirmed

Changed all mentioned long int to TID
and gift-0.1.14 compiled cleanly , thank you

Wim bakker <wimbakker>
Tue 15 Nov 2005 11:09:45 AM UTC, comment #2: 

Wim,

I had the same error message a while ago:
http://lists.gnu.org/archive/html/help-gift/2005-08/msg00005.html

And I solved it by changing type from 'long int' to 'TID' in the functions:

CAcPerl::URLToID
CAcPerl::getAllIDs
CAcPerl::getRandomIDs
CAcPerl::IDToAccessorElement
CAcPerl::IDToURL

These fucntions reside in the files:

./libGIFTAcPerl/cc/CAcPerl.cc
./libGIFTAcPerl/include/CAcPerl.h

And now 0.1.14 compiles!

Yay!

Could you please verify this?

I don't know if this is fixed in cvs.

Michiel Roos <tuurlijk>
Group Member
Wed 19 Oct 2005 11:13:51 AM UTC, comment #1: 

I submitted the bug , e-mail : wim at unetix dot nl

Anonymous
Wed 19 Oct 2005 11:12:57 AM UTC, original submission:  

Gift does not compile
gcc-3.4.4

-------------------
In file included from ../../libGIFTAcPerl/include/CAFPerl.h:31,
                 from CAccessorFactoryContainer.cc:36:
../../libGIFTAcPerl/include/CAcPerl.h:125: error: invalid covariant return type for `virtual std::pair<bool, long int> CAcPerl::URLToID(const std::string&) const'
../../libMRML/include/CAccessor.h:90: error:   overriding `virtual std::pair<bool, TID> CAccessor::URLToID(const std::string&) const'
make[3]: * [CAccessorFactoryContainer.lo] Error 1
make[3]: Leaving directory `/install/gift-0.1.14/libMRML/cc'
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory `/install/gift-0.1.14/libMRML'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/install/gift-0.1.14'
make: * [all] Error 2

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2626:  patch-tid.diff added by tuurlijk (2KiB - text/x-patch - The fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by juri_ (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-27 juri_ StatusReady For Test Works For Me
        Open/ClosedOpen Closed
    2005-11-22 tuurlijk StatusConfirmed Ready For Test
    2005-11-22 tuurlijk Attached File- Added patch-tid.diff, #3123
    2005-11-15 tuurlijk StatusReady For Test Confirmed
        Assigned toNone muellerw
    2005-11-15 tuurlijk StatusNone Ready For Test
    2005-11-15 tuurlijk Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code