Bug 242305

Summary: irc/kvirc fail to build on 12.1
Product: Ports & Packages Reporter: VVD <vvd>
Component: Individual Port(s)Assignee: freebsd-kde (Team) <kde>
Status: Closed FIXED    
Severity: Affects Some People CC: tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Build log (1 151 214 Bytes size) none

Description VVD 2019-11-29 23:09:50 UTC
12.1 amd64 and i386.

Part of build log:
ld: error: src/kvilib/libkvilib.so.5.0.0: undefined reference to pthread_create
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
*** Error code 1

But build fine with USE_GCC=yes (lang/gcc9) in irc/kvirc/Makefile.
Comment 1 Tobias C. Berner freebsd_committer 2019-12-13 17:31:13 UTC
Moin moin 

could you provide a more complete build log?

mfg Tobias
Comment 2 VVD 2019-12-13 18:47:04 UTC
Created attachment 209915 [details]
Build log (1 151 214 Bytes size)
Comment 3 Tobias C. Berner freebsd_committer 2019-12-14 21:59:59 UTC
Moin moin

I cannot reproduce this in poudriere in a 12.1-stable@amd64 jail.


mfg Tobias
Comment 4 VVD 2019-12-15 00:33:01 UTC
(In reply to Tobias C. Berner from comment #3)
Same behavior on 3 different 12.1-p1 (releng/12, not stable/12) hosts: i386 and 2 amd64.
What other information I can show?
Comment 5 Tobias C. Berner freebsd_committer 2020-01-19 08:04:23 UTC
VVD, is this still an issue for you?
Comment 6 VVD 2020-01-19 11:02:13 UTC
(In reply to Tobias C. Berner from comment #5)
> VVD, is this still an issue for you?
Yes.
Comment 7 Tobias C. Berner freebsd_committer 2020-02-11 18:48:07 UTC
As discussed on IRC recently, this can be fixed by supplying Threads::Threads to the appropriate cmake link target. 

Todo: 
1) figure out what leads to that target being used / optionify or disable it
2) fix the target upstream


mfg Tobias
Comment 8 VVD 2020-02-12 15:55:16 UTC
(In reply to Tobias C. Berner from comment #7)
What I have to change in sources to test this?
Comment 9 VVD 2020-02-23 20:10:21 UTC
Same error with KVIrc 5.0.0-73:
ld: error: src/kvilib/libkvilib.so.5.0.1: undefined reference to pthread_create
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Comment 10 Tobias C. Berner freebsd_committer 2020-02-23 20:18:42 UTC
(In reply to VVD from comment #9)
You can try to add this patch
https://people.freebsd.org/~tcberner/patches/patch-src_kvilib_CMakeLists.txt
[maybe it does no longer apply to this version though].

mfg Tobias
Comment 11 VVD 2020-02-23 22:19:13 UTC
(In reply to Tobias C. Berner from comment #10)
Build and work fine! Thanks!
Comment 12 VVD 2020-08-03 17:04:41 UTC
(In reply to Tobias C. Berner from comment #10)
I thought you committed this patch:
> https://people.freebsd.org/~tcberner/patches/patch-src_kvilib_CMakeLists.txt

Build fails without it.
Comment 13 commit-hook freebsd_committer 2020-08-05 18:07:59 UTC
A commit references this bug:

Author: tcberner
Date: Wed Aug  5 18:07:44 UTC 2020
New revision: 544236
URL: https://svnweb.freebsd.org/changeset/ports/544236

Log:
  irc/kvirc: link to thread library

  - when building outside of poudriere kvirc can fail linking
  - it is not quite clear yet why this is required

  PR:		242305
  Reported by:	VVD <vvd@unislabs.com>

Changes:
  head/irc/kvirc/files/patch-src_kvilib_CMakeLists.txt
Comment 14 VVD 2020-08-05 18:28:11 UTC
Thanks!