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 1310 - Build issue: initial cmake support for tdeutils
Summary: Build issue: initial cmake support for tdeutils
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdeutils (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All All
: P5 normal
Assignee: Timothy Pearson
URL:
Depends on:
Blocks: 1300
  Show dependency treegraph
 
Reported: 2012-11-10 16:42 CST by Alexander Golubev (Fat-Zer)
Modified: 2012-12-10 18:55 CST (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
This is a patch to add all cmake stuff required to build the tdeutils package (109.15 KB, patch)
2012-11-10 16:42 CST, Alexander Golubev (Fat-Zer)
Details | Diff
Fix various cmake issues (5.60 KB, patch)
2012-11-11 12:51 CST, Slávek Banko
Details | Diff
Fix automake build i8k ksim module (741 bytes, patch)
2012-11-11 19:02 CST, Slávek Banko
Details | Diff
fix WITH_POWERBOOK2 option for kmilo (2.32 KB, patch)
2012-11-29 12:24 CST, Alexander Golubev (Fat-Zer)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Golubev (Fat-Zer) 2012-11-10 16:42:10 CST
Created attachment 962 [details]
This is a patch to add all cmake stuff required to build the tdeutils package

I've finally done with it. Here is a patch to provide full cmake build system support for tdeutils. Although it requires some more testing...

What I've tested:
 * Separate compilation of each package whith each combination of flags.
 * Full build with all flags.
 * Full build with none flags.

[all flags except WITH_POWERBOOK{,2} for obvious reasons]

What wasn't tested:
 * the «fullness» of installation.
 * Any Usability.

I Can't test those stuff myself cause I don't use live trinity and I failed to build any of trinity stuff with autotools. So I ask somebody (Darell/Tim/Slavek ?) to test it

Btw. I'll give usability test for some packages when I'll backport the patch to 3.5.13 branch.
Comment 1 Darrell 2012-11-10 18:26:33 CST
I'll test the patch.
Comment 2 Darrell 2012-11-10 20:51:04 CST
I applied the patch and built tdeutils with both autotools and cmake.

The cmake version built with no failures. All bin executables built but there were many differences in include and lib files as well as noticeable differences in file sizes. For my initial testing I did not tinker with individual configure options. I only used -DBUILD_ALL=ON and that likely had a role in the differences I observed.

Probably still needing additional work, but the patch is a huge start. Therefore I pushed this patch to GIT in commit c1a8ee04. By pushing to GIT others can help test and fine-tune.

We'll keep this bug report open as a conduit for reporting related errors and supporting subsequent patches. I added tdeutils to our R14 road map for cmake conversions.

Thanks for the initial patch! :)
Comment 3 Alexander Golubev (Fat-Zer) 2012-11-10 21:34:52 CST
(In reply to comment #2)
> I applied the patch and built tdeutils with both autotools and cmake.
> 
> The cmake version built with no failures. All bin executables built but there
> were many differences in include and lib files as well as noticeable
> differences in file sizes. For my initial testing I did not tinker with
> individual configure options. I only used -DBUILD_ALL=ON and that likely had a
> role in the differences I observed.

It's quite difficult to track which include files are intended to be installed, cause autotools names only witch doesn't...

Can you build it with:
cmake ../tde/tdeutils -DCMAKE_INSTALL_PREFIX=/tmp/tde-install -DBUILD_ALL=ON -DWITH_{DPMS,XSCREENSAVER,ASUS,VAIO,THINKPAD,I8K,SNMP,SENSORS,XMMS,KNEWSTUFF}=ON

and than post the output of cd /tmp/tde-install && find . -ls 
and the same thing for autotools...

you'll need libXext libXtst libXScrnSaver and net-snmp.
off cause you are supposed to use your own paths/lib names.

I wanna fix it as fast as possible...
Comment 4 Slávek Banko 2012-11-11 12:51:04 CST
Created attachment 970 [details]
Fix various cmake issues

I tested the patch with v3.5.13-sru branch. I made a comparison with automake build and found some differences - patch attached.

Fat-Zer, good work. Thank you.
Comment 5 Darrell 2012-11-11 16:54:57 CST
The second patch works too. Good job. :)

I pushed to GIT in commit d71a3e00.

Observations:

In the cmake package there is /opt/trinity/share/cmake/libksimcore.cmake. I don't know how this file is generated or why the file is in the package. The file and directory does not exist in the autotool package.

Missing from the cmake package: 

/opt/trinity/share/doc/tde/HTML/en/kcalc: kcalc_on_Aix.txt
/opt/trinity/share/doc/tde/HTML/en/kcalc: kcalc_on_OSF.txt
/opt/trinity/share/doc/tde/HTML/en: tdeutils-apidoc

Those files/directories are in the autotool package.

I am unable to test -DWITH_POWERBOOK=ON and -DWITH_POWERBOOK2=ON.

The optional configure options are all set to OFF. Although not a problem, I'd like to see something similar to what we did in tdebase with using the WITH_ALL_OPTIONS parameter.
Comment 6 Slávek Banko 2012-11-11 18:23:42 CST
Copying files kcalc_on_Aix.txt and kcalc_on_OSF.txt I deliberately not add into cmake - I assume that these files should not be included in the documentation.

On Debian / Ubuntu packages contain apidoc. Indeed, this was the reason why I added in the patch targets apidox and install-apidox.
Comment 7 Darrell 2012-11-11 18:52:18 CST
The two txt files probably are not important at all. :)

