Bug 80143 - compile error ksim gcc-3.4.0
Summary: compile error ksim gcc-3.4.0
Status: RESOLVED FIXED
Alias: None
Product: ksim
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Robbie Ward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 18:26 UTC by Thomas Trepl
Modified: 2005-03-10 20:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Trepl 2004-04-22 18:26:46 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Compiled From Sources
Compiler:          gcc-3.4.0 
OS:          Linux

Hi,

i've tried to compile the new kde package (3.2.2, release, not cvs) on a beLFS installation. That is kernel 2.6.5, gcc-3.4.0, glibc-2.3.4-20040408, X11R6.7 (x.org). Everything went fine till i came to kdeutils. There i get the following compiler error:

make[3]: Entering directory `/tmp/lfs/kdeutils/kdeutils-3.2.2/ksim'
/bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../ksim/library -I/opt/kde-3.2.2/include -I/opt/qt/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o ksimview.lo ksimview.cpp
/opt/kde-3.2.2/include/kdesktopfile.h: In member function `void KSim::MainView::reparseConfig(bool, const KSim::ChangedPluginList&)':
/opt/kde-3.2.2/include/kdesktopfile.h:241: error: `KDesktopFile::KDesktopFile(const KDesktopFile&)' is private
ksimview.cpp:275: error: within this context
/opt/kde-3.2.2/include/kdesktopfile.h:241: error: `KDesktopFile::KDesktopFile(const KDesktopFile&)' is private
ksimview.cpp:280: error: within this context
/opt/kde-3.2.2/include/kdesktopfile.h: In member function `void KSim::MainView::addPlugins()':
/opt/kde-3.2.2/include/kdesktopfile.h:241: error: `KDesktopFile::KDesktopFile(const KDesktopFile&)' is private
ksimview.cpp:307: error: within this context
make[3]: *** [ksimview.lo] Fehler 1
make[3]: Leaving directory `/tmp/lfs/kdeutils/kdeutils-3.2.2/ksim'

I checked the CVS allready, but i may have missed something

Thanks,
Thomas
Comment 1 ingo 2004-05-11 21:50:42 UTC
The gcc 3.4.0 changelog says:
"GCC 3.4 has many improvements in the C++ frontend. Before reporting a bug, please make sure it's really GCC, and not your code, that is broken."

and further on:
"G++ is now much closer to full conformance to the ISO/ANSI C++ standard. This means, among other things, that a lot of invalid constructs which used to be accepted in previous versions will now be rejected. It is very likely that existing C++ code will need to be fixed. This document lists some of the most common issues."

It seems that this error relates to
"When binding an rvalue of class type to a reference, the copy constructor of the class must be accessible. For instance, consider the following code [...]
This might be surprising at first sight, especially since most popular compilers do not correctly implement this rule"
cf. http://gcc.gnu.org/gcc-3.4/changes.html

The copy constructors used in this case are explicitly private,
see kdesktopfile.h lines 238 to 242

Comment 2 ingo 2004-05-11 22:05:25 UTC
quick-fix:
1.) change line 238 in kdesktopfile.h from private: to public:
2.) move line 370 Theme(const KSim::Theme &) in  ksim/library/themeloader.h
up three lines, such that it occurs before the private:
Comment 3 Aaron J. Seigo 2005-03-10 20:25:03 UTC
*** Bug has been marked as fixed ***.