Bug 240822 - ports-mgmt/pkg does not build on mips64
Summary: ports-mgmt/pkg does not build on mips64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks: 241031
  Show dependency treegraph
 
Reported: 2019-09-25 16:35 UTC by tech-lists
Modified: 2019-10-03 13:50 UTC (History)
3 users (show)

See Also:


Attachments
another poudriere build log compressed with zstd (13.07 KB, application/octet-stream)
2019-09-28 11:05 UTC, Matthias Andree
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2019-09-25 16:35:42 UTC
Hello,

pkg fails to build both for me locally and on official builders, see http://beefy11.nyi.freebsd.org/data/head-mips64-default/p512692_s352634/logs/pkg-1.12.0.log

The local system runs a recent 12-stable and the poudriere mips64 jail is 12.0R-p10. Ports tree is updated every 24 hrs.

Build log is at https://github.com/freebsd/pkg/issues/1785
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2019-09-26 08:03:49 UTC
Sounds like the same kind of bug as

https://sourceware.org/bugzilla/show_bug.cgi?id=12637

Which sounds like a bug in the linker side.

The interesting part is pkg_jobs.c hasn't changed between pkg 1.11 and pkg 1.12.
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2019-09-28 11:05:41 UTC
Created attachment 207909 [details]
another poudriere build log compressed with zstd
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-10-02 18:35:50 UTC
A commit references this bug:

Author: bapt
Date: Wed Oct  2 18:35:30 UTC 2019
New revision: 513597
URL: https://svnweb.freebsd.org/changeset/ports/513597

Log:
  Attempt to fix pkg on mips.

  Since recently, libarchive is linked to libzstd, which itself uses threads
  somehow, this make the build of pkg in mips unhappy.

  Given libpkg is not threadsafe anyway just drop the __thread

  PR:		240822
  Reported by:	tech-lists@zyxst.net and mandree
  Discussed with:	jhb

Changes:
  head/ports-mgmt/pkg/files/patch-libpkg_pkg__jobs.c
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2019-10-02 18:37:06 UTC
Can you confirmed this is fixed with the patch I just committed?
Comment 5 tech-lists 2019-10-03 01:17:37 UTC
(In reply to Baptiste Daroussin from comment #4)

yes thank you, packages are building now
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-10-03 06:10:57 UTC
A commit references this bug:

Author: antoine
Date: Thu Oct  3 06:10:37 UTC 2019
New revision: 513649
URL: https://svnweb.freebsd.org/changeset/ports/513649

Log:
  MFH: r513597

  Attempt to fix pkg on mips.

  Since recently, libarchive is linked to libzstd, which itself uses threads
  somehow, this make the build of pkg in mips unhappy.

  Given libpkg is not threadsafe anyway just drop the __thread

  PR:		240822
  Reported by:	tech-lists@zyxst.net and mandree
  Discussed with:	jhb

Changes:
_U  branches/2019Q4/
  branches/2019Q4/ports-mgmt/pkg/files/patch-libpkg_pkg__jobs.c
Comment 7 Matthias Andree freebsd_committer freebsd_triage 2019-10-03 09:14:43 UTC
r513597 looks good to my qemu-based poudriere cross-builder (11.2 MIPS64 hosted on 12.0 AMD64).