Bug 1214906

Summary: Please test if valknut-mod patchset can be fixed to build and if it is useful
Product: [openSUSE] openSUSE Tumbleweed Reporter: Ilya Chernykh <anixx>
Component: OtherAssignee: Yasuhiko Kamata <belphegor>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ilya Chernykh 2023-09-03 01:18:55 UTC
This is https://build.opensuse.org/package/show/home:Ansus:valknut/valknut the valknut DC++ client with applied patchset "valknut-mod" by Mandriva community (https://unixforum.org/viewtopic.php?t=95491).

Please examine if the buld can be fixed (it fails at link stage) and if it is useful to replace the current valknut in KDE:KDE3 repository (https://build.opensuse.org/package/show/KDE:KDE3/valknut). I think, it should support .magnet links, for instance.
Comment 1 Yasuhiko Kamata 2023-09-04 05:03:52 UTC
Found five problems:
(1) it does not support PIE (Position Independent Executable),
    so that "-no-pie" is required.
(2) dcwaitmagnet.cpp is not mentioned in Makefile.in
    (it causes "undefined reference to 'g_pWaitMagnet'")
(3) "DCHubSearch * hubsearch" is a local variable (defined in dcgui.cpp),
    but referred from dcwaitmagnet.cpp as "g_pHubSearch" (global variable).
(4) dcwaitmagnet.cpp depends on "DCHubSearch::startSearchClick()"
    but not defined anywhere.
(5) gcc claims that "undefined reference to `vtable for DCWaitMagnet'";
    perhaps implementaions of the method specified as "virtual" in the
    parent class, etc. is insufficient (i.e. need some more implementations).
    (missing dcwaitmagnet.ui file?)

In the above problems, (1), (2), and (3) can be fixed easily (only a matter
of definition), (4) is also able to fixed (there are candidates, but not sure).
But (5) cannot be fixed...

Currently (1), (2), and (3) were fixed with the patch "valknut-define.patch"
and "valknut.spec" as shown in
https://build.opensuse.org/package/show/home:belphegor_belbel:KDE3/valknut.

In addition, as far as I've searched, there was no valknut/dclib hub that can be connected..
Comment 2 Ilya Chernykh 2023-09-04 08:02:35 UTC
Thanks. DC++ is a very widespread protocol, or did you mean something else?
There are many clients for this, but they are not Qt3-based.

The patchset is seemingly for an older version of Valknut than the one in KDE:KDE3 repo.
Comment 3 Ilya Chernykh 2023-09-04 08:05:46 UTC
Since it is a link-time error, I thought it only needs some linker flags added.
Comment 4 Yasuhiko Kamata 2023-09-05 02:35:12 UTC
Thanks for advice.
Now can be built with refining patch.

(4) was fixed with startSearchClick() definition (which was included in magnet-mod.diff but not applied because there is an error in the diff header).
(5) was fixed with removing "Q_OBJECT" (not needed).

(so changed status to FIXED)
Comment 5 Ilya Chernykh 2023-09-05 20:37:53 UTC
Great, but did you test the program? Does the patch add ability to open .magnet links? Does not it break anything?
Comment 6 Yasuhiko Kamata 2023-09-07 05:59:19 UTC
Sorry, P2P file sharing is generally known as a place where illegal (copyright violation, drugs, etc.) contents are exchanged in Japan (my residence), so search engine (such as Google) do not show such sites...