I don't know why tdeutils-apidoc directory is included in the autotool package but is not being added to the cmake package.
Comment 8 Slávek Banko 2012-11-11 19:02:27 CST
Created attachment 972 [details]
Fix automake build i8k ksim module

By the way, I noticed that the current automake test for i8k in ksim is silly. With cmake is builded, with autotools was not builded. It is built only if the building is on the dell machine. See attached patch.
Comment 9 Slávek Banko 2012-11-11 19:08:43 CST
(Odpověď na komentář #7)
> The two txt files probably are not important at all. :)
> 
> I don't know why tdeutils-apidoc directory is included in the autotool package
> but is not being added to the cmake package.

In building debian packages with cmake is done and generate and install apidox. Maybe you just need:

make apidox
make install-apidox
Comment 10 Darrell 2012-11-11 23:21:03 CST
The i8k ksim automake patch works here. Go ahead and push to GIT. :)
Comment 11 Slávek Banko 2012-11-12 01:43:46 CST
Patch from attachment 972 [details] pushed to GIT in hash 7327923a.
Comment 12 Alexander Golubev (Fat-Zer) 2012-11-14 18:28:55 CST
It seems ksim is crashing when I'm trying to enter is's settings can some one attempt to reproduce it with cmake/autotools?

(In reply to comment #5)
> In the cmake package there is /opt/trinity/share/cmake/libksimcore.cmake. I
> don't know how this file is generated or why the file is in the package. The
> file and directory does not exist in the autotool package.
It's a cmake file to make it easy-found by other екштшен cmake modules. It's still not really necessary for now, but can be useful in the future...

> I am unable to test -DWITH_POWERBOOK=ON and -DWITH_POWERBOOK2=ON.
They seems to be broken. They are require one more library to be linked with. I'll provide a patch later, but I can't promise that they will compile or work on x86.
Comment 13 Darrell 2012-11-14 18:37:26 CST
> It seems ksim is crashing when I'm trying to enter is's settings
> can some one attempt to reproduce it with cmake/autotools?

I will test but I need to know the exact steps to reproduce. :)
Comment 14 Alexander Golubev (Fat-Zer) 2012-11-14 19:09:20 CST
(In reply to comment #13)
> I will test but I need to know the exact steps to reproduce. :)
1. Right click on kicker → add panel → KSim
2. Right click on ksim → Configure KSim
Comment 15 Darrell 2012-11-14 19:36:15 CST
Confirmed crash. Here is a backtrace:

[Thread debugging using libthread_db enabled]
[KCrash handler]
#5  0xb68bda7b in replaceArgEscapes (s=<value optimized out>, d=...,
    field_width=0, arg=..., larg=...) at tools/qstring.cpp:1944
#6  0xb68bdb5e in TQString::arg (this=0xbfbfe450, a=..., fieldWidth=0)
    at tools/qstring.cpp:2004
#7  0xb53495c8 in KSim::ConfigDialog::createPage (this=0x83083c8, plugin=...)
    at ksimpref.cpp:160
#8  0xb534ad0a in ConfigDialog (this=0x83083c8, config=0x835b5a0,
    parent=0x835b340, name=0xb535b108 "m_prefDialog") at ksimpref.cpp:101
#9  0xb5342606 in KSim::MainView::preferences (this=0x835b340)
    at ksimview.cpp:395
#10 0xb5341443 in KSim::PanelExtension::preferences (this=0x8349d80)
    at ksim.cpp:116
#11 0xb713cc23 in KPanelExtension::action (this=0x8349d80,
    a=KPanelExtension::Preferences)
    at /dev/shm/tdelibs/tdeui/kpanelextension.cpp:96
#12 0xb5c47cf6 in ExtensionContainer::preferences (this=0x8369f10)
    at /dev/shm/tdebase/kicker/kicker/core/container_extension.cpp:447
#13 0xb5c4a99b in ExtensionContainer::showPanelMenu (this=0x8369f10,
    globalPos=...)
    at /dev/shm/tdebase/kicker/kicker/core/container_extension.cpp:409
#14 0xb5c4f7cc in ExtensionContainer::eventFilter (this=0x8369f10,
    e=0xbfbfed0c)
    at /dev/shm/tdebase/kicker/kicker/core/container_extension.cpp:2074
#15 0xb65ca210 in TQObject::activate_filters (this=0x83d5428, e=0xbfbfed0c)
    at kernel/qobject.cpp:930
#16 0xb65ca294 in TQObject::event (this=0x83d5428, e=0xbfbfed0c)
    at kernel/qobject.cpp:762
#17 0xb6609752 in TQWidget::event (this=0x83d5428, e=0xbfbfed0c)
    at kernel/qwidget.cpp:4701
#18 0xb6566a9d in TQApplication::internalNotify (this=0x80b0988,
    receiver=0x83d5428, e=0xbfbfed0c) at kernel/qapplication.cpp:2702
#19 0xb65676b7 in TQApplication::notify (this=0x80b0988, receiver=0x83d5428,
    e=0xbfbfed0c) at kernel/qapplication.cpp:2455
#20 0xb6b3f1ed in KApplication::notify (this=0x80b0988, receiver=0x83d5428,
    event=0xbfbfed0c) at /dev/shm/tdelibs/tdecore/kapplication.cpp:583
#21 0xb6503b36 in TQApplication::sendSpontaneousEvent (receiver=0x83d5428,
    event=0xbfbfed0c) at kernel/ntqapplication.h:527
#22 0xb65007dc in TQETWidget::translateMouseEvent (this=0x83d5428,
    event=0xbfbfef8c) at kernel/qapplication_x11.cpp:4381
#23 0xb64ff602 in TQApplication::x11ProcessEvent (this=0x80b0988,
    event=0xbfbfef8c) at kernel/qapplication_x11.cpp:3645
#24 0xb6513392 in TQEventLoop::processEvents (this=0x80c81a0, flags=4)
    at kernel/qeventloop_x11.cpp:195
#25 0xb657f04b in TQEventLoop::enterLoop (this=0x80c81a0)
    at kernel/qeventloop.cpp:201
#26 0xb657eee4 in TQEventLoop::exec (this=0x80c81a0)
    at kernel/qeventloop.cpp:148
#27 0xb6566911 in TQApplication::exec (this=0x80b0988)
    at kernel/qapplication.cpp:2825
#28 0xb5c2944a in kdemain (argc=1, argv=0x80a8490)
    at /dev/shm/tdebase/kicker/kicker/core/main.cpp:151
#29 0xb7715694 in tdeinitmain (argc=1, argv=0x80a8490)
    at /dev/shm/tdebase.build/kicker/kicker/kicker_tdeinit_module.cpp:3
#30 0x0804e451 in launch (argc=<value optimized out>,
    _name=<value optimized out>, args=<value optimized out>, cwd=0x0, envc=0,
    envs=0x805f6ff "", reset_env=false, tty=0x0, avoid_loops=false,
    startup_id_str=0x80540a6 "0") at /dev/shm/tdelibs/kinit/kinit.cpp:673
#31 0x0804f181 in handle_launcher_request (sock=9)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1240
#32 0x0804f88e in handle_requests (waitForPid=<value optimized out>)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1443
#33 0x08050da0 in main (argc=5, argv=0xbfbff8d4, envp=0xbfbff8ec)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1909
Comment 16 Alexander Golubev (Fat-Zer) 2012-11-14 19:40:24 CST
(In reply to comment #15)
> Confirmed crash. Here is a backtrace:
Only with cmake build or with autotools as well?
Comment 17 Slávek Banko 2012-11-14 19:43:06 CST
I tested in 3.5.13.1 (autotools) and no problems.
Comment 18 Slávek Banko 2012-11-14 20:17:44 CST
I rebuilt on 3.5.13.1 using cmake and still without problems.
Comment 19 Alexander Golubev (Fat-Zer) 2012-11-14 20:27:19 CST
(In reply to comment #18)
> I rebuilt on 3.5.13.1 using cmake and still without problems.
ghm... I've got crash with 3.5.13.1/cmake... 
what options have you got enabled?
Comment 20 Slávek Banko 2012-11-14 20:30:34 CST
(Odpověď na komentář #19)
> (In reply to comment #18)
> > I rebuilt on 3.5.13.1 using cmake and still without problems.
> ghm... I've got crash with 3.5.13.1/cmake... 
> what options have you got enabled?

DEB_CMAKE_EXTRA_FLAGS := \
 -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
 -DCONFIG_INSTALL_DIR="/etc/trinity" \
 -DSYSCONF_INSTALL_DIR="/etc/trinity" \
 -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
 -DCMAKE_VERBOSE_MAKEFILE="ON" \
 -DCMAKE_SKIP_RPATH="OFF" \
 -DBUILD_ALL="ON" \
 -DWITH_DPMS="ON" \
 -DWITH_ASUS="ON" \
 -DWITH_VAIO="ON" \
 -DWITH_THINKPAD="ON" \
 -DWITH_I8K="ON" \
 -DWITH_SNMP="ON" \
 -DWITH_SENSORS="ON" \
 -DWITH_XMMS="ON" \
 -DWITH_KNEWSTUFF="ON"
Comment 21 Darrell 2012-11-14 20:39:42 CST
I posted my backtrace from a cmake build. Based upon your question, I rebuilt tdeutils with autotools and received the same crash and backtrace.
Comment 22 Darrell 2012-11-14 20:40:06 CST
Note: I'm using R14 GIT from Nov. 10.
Comment 23 Alexander Golubev (Fat-Zer) 2012-11-14 21:20:46 CST
(In reply to comment #21)
> I posted my backtrace from a cmake build. Based upon your question, I rebuilt
> tdeutils with autotools and received the same crash and backtrace.

ok... so far I consider that to be a ksim bug, not a cmake-related issue...


On 3.5.13.1 I've got nearly the same backtrace except two last calls:

#0  0x00007ffff39d54b7 in QString::operator+=(QString const&) () from /usr/qt/3/lib64/libqt-mt.so.3
#1  0x00007fffedb5deb3 in operator+ (c1=32 ' ', s2=...) at /usr/qt/3/include/qstring.h:1087
#2  0x00007fffedb5d19c in KSim::ConfigDialog::createPage (this=0x98c890, plugin=...)
    at /usr/src/debug/trinity-base/ksim-3.5.13.1/ksim-3.5.13.1/ksim/ksimpref.cpp:158
#3  0x00007fffedb5c54d in KSim::ConfigDialog::ConfigDialog (this=0x98c890, config=0x8ce6c0, parent=0x8ce2b0, name=0x7fffedb6a
312 "m_prefDialog")
    at /usr/src/debug/trinity-base/ksim-3.5.13.1/ksim-3.5.13.1/ksim/ksimpref.cpp:101
#4  0x00007fffedb5591d in KSim::MainView::preferences (this=0x8ce2b0)
    at /usr/src/debug/trinity-base/ksim-3.5.13.1/ksim-3.5.13.1/ksim/ksimview.cpp:395

it seems the strings are malformed for some reason...
have somebody a gdb script to look through QString content?
Comment 24 Alexander Golubev (Fat-Zer) 2012-11-14 21:25:40 CST
(In reply to comment #23)
> have somebody a gdb script to look through QString content?
never mind about that, I forgot that I can call methods:
p *str.latin1()@str.len
Comment 25 Alexander Golubev (Fat-Zer) 2012-11-15 00:55:20 CST
posted ksim patch on Bug 1322.
Comment 26 Alexander Golubev (Fat-Zer) 2012-11-29 12:24:52 CST
Created attachment 1035 [details]
fix WITH_POWERBOOK2 option for kmilo

This fixes the compilation WITH_POWERBOOK2. The compilation tested on x86; on amd64 it results in FTBFS on link stage because pbbuttonsd provides a static libs without -fPIC (at least on gentoo).

WITH_POWERBOOK FTBFS as well, but IMO it's about to be dropped cause it's completely obsolete...

you'll need app-laptop/pbbuttonsd from http://pbbuttons.berlios.de to test.
Comment 27 Slávek Banko 2012-12-02 13:05:02 CST
(Odpověď na komentář #26)
> Vytvořena příloha 1035
> fix WITH_POWERBOOK2 option for kmilo
> 
> This fixes the compilation WITH_POWERBOOK2. The compilation tested on x86; on
> amd64 it results in FTBFS on link stage because pbbuttonsd provides a static
> libs without -fPIC (at least on gentoo).
> 
> WITH_POWERBOOK FTBFS as well, but IMO it's about to be dropped cause it's
> completely obsolete...
> 
> you'll need app-laptop/pbbuttonsd from http://pbbuttons.berlios.de to test.

For Debian is package pbbuttonsd only for platform 'powerpc'.
I do not have a chance to try this patch.

What next? Incorporate and let it be?
Comment 28 Alexander Golubev (Fat-Zer) 2012-12-02 19:00:52 CST
(In reply to comment #27)
> For Debian is package pbbuttonsd only for platform 'powerpc'.
> I do not have a chance to try this patch.
so why not to just build it yourself:
./configure laptop="acpi" && make
although on gentoo it's heavily patched but I'm still not sure if it will work... but at least it compiles...
  
> 
> What next? Incorporate and let it be?

yes, why not? 
anyway it won't get worse than now ;)

btw: IMO after that the bug could be resolved.
Comment 29 Slávek Banko 2012-12-10 18:54:24 CST
Comment on attachment 1035 [details]
fix WITH_POWERBOOK2 option for kmilo

Pushed to GIT in hash ba743d36 and also into v3.5.13-sru branch.