SOLVED: Need assistance compiling package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Robinson wrote:
I'm trying to build palm-db-tools. The build used to work on FC4, but fails as you see on FC6. Is there a flag or something that would get me around this particular problem?

Thanks!

Andrew Robinson

[root@proteus palm-db-tools]# make

make -C libsupport; make -C libpalm; make -C libflatfile; make -C flatfile; make[1]: Entering directory `/data/Downloads/Pilot-DB/palm-db-tools/libsupport' g++ -ansi -pedantic -g -O2 -Wall -Werror -Wno-deprecated -I. -I.. -DHAVE_CONFIG_H -c csvfile.cpp
cc1plus: warnings being treated as errors
../libsupport/infofile.h:33: warning: ‘class DataFile::InfoFile::Parser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:38: warning: ‘class DataFile::InfoFile::ConfigParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:48: warning: ‘class DataFile::InfoFile::DatabaseParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:58: warning: ‘class DataFile::InfoFile::TypeParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:68: warning: ‘class DataFile::InfoFile::PDBPathParser’ has virtual functions but non-virtual destructor
make[1]: *** [csvfile.o] Error 1

Solution: I needed to add destructor's for the classes. I needed to convert this

class Parser
{
public:
    virtual void parse(int linenum, std::vector< std::string> array) = 0;
};

To this:

class Parser
{
public:
    virtual void parse(int linenum, std::vector< std::string> array) = 0;
    virtual ~Parser () {}
};

Now either the version of g++ was more forgiving in FC4 or there was a default setting that allowed this error to pass that has since changed. Anyway, adding destructors to all the complaining classes allowed the application to compile.

Andrew

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux