Bug 99161 - kdebindings library linking failure (needs -lkio)
Summary: kdebindings library linking failure (needs -lkio)
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-11 23:54 UTC by Caleb Tennis
Modified: 2005-06-07 23:53 UTC (History)
3 users (show)

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 Caleb Tennis 2005-02-11 23:54:57 UTC
Version:            (using KDE KDE 3.3.92)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4 
OS:                Linux

Compilation happens with this error:

/bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -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 -march=pentium4 -O3 -pipe -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common    -o libsmokekde.la -rpath /usr/kde/3.4/lib -version-info 3:2:2 -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/kde/3.4/lib -L/usr/qt/3/lib -L/usr/lib     -R /usr/kde/3.4/lib -R /usr/kde/3.4/lib -R /usr/qt/3/lib -R /usr/lib smokedata.lo x_1.lo x_2.lo x_3.lo x_4.lo x_5.lo x_6.lo x_7.lo x_8.lo x_9.lo x_10.lo x_11.lo x_12.lo x_13.lo x_14.lo x_15.lo x_16.lo x_17.lo x_18.lo x_19.lo x_20.lo -lkdecore -lkhtml -lkjs -lfontconfig -lkmdi -lkspell -lkutils -lkdeui -lkdeprint -lkparts -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread -lGLU -lGL -lX11
.libs/x_9.o(.text+0x504c): In function `.L6556':
: undefined reference to `KNotifyWidgetBase::KNotifyWidgetBase(QWidget*, char const*, unsigned int)'
.libs/x_9.o(.text+0x5077): In function `.L6559':
: undefined reference to `KNotifyWidgetBase::staticMetaObject()'
.libs/x_9.o(.text+0x5091): In function `.L6561':
: undefined reference to `KNotifyWidgetBase::languageChange()'
.libs/x_9.o(.text+0x512f): In function `.L6542':
: undefined reference to `KNotifyWidgetBase::qt_property(int, int, QVariant*)'
.libs/x_9.o(.text+0x5157): In function `.L6540':
: undefined reference to `KNotifyWidgetBase::qt_emit(int, QUObject*)'
.libs/x_9.o(.text+0x5171): In function `.L6538':
: undefined reference to `KNotifyWidgetBase::qt_invoke(int, QUObject*)'
.libs/x_9.o(.text+0x5184): In function `.L6536':
: undefined reference to `KNotifyWidgetBase::qt_cast(char const*)'
.libs/x_9.o(.text+0x5193): In function `.L6534':
: undefined reference to `KNotifyWidgetBase::className() const'
.libs/x_9.o(.gnu.linkonce.d._ZTI19x_KNotifyWidgetBase+0x8): undefined reference to `typeinfo for KNotifyWidgetBase'
.libs/x_9.o(.gnu.linkonce.t._ZNK19x_KNotifyWidgetBase9classNameEv+0x58): In function `x_KNotifyWidgetBase::className() const':
: undefined reference to `KNotifyWidgetBase::className() const'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase14languageChangeEv+0x60): In function `x_KNotifyWidgetBase::languageChange()':
: undefined reference to `KNotifyWidgetBase::languageChange()'
.libs/x_9.o(.gnu.linkonce.t._ZNK19x_KNotifyWidgetBase10metaObjectEv+0x53): In function `x_KNotifyWidgetBase::metaObject() const':
: undefined reference to `KNotifyWidgetBase::staticMetaObject()'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase7qt_castEPKc+0x78): In function `x_KNotifyWidgetBase::qt_cast(char const*)':
: undefined reference to `KNotifyWidgetBase::qt_cast(char const*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase7qt_emitEiP8QUObject+0x8d): In function `x_KNotifyWidgetBase::qt_emit(int, QUObject*)':
: undefined reference to `KNotifyWidgetBase::qt_emit(int, QUObject*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase9qt_invokeEiP8QUObject+0x8d): In function `x_KNotifyWidgetBase::qt_invoke(int, QUObject*)':
: undefined reference to `KNotifyWidgetBase::qt_invoke(int, QUObject*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase11qt_propertyEiiP8QVariant+0xa5): In function `x_KNotifyWidgetBase::qt_property(int, int, QVariant*)':
: undefined reference to `KNotifyWidgetBase::qt_property(int, int, QVariant*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBaseD1Ev+0x5a): In function `x_KNotifyWidgetBase::~x_KNotifyWidgetBase()':
: undefined reference to `KNotifyWidgetBase::~KNotifyWidgetBase()'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBaseD0Ev+0x5a): In function `x_KNotifyWidgetBase::~x_KNotifyWidgetBase()':
: undefined reference to `KNotifyWidgetBase::~KNotifyWidgetBase()'


This seems to be fixed by linking in -lkio, by adding $(LIB_KIO) to libsmokekde_la_LIBADD in Makefile.am
Comment 1 Fabio Coatti 2005-02-13 14:34:53 UTC
Just tried as you suggested, but the error is still here:
/bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -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 -O3 -march=pentium4 -fomit-frame-pointer -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common    -o libsmokekde.la -rpath /usr/kde/3.4/lib -version-info 3:2:2 -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/kde/3.4/lib -L/usr/qt/3/lib -L/usr/lib     -R /usr/kde/3.4/lib -R /usr/kde/3.4/lib -R /usr/qt/3/lib -R /usr/lib smokedata.lo x_1.lo x_2.lo x_3.lo x_4.lo x_5.lo x_6.lo x_7.lo x_8.lo x_9.lo x_10.lo x_11.lo x_12.lo x_13.lo x_14.lo x_15.lo x_16.lo x_17.lo x_18.lo x_19.lo x_20.lo -lkdecore -lkhtml -lkjs -lfontconfig -lkmdi -lkspell -lkutils -lkdeui -lkdeprint -lkparts -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread  -lkio
.libs/x_9.o(.text+0x504c): In function `.L6556':
: undefined reference to `KNotifyWidgetBase::KNotifyWidgetBase(QWidget*, char const*, unsigned int)'
.libs/x_9.o(.text+0x5077): In function `.L6559':
: undefined reference to `KNotifyWidgetBase::staticMetaObject()'
.libs/x_9.o(.text+0x5091): In function `.L6561':
: undefined reference to `KNotifyWidgetBase::languageChange()'
.libs/x_9.o(.text+0x512f): In function `.L6542':
: undefined reference to `KNotifyWidgetBase::qt_property(int, int, QVariant*)'
.libs/x_9.o(.text+0x5157): In function `.L6540':
: undefined reference to `KNotifyWidgetBase::qt_emit(int, QUObject*)'
.libs/x_9.o(.text+0x5171): In function `.L6538':
: undefined reference to `KNotifyWidgetBase::qt_invoke(int, QUObject*)'
.libs/x_9.o(.text+0x5184): In function `.L6536':
: undefined reference to `KNotifyWidgetBase::qt_cast(char const*)'
.libs/x_9.o(.text+0x5193): In function `.L6534':
: undefined reference to `KNotifyWidgetBase::className() const'
.libs/x_9.o(.gnu.linkonce.d._ZTI19x_KNotifyWidgetBase+0x8): undefined reference to `typeinfo for KNotifyWidgetBase'
.libs/x_9.o(.gnu.linkonce.t._ZNK19x_KNotifyWidgetBase9classNameEv+0x58): In function `x_KNotifyWidgetBase::className() const':
: undefined reference to `KNotifyWidgetBase::className() const'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase14languageChangeEv+0x60): In function `x_KNotifyWidgetBase::languageChange()':
: undefined reference to `KNotifyWidgetBase::languageChange()'
.libs/x_9.o(.gnu.linkonce.t._ZNK19x_KNotifyWidgetBase10metaObjectEv+0x53): In function `x_KNotifyWidgetBase::metaObject() const':
: undefined reference to `KNotifyWidgetBase::staticMetaObject()'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase7qt_castEPKc+0x78): In function `x_KNotifyWidgetBase::qt_cast(char const*)':
: undefined reference to `KNotifyWidgetBase::qt_cast(char const*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase7qt_emitEiP8QUObject+0x8d): In function `x_KNotifyWidgetBase::qt_emit(int, QUObject*)':
: undefined reference to `KNotifyWidgetBase::qt_emit(int, QUObject*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase9qt_invokeEiP8QUObject+0x8d): In function `x_KNotifyWidgetBase::qt_invoke(int, QUObject*)':
: undefined reference to `KNotifyWidgetBase::qt_invoke(int, QUObject*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBase11qt_propertyEiiP8QVariant+0xa5): In function `x_KNotifyWidgetBase::qt_property(int, int, QVariant*)':
: undefined reference to `KNotifyWidgetBase::qt_property(int, int, QVariant*)'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBaseD1Ev+0x5a): In function `x_KNotifyWidgetBase::~x_KNotifyWidgetBase()':
: undefined reference to `KNotifyWidgetBase::~KNotifyWidgetBase()'
.libs/x_9.o(.gnu.linkonce.t._ZN19x_KNotifyWidgetBaseD0Ev+0x5a): In function `x_KNotifyWidgetBase::~x_KNotifyWidgetBase()':
: undefined reference to `KNotifyWidgetBase::~KNotifyWidgetBase()'
collect2: ld returned 1 exit status
make[3]: *** [libsmokekde.la] Error 1
make[3]: Leaving directory `/workspace/tmp/portage/smoke-3.4.0_beta2/work/smoke-3.4.0_beta2/smoke/kde'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/workspace/tmp/portage/smoke-3.4.0_beta2/work/smoke-3.4.0_beta2/smoke'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/workspace/tmp/portage/smoke-3.4.0_beta2/work/smoke-3.4.0_beta2'
make: *** [all] Error 2

or am I doing something wrong?

Comment 2 Leo Franchi 2005-02-13 18:57:23 UTC
same here, i added $(LIB_KIO) to no effect.
Comment 3 danarmak 2005-02-23 22:30:17 UTC
I don't get this error with smoke, but I do get the following link error with
korundum:
-------------
/bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -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 -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common    -o krubyinit -module -L/usr/kde/3.4/lib -L/usr/qt/3/lib -L/usr/lib    -version-info 0:0:0 -L../../smoke/kde/ -L/usr/lib krubyinit.o  -Wl,-R -Wl,/usr/lib -L/usr/lib -L. -lruby18 ../../smoke/kde/libsmokekde.la ../../qtruby/rubylib/qtruby/libqtrubyinternal.la
libtool: link: warning: `-version-info' is ignored for programs
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `typeinfo for KNotifyWidgetBase'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::KNotifyWidgetBase(QWidget*, char const*, unsigned int)'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::~KNotifyWidgetBase()'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::className() const'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::staticMetaObject()'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::qt_emit(int, QUObject*)'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::languageChange()'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::qt_cast(char const*)'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::qt_property(int, int, QVariant*)'
/usr/kde/3.4/lib/libsmokekde.so: undefined reference to `KNotifyWidgetBase::qt_invoke(int, QUObject*)'
collect2: ld returned 1 exit status
make[3]: *** [krubyinit] Error 1
-------------------
The following patch to kdelibs fixes the issue:
-------------------
--- kio/kfile/knotifywidgetbase.ui      2005-02-04 01:33:17.000000000 +0200
+++ kio/kfile/knotifywidgetbase.ui      2005-02-23 21:04:18.076264104 +0200
@@ -1,6 +1,7 @@
 <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
 <class>KNotifyWidgetBase</class>
 <widget class="QWidget">
+    <exportmacro>KIO_EXPORT</exportmacro>
     <property name="name">
         <cstring>KNotifyWidgetBase</cstring>
     </property>
@@ -457,6 +458,7 @@
     <tabstop>m_playerButton</tabstop>
 </tabstops>
 <includes>
+    <include location="global" impldecl="in declaration">kdelibs_export.h</include>
     <include location="global" impldecl="in implementation">kdialog.h</include>
     <include location="global" impldecl="in implementation">klistview.h</include>
     <include location="global" impldecl="in implementation">kurlrequester.h</include>
----------------
However I'm unsure this is the correct way to export a class defined in a .ui.
The qt docs suggest this method, but no other KDE .ui that I've seen does this.
Comment 4 Caleb Tennis 2005-02-28 21:05:31 UTC
I guess the real question is should this symbol be exported?

If so, then this patch needs to go into kdelibs.

If not, then we need to remote knotifywidgetbase.h from kdebindings/smoke/kde_header_list

Comment 5 Richard Dale 2005-02-28 21:17:31 UTC
On Monday 28 February 2005 21:05, Caleb Tennis wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=99161
>
>
>
>
> ------- Additional Comments From caleb gentoo org  2005-02-28 21:05 -------
> I guess the real question is should this symbol be exported?
>
> If so, then this patch needs to go into kdelibs.
>
> If not, then we need to remote knotifywidgetbase.h from
> kdebindings/smoke/kde_header_list
It's been removed from the java bindings, so I think the best thing to do is 
remove it from the kde_header_list as you suggest.

-- Richard

Comment 6 Richard Dale 2005-03-01 11:56:12 UTC
CVS commit by rdale: 

* Removed the knotifywidgetbase.h header, as it doesn't export its symbols

CCBUG: 99161
CCMAIL: kde-bindings@kde.org


  M +0 -1      kde_header_list   1.15.2.1


--- kdebindings/smoke/kde/kde_header_list  #1.15:1.15.2.1
@@ -225,5 +225,4 @@
 knotifyclient.h
 knotifydialog.h
-knotifywidgetbase.h
 knuminput.h
 knumvalidator.h


Comment 7 Dirk Mueller 2005-06-07 23:53:17 UTC
removed in 3.4 and trunk -> fixed