Bug 228640 - net-im/kopete fails to build with lld as the system linker due to duplicate symbols
Summary: net-im/kopete fails to build with lld as the system linker due to duplicate s...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2018-05-31 13:53 UTC by Ed Maste
Modified: 2019-10-13 14:05 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-05-31 13:53:11 UTC
From http://package18.nyi.freebsd.org/data/headamd64PR214864cxx98-default/2018-05-29_20h14m12s/logs/errors/kopete-18.04.1.log

/usr/bin/ld: error: duplicate symbol: JDnsShutdown::qt_metacall(QMetaObject::Call, int, void**)
>>> defined at moc_qjdnsshared_p.cxx
>>>            moc_qjdnsshared_p.cxx.o:(JDnsShutdown::qt_metacall(QMetaObject::Call, int, void**)) in archive protocols/jabber/libiris/libiris_kopete.a
>>> defined at mocs_compilation.cpp
>>>            mocs_compilation.cpp.o:(.text+0xB0F0) in archive protocols/jabber/libiris/libiris_kopete.a
Comment 1 Tobias C. Berner freebsd_committer 2018-06-10 08:46:47 UTC
My best guess is that this is a fallout from /usr/bin/ld now being lld 6.0 on current?
Comment 2 Ed Maste freebsd_committer 2018-06-10 12:56:01 UTC
(In reply to Tobias C. Berner from comment #1)
It was found during the exp-run prior to becoming the default (but it seems I missed recording that in this PR).

We may be able to work around it by setting LLD_UNSAFE=yes to use GNU ld but ought to identify the underlying cause.
Comment 3 commit-hook freebsd_committer 2018-06-10 15:40:55 UTC
A commit references this bug:

Author: tcberner
Date: Sun Jun 10 15:40:25 UTC 2018
New revision: 472144
URL: https://svnweb.freebsd.org/changeset/ports/472144

Log:
  net-im/kopete: add work-around to fix build on current

  PR:		228640
  Submitted by:	emaste

Changes:
  head/net-im/kopete/Makefile
Comment 4 Tobias C. Berner freebsd_committer 2018-10-20 18:46:17 UTC
Should be fine.
Comment 5 Raphael Kubo da Costa freebsd_committer 2019-10-13 12:39:50 UTC
Kopete's build system is still "broken" in the sense that some files rely on automated moc processing by including "foo.moc" in the source code, and some do not, so the build system also relies on QT_WRAP_CPP() to process some additional files, so we end up with the moc-generated code in both moc_foo.cxx and mocs_compilation.cpp (which contains moc-generate code not included directly by any source files).

However, I've just tried building without LLD_UNSAFE=yes on 12.0 and HEAD and both worked fine. I guess lld has gotten smarter since this bug was filed?
Comment 6 Ed Maste freebsd_committer 2019-10-13 12:56:37 UTC
(In reply to Raphael Kubo da Costa from comment #5)
> I guess lld has gotten smarter since this bug was filed?

Or the original problem was just lld being more strict about a bug which has since been fixed upstream. In any case if it now builds with lld the LLD_UNSAFE can be removed.
Comment 7 Raphael Kubo da Costa freebsd_committer 2019-10-13 13:59:31 UTC
I've sent https://phabricator.kde.org/D24609 upstream, and will just remove LLD_UNSAFE=yes in the port for now.
Comment 8 commit-hook freebsd_committer 2019-10-13 14:05:01 UTC
A commit references this bug:

Author: rakuco
Date: Sun Oct 13 14:04:02 UTC 2019
New revision: 514392
URL: https://svnweb.freebsd.org/changeset/ports/514392

Log:
  Drop LLD_UNSAFE=yes.

  The port is building fine on 12.0 and HEAD without setting this. The port's
  build system is still wrong (i.e. the port still builds the same moc-generate
  code in duplicate files), but lld seems to handle this case well.

  A proper fix was sent upstream in https://phabricator.kde.org/D24609.

  I am not bumping PORTREVISION because this only changes build dependencies.

  PR:		228640

Changes:
  head/net-im/kopete/Makefile