By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1133

Summary: Build issue: Missing LDFLAGS in autotools causing several FTBFS on Mageia 2
Product: TDE Reporter: Francois Andriot <albator78>
Component: tdetoysAssignee: Francois Andriot <albator78>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella, slavek.banko
Priority: P5    
Version: 3.5.13 [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Fix compilation for 'kdeaccessibility'
Fix compilation for 'kdebindings'
Fix compilation for 'kdeedu'
Fix compilation for 'kdegames'
Fix compilation for 'kdemultimedia'
Fix compilation for 'kdetoys'
Fix compilation for 'kdeutils'
Fix compilation for 'kdetoys'
Fix compilation for 'kdewebdev'
Fix compilation for 'kdemultimedia' (2)
Fix compilation for 'kaffeine'
Fix compilation for 'kdeaccessibility' (2)
Fix compilation for 'kdegames' (2)
Fix compilation for 'kdebindings' (2)
Fix compilation for 'kdeedu' (2)
Fix compilation for 'kdemultimedia' (3)
Fix compilation for 'kdetoys' (2)
Fix compilation for 'kdemultimedia' (4)
Fix compilation for 'digikam'
Fix compilation for 'gwenview'
Fix compilation for 'gwenview' (2)
Fix compilation for 'k3b'
Fix compilation for 'k9copy'
Fix compilation for 'k9copy'
Fix compilation for 'kbfx'
Fix compilation for 'k3b' (2)
Fix compilation for 'kdbusnotification'
Fix compilation for 'kerry'
Fix compilation for 'kmplayer'
Fix compilation for 'kmyfirewall'
Fix compilation for 'koffice'
Koffice: fix lcms library detection due to incomplete linker command line (needed for chalk building)
Fix compilation for 'kpilot'
Fix compilation for 'kstreamripper'
Fix compilation for 'ktechlab'
Fix compilation for 'ktorrent'
Fix compilation for 'kuickshow'
Fix compilation for 'kvirc'
Fix compilation for 'kerry' (2)
Fix compilation for 'kdebase'

Description Francois Andriot 2012-08-01 03:52:07 CDT
Hello, while building packages for Mageia 2, I found that packages using libtool did not build due to missing linking flags (-lXXXX) in several Makefile.am .

I will post the patches in this bug, please do not close until I've found them all.
Comment 1 Francois Andriot 2012-08-01 03:53:14 CDT
Created attachment 718 [details]
Fix compilation for 'kdeaccessibility'
Comment 2 Francois Andriot 2012-08-01 06:01:43 CDT
Created attachment 719 [details]
Fix compilation for 'kdebindings'
Comment 3 Francois Andriot 2012-08-01 10:55:40 CDT
Created attachment 720 [details]
Fix compilation for 'kdeedu'
Comment 4 Francois Andriot 2012-08-01 11:47:26 CDT
Created attachment 721 [details]
Fix compilation for 'kdegames'
Comment 5 Francois Andriot 2012-08-01 15:47:25 CDT
Created attachment 723 [details]
Fix compilation for 'kdemultimedia'
Comment 6 Francois Andriot 2012-08-01 15:47:46 CDT
Created attachment 724 [details]
Fix compilation for 'kdetoys'
Comment 7 Francois Andriot 2012-08-01 16:21:54 CDT
Created attachment 725 [details]
Fix compilation for 'kdeutils'
Comment 8 Francois Andriot 2012-08-01 16:22:18 CDT
Comment on attachment 724 [details]
Fix compilation for 'kdetoys'

SOrry wrong file !!!
Comment 9 Francois Andriot 2012-08-01 16:22:39 CDT
Created attachment 726 [details]
Fix compilation for 'kdetoys'
Comment 10 Francois Andriot 2012-08-01 16:23:29 CDT
OK it looks like I've found all TDE base packages missing LDFLAGS for Mageia 2. I set the bug as patchavail.
Comment 11 Francois Andriot 2012-08-02 04:17:49 CDT
Created attachment 727 [details]
Fix compilation for 'kdewebdev'
Comment 12 Francois Andriot 2012-08-02 13:37:35 CDT
Created attachment 730 [details]
Fix compilation for 'kdemultimedia' (2)
Comment 13 Francois Andriot 2012-08-03 05:29:23 CDT
Created attachment 739 [details]
Fix compilation for 'kaffeine'
Comment 14 Slávek Banko 2012-08-03 05:37:37 CDT
François, thank you for your good work. Please, can be used $(LIB_QT), $(LIB_KDEUI), $(LIB_KDECORE) (and others) also in all previous patches? In some of them is used -lqt_mt, -lkdecore,... I'd rather see all with variables. Is it possible?
Comment 15 Francois Andriot 2012-08-03 07:21:35 CDT
Created attachment 740 [details]
Fix compilation for 'kdeaccessibility' (2)

There is no $(LIB_DCOP) variable in kdeaccessibility, so we have to use -lDCOP directly (it is already hardcoded in several places anyway).
Comment 16 Francois Andriot 2012-08-03 07:45:58 CDT
Created attachment 741 [details]
Fix compilation for 'kdegames' (2)

These flags are not defined in any variable so they are hardcoded for now: -lkdefx -lartsmodules
Comment 17 Francois Andriot 2012-08-03 07:47:08 CDT
Created attachment 742 [details]
Fix compilation for 'kdebindings' (2)

The following flags are not defined in any variable and are hardcoded for now: -lDCOP -lkdefx
Comment 18 Francois Andriot 2012-08-03 07:48:50 CDT
Created attachment 743 [details]
Fix compilation for 'kdeedu' (2)

The following flag is not defined in any variable and is hardcoded for now: -lDCOP
Comment 19 Francois Andriot 2012-08-03 08:03:48 CDT
Created attachment 744 [details]
Fix compilation for 'kdemultimedia' (3)

The following flags are not defined in any variables and are hardcoded for now:
-lartsflow_idl
-lkdefx
-lglib-2.0
-lgthread-2.0
-lDCOP
-lktexteditor
-lartsflow_idl
etc ... There are many many already hardcoded flags in kdemultimedia !
Comment 20 Francois Andriot 2012-08-03 08:06:36 CDT
Created attachment 745 [details]
Fix compilation for 'kdetoys' (2)

The following flag must be hardcoded: -lDCOP
Comment 21 Francois Andriot 2012-08-03 08:07:37 CDT
OK I think I've updated all patches for TDE base components.
Alas there are still flags that are always hardcoded (-lDCOP, -lkdefx ...)
Comment 22 Slávek Banko 2012-08-03 08:38:20 CDT
(Odpověď na komentář #21)
> OK I think I've updated all patches for TDE base components.
> Alas there are still flags that are always hardcoded (-lDCOP, -lkdefx ...)

Thank you, good work. That I know some are hardcoded.
For now, remain as they are.

For juk are added -lakode.
It is not necessary to use $(akode_libs)?
Comment 23 Francois Andriot 2012-08-03 09:19:35 CDT
Created attachment 746 [details]
Fix compilation for 'kdemultimedia' (4)

Yes, -lakode can be replaced with $(akode_libs) , confirmed working.
Comment 24 Francois Andriot 2012-08-03 12:47:08 CDT
Created attachment 748 [details]
Fix compilation for 'digikam'
Comment 25 Francois Andriot 2012-08-04 06:05:23 CDT
Created attachment 750 [details]
Fix compilation for 'gwenview'
Comment 26 Francois Andriot 2012-08-04 06:08:43 CDT
Comment on attachment 750 [details]
Fix compilation for 'gwenview'

grrr already obsolete
Comment 27 Francois Andriot 2012-08-04 06:10:45 CDT
Created attachment 751 [details]
Fix compilation for 'gwenview' (2)
Comment 28 Francois Andriot 2012-08-04 08:27:03 CDT
Created attachment 752 [details]
Fix compilation for 'k3b'
Comment 29 Francois Andriot 2012-08-04 10:48:24 CDT
Created attachment 753 [details]
Fix compilation for 'k9copy'
Comment 30 Francois Andriot 2012-08-04 10:49:26 CDT
Created attachment 754 [details]
Fix compilation for 'k9copy'
Comment 31 Francois Andriot 2012-08-04 12:11:45 CDT
Created attachment 755 [details]
Fix compilation for 'kbfx'
Comment 32 Francois Andriot 2012-08-04 14:59:42 CDT
Created attachment 756 [details]
Fix compilation for 'k3b' (2)
Comment 33 Francois Andriot 2012-08-04 16:36:18 CDT
Created attachment 757 [details]
Fix compilation for 'kdbusnotification'
Comment 34 Francois Andriot 2012-08-05 09:30:37 CDT
Created attachment 760 [details]
Fix compilation for 'kerry'
Comment 35 Francois Andriot 2012-08-05 10:30:08 CDT
Created attachment 761 [details]
Fix compilation for 'kmplayer'
Comment 36 Francois Andriot 2012-08-05 10:31:55 CDT
Created attachment 762 [details]
Fix compilation for 'kmyfirewall'
Comment 37 Francois Andriot 2012-08-05 15:09:29 CDT
Created attachment 764 [details]
Fix compilation for 'koffice'
Comment 38 Francois Andriot 2012-08-05 15:34:48 CDT
Created attachment 765 [details]
Koffice: fix lcms library detection due to incomplete linker command line (needed for chalk building)
Comment 39 Francois Andriot 2012-08-05 16:53:41 CDT
Created attachment 767 [details]
Fix compilation for 'kpilot'
Comment 40 Francois Andriot 2012-08-06 03:48:48 CDT
Created attachment 768 [details]
Fix compilation for 'kstreamripper'
Comment 41 Francois Andriot 2012-08-06 04:07:31 CDT
Created attachment 770 [details]
Fix compilation for 'ktechlab'
Comment 42 Francois Andriot 2012-08-06 04:17:15 CDT
Created attachment 771 [details]
Fix compilation for 'ktorrent'
Comment 43 Francois Andriot 2012-08-06 04:38:06 CDT
Created attachment 772 [details]
Fix compilation for 'kuickshow'
Comment 44 Francois Andriot 2012-08-06 06:38:28 CDT
Created attachment 773 [details]
Fix compilation for 'kvirc'

There are no automake variables like LIB_KIO, etc ... in kvirc.
So we have to hardcode the linker flags for now.
Comment 45 Francois Andriot 2012-08-06 09:29:56 CDT
Created attachment 774 [details]
Fix compilation for 'kerry' (2)
Comment 46 Slávek Banko 2012-08-06 11:41:38 CDT
(Odpověď na komentář #16)
> Vytvořena příloha 741
> Fix compilation for 'kdegames' (2)
> 
> These flags are not defined in any variable so they are hardcoded for now:
> -lkdefx -lartsmodules

I tried to include a patch for kdegames, but -lartsmodules causes FTBFS on both my test machines - Squeeze and Precise:

/usr/bin/ld: cannot find -lartsmodules

Is -lartsmodules necessary on your distributions?
Comment 47 Francois Andriot 2012-08-06 11:54:04 CDT
Yes kvirc FTBFS if I do not use the flag -lartsmodule.

/opt/trinity/lib/libartmodules.so comes with tdemultimedia-devel .

I think that kvirc wants to use it as soon as it is installed, probably it is autodetected in ./configure .
Comment 48 Slávek Banko 2012-08-06 12:25:31 CDT
(Odpověď na komentář #47)
> Yes kvirc FTBFS if I do not use the flag -lartsmodule.
> 
> /opt/trinity/lib/libartmodules.so comes with tdemultimedia-devel .
> 
> I think that kvirc wants to use it as soon as it is installed, probably it is
> autodetected in ./configure .

Thanks for the hint. I added kdemultimedia-trinity-dev to build-deps and has already successfully builded kdegames.
Comment 49 Slávek Banko 2012-08-06 14:27:02 CDT
(Odpověď na komentář #18)
> Vytvořena příloha 743
> Fix compilation for 'kdeedu' (2)
> 
> The following flag is not defined in any variable and is hardcoded for now:
> -lDCOP

Please, I came across another problem - with kdeedu: 

/usr/bin/ld: cannot find -lkdecore
/usr/bin/ld: cannot find -lkio
/usr/bin/ld: cannot find -lkdeui
/usr/bin/ld: cannot find -lDCOP
collect2: ld returned 1 exit status
make[6]: *** [libkvoctraincore.la] Error 1

You have paths defined outside - in QT_LDFLAGS?
Comment 50 Francois Andriot 2012-08-06 15:58:12 CDT
You can try to remove the "libkvoctraincore_la_LDFLAGS = $(QT_LDFLAGS)" line to see if it helps.
But the QT_LDFLAGS variables is supposed to contain QT only directive, not linker flags.

E.g it may contain:
-DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT -I/usr/lib/qt3//include
Comment 51 Slávek Banko 2012-08-06 16:45:27 CDT
(Odpověď na komentář #50)
> You can try to remove the "libkvoctraincore_la_LDFLAGS = $(QT_LDFLAGS)" line to
> see if it helps.
> But the QT_LDFLAGS variables is supposed to contain QT only directive, not
> linker flags.
> 
> E.g it may contain:
> -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT
> -I/usr/lib/qt3//include

Unfortunately, even after you delete a row with QT_LDFLAGS.

But I tried another - add $(all_libraries) $(KDE_RPATH) to libkvoctraincore_la_LIBADD and the success came.
The final state of the part of patch:

diff --git a/kvoctrain/kvoctrain/kvt-core/Makefile.am b/kvoctrain/kvoctrain/kvt-core/Makefile.am
index fe35690..d12eb34 100644
--- a/kvoctrain/kvoctrain/kvt-core/Makefile.am
+++ b/kvoctrain/kvoctrain/kvt-core/Makefile.am
@@ -12,6 +12,6 @@ libkvoctraincore_la_SOURCES = langset.cpp LineList.cpp kvoctrainexpr.cpp \

 SUBDIRS = kvt-xml

-libkvoctraincore_la_LIBADD= kvt-xml/libkvtxml.la
+libkvoctraincore_la_LIBADD= $(all_libraries) $(KDE_RPATH) kvt-xml/libkvtxml.la ../common-dialogs/libcommondlg.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KIO) $(LIB_KDEUI) -lDCOP

 noinst_HEADERS = grammarmanager.h

Please try for yourself.
Comment 52 Francois Andriot 2012-08-06 17:02:36 CDT
Your patch is working for me .
Comment 53 Slávek Banko 2012-08-06 20:07:39 CDT
First part - patches for base packages pushed to GIT (into master and also v3.5.13-sru):
+ kdemultimedia - GIT hash 023e7b38
+ kdeutils - GIT hash 81a4c134
+ kdetoys - GIT hash 41013366
+ kdegames - GIT hash 098b76c8
+ kdeaccessibility - GIT hash 39836a51
+ kdeedu - GIT hash 2b25aaa0
+ kdewebdev - GIT hash bc2d0c74
+ kdebindings - GIT hash 50ec787f
Comment 54 Francois Andriot 2012-08-07 14:25:26 CDT
Created attachment 776 [details]
Fix compilation for 'kdebase'
Comment 55 Slávek Banko 2012-08-11 19:06:45 CDT
François, for kbfx were in v3.5.13-sru branch picked patches, which is fundamentally changing CMake files. Therefore, patch for kbfx can not be applied.
Comment 56 Slávek Banko 2012-08-11 21:07:05 CDT
Note: The second part of kmplayer patch is already included in the commit 611a89f3 (also cherry-picked in v3.5.13-sru). Therefore, I used only the first part.
Comment 57 Slávek Banko 2012-08-12 21:18:12 CDT
François, I think that patch for kvirc is not needed because in both the R14 and v3.5.13-sru is already included commit 136d2c86 that adds the specified libraries if kvirc is compiled with KDE / TDE support (see SS_LIBLINK). Please can you confirm this?
Comment 58 Slávek Banko 2012-08-13 11:14:58 CDT
Second part - patches for applications pushed to GIT (into master and also
v3.5.13-sru):
+ digikam - 87ea6d1b
+ gwenview - 9ed52cc7
+ k3b - 730967a4
+ k9copy - b9fa9216
+ kaffeine - fd9e0b2a
+ kdbusnotification - 45f1f04b
+ kerry - 48da9e7f
+ kmplayer - 1b07da42
+ kmyfirewall - 4d139e0e
+ koffice - d388dc54, 02061797
+ kpilot - f4e58947
+ kstreamripper - 149306dd
 (only in v3.5.13-sru, in master already solved in another commit)
+ ktechlab - e61b40d3
+ ktorrent - fbbc3160
+ kuickshow - 2864ae94
Comment 59 Slávek Banko 2012-08-18 08:28:07 CDT
Last - patch for kdebase - pushed to GIT (into master and also
v3.5.13-sru) - hash 02f53174.