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 2950

Summary: Build issue: kstreamripper FTBFS
Product: TDE Reporter: Francois Andriot <albator78>
Component: other (any)Assignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, michele.calgaro, slavek.banko
Priority: P5    
Version: R14.0.x [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2696    
Attachments: kstreamripper: fix undefined environment variables
kstreamripper: fix syntax errors when using python3 (partial)
kstreamripper: use tmoc instead of moc
kstreamripper: install desktop file in XDG compliant location
Fix automoc

Description Francois Andriot 2018-07-16 07:49:22 CDT
The problem occurs at least on OpenSUSE (all versions) and Fedora 28.

There are currently several issues:

1) When 'scons' is using python3 (most distro will use python2 as default), there are some python syntax errors

2) The bundled build script are looking 'moc' command instead of 'tmoc'. It may accidentally work if QT >= 4 packages development are installed.

3) There are python errors regarding undefined environment variables

4) The application desktop file is installed in non-XDG standard location

5) I get a lot of "undefined reference for vtable_xxx" when building
Comment 1 Francois Andriot 2018-07-16 07:51:27 CDT
Created attachment 2884 [details]
kstreamripper: fix undefined environment variables

This patch will define a default value for 'TQTINCLUDEPATH', avoiding the undefined variable error.

(Also, it removes an unnecessary/duplicate linker option)
Comment 2 Francois Andriot 2018-07-16 07:53:28 CDT
Created attachment 2885 [details]
kstreamripper: fix syntax errors when using python3 (partial)

Attached patch will fix many syntax and indentation errors in Python3.
Note: python3 support is still incomplete and you can't use scons with python3 yet.
Comment 3 Francois Andriot 2018-07-16 07:54:37 CDT
Created attachment 2886 [details]
kstreamripper: use tmoc instead of moc

Attached patch will replace 'moc' binary with 'tmoc'. This avoids using QT>=4 related tools to build Trinity packages.
Comment 4 Francois Andriot 2018-07-16 07:56:28 CDT
Created attachment 2887 [details]
kstreamripper: install desktop file in XDG compliant location

This patch will move '/opt/trinity/share/applnk/Utilities/kstreamripper.desktop' to '/opt/trinity/share/applications/tde/kstreamripper.desktop'.
Comment 5 Francois Andriot 2018-07-16 08:01:55 CDT
The FTBFS about 'vtable' is below:

g++ -o src/kstreamripper src/addnewstreamimpl.o src/addnewstream.o src/kstreamripperbase.o src/kstreamripper.o src/main.o src/processcontroller.o src/processlistviewitem.o -L/opt/trinity/lib -L/usr/lib -ltqt-mt -ltqt -ltdecore -ltdeio -ltdeui -ltdednssd
src/addnewstreamimpl.o: In function `AddNewStreamImpl::AddNewStreamImpl(TQWidget*, char const*)':
addnewstreamimpl.cpp:(.text+0x20): undefined reference to `vtable for AddNewStreamImpl'
addnewstreamimpl.cpp:(.text+0x27): undefined reference to `vtable for AddNewStreamImpl'
src/addnewstreamimpl.o: In function `AddNewStreamImpl::~AddNewStreamImpl()':
addnewstreamimpl.cpp:(.text+0x76): undefined reference to `vtable for AddNewStreamImpl'
addnewstreamimpl.cpp:(.text+0x7d): undefined reference to `vtable for AddNewStreamImpl'
src/addnewstreamimpl.o: In function `AddNewStreamImpl::~AddNewStreamImpl()':
addnewstreamimpl.cpp:(.text+0xaa): undefined reference to `vtable for AddNewStreamImpl'
src/addnewstreamimpl.o:addnewstreamimpl.cpp:(.text+0xb1): more undefined references to `vtable for AddNewStreamImpl' follow
src/addnewstreamimpl.o: In function `AddNewStreamImpl::okButtonClicked()':
addnewstreamimpl.cpp:(.text+0x1a4): undefined reference to `AddNewStreamImpl::finished(AddNewStreamImpl*)'
src/kstreamripper.o: In function `KStreamRipper::KStreamRipper(TQWidget*, char const*)':
kstreamripper.cpp:(.text+0x1281): undefined reference to `vtable for KStreamRipper'
kstreamripper.cpp:(.text+0x1290): undefined reference to `vtable for KStreamRipper'
src/kstreamripper.o: In function `KStreamRipper::~KStreamRipper()':
kstreamripper.cpp:(.text+0x1d70): undefined reference to `vtable for KStreamRipper'
kstreamripper.cpp:(.text+0x1d77): undefined reference to `vtable for KStreamRipper'
src/kstreamripper.o: In function `KStreamRipper::~KStreamRipper()':
kstreamripper.cpp:(.text+0x1db0): undefined reference to `vtable for KStreamRipper'
src/kstreamripper.o:kstreamripper.cpp:(.text+0x1db7): more undefined references to `vtable for KStreamRipper' follow
src/processcontroller.o: In function `ProcessController::ProcessController(ProcessListViewItem*)':
processcontroller.cpp:(.text+0x1f): undefined reference to `vtable for ProcessController'
src/processcontroller.o: In function `ProcessController::~ProcessController()':
processcontroller.cpp:(.text+0xaa): undefined reference to `vtable for ProcessController'
src/processlistviewitem.o: In function `ProcessListViewItem::ProcessListViewItem(TQListView*)':
processlistviewitem.cpp:(.text+0x26): undefined reference to `vtable for ProcessListViewItem'
processlistviewitem.cpp:(.text+0x2d): undefined reference to `vtable for ProcessListViewItem'
src/processlistviewitem.o: In function `ProcessListViewItem::ProcessListViewItem(TQListViewItem*)':
processlistviewitem.cpp:(.text+0x96): undefined reference to `vtable for ProcessListViewItem'
processlistviewitem.cpp:(.text+0x9d): undefined reference to `vtable for ProcessListViewItem'
src/processlistviewitem.o: In function `ProcessListViewItem::ProcessListViewItem(TQListView*, TQListViewItem*)':
processlistviewitem.cpp:(.text+0x10a): undefined reference to `vtable for ProcessListViewItem'
src/processlistviewitem.o:processlistviewitem.cpp:(.text+0x111): more undefined references to `vtable for ProcessListViewItem' follow

I workaround the FTBFS by running 'tmoc' on all headers in the build script, before building:

for h in "src/"*".h"; do
  moc="${h/.h/.moc}"
  tmoc "${h}" -o "${moc}"
  cpp="${h/.h/.cpp}"
  echo "#include \"${moc##*/}\"" >>"${cpp}"
done
Comment 6 Michele Calgaro 2018-07-19 22:43:52 CDT
Pushed in commit 9fa6391 (R14.1) and 19cdd9e (R14.0). Thanks.
Comment 7 Michele Calgaro 2018-07-19 22:47:33 CDT
Francois,
I don't see any vtable FTBFS when building in debian. Is this still happening on your systems? Do we need to reopen this bug?
Comment 8 Francois Andriot 2018-07-20 09:04:49 CDT
Hello, yes, the 'vtable' issue still exists.

See entire build log here:
https://build.opensuse.org/package/live_build_log/home:PunisherHD:Trinity:unstable/kstreamripper/openSUSE_Leap_42.3/x86_64

When googling a bit about such problem in QT programs, usual answer is to run 'qmake' or 'moc' again. This is how I found out that forcibly running 'tmoc' makes build work ...
Comment 9 Michele Calgaro 2018-07-20 09:16:59 CDT
ok, bug reopened.
Comment 10 Slávek Banko 2018-07-20 09:38:55 CDT
Created attachment 2888 [details]
Fix automoc

François, please, can you try attached patch?
Comment 11 Francois Andriot 2018-07-20 10:01:09 CDT
Thanks Slavek, the patch fixes the last build issue.
Comment 12 Michele Calgaro 2018-07-20 10:38:22 CDT
Patch pushed by Slavek. Bug closed again