Bug 247028

Summary: devel/libffi: Update to 3.3
Product: Ports & Packages Reporter: Niclas Zeising <zeising>
Component: Individual Port(s)Assignee: Niclas Zeising <zeising>
Status: Closed FIXED    
Severity: Affects Only Me CC: arrowd, linimon, zeising
Priority: --- Flags: antoine: exp-run+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D25163
See Also: https://reviews.freebsd.org/D25303
Bug Depends on: 247283    
Bug Blocks:    

Description Niclas Zeising freebsd_committer 2020-06-06 13:14:01 UTC
Hi!
I'm requesting an exp-run of the devel/libffi update to 3.3.
libffi has a lot of low-level dependencies in the ports tree, so I'd like to have an exp-run done before updating.  This update makes a lot of changes to libffi, and is the first libffi release since 2014, so there are a lot of changes, and a shared library version bump.

Before committing, I intend to bump version of all dependencies, but that's not part of the patch.

The patch can be found here: https://reviews.freebsd.org/D25163

Thank you very much!
Regards
Niclas
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2020-06-13 00:32:23 UTC
fwiw, I ran a randomly-picked sample of over 100 libffi-dependent ports on my powerpc64 test system on 20200607 and did not see any build problems that had anything to do with libffi.  While that is not complete coverage, it does suggest  that there are no large-scale problems.
Comment 2 Antoine Brodin freebsd_committer 2020-06-13 05:49:00 UTC
I only tested a few ports but lang/ghc fails to build:

===>   ghc-8.8.3_1 depends on shared library: libffi.so.6 - not found
Comment 3 Gleb Popov freebsd_committer 2020-06-13 11:57:01 UTC
The build should be fixed by proper DEPENDS line, libffi.so.7 or something.

But there is another problem. devel/stack is a Haskell build tool that downloads and installs binary GHC distributions from its own site. These distributions are linked against old libffi.so.6 and updating the port will render them unusable.

Rebuilding all of them is a pretty tedious task.

Is there a possibility for something like devel/libffi-compat, that would install old libffi.so.6 into /usr/local/lib/compat?
Comment 4 Antoine Brodin freebsd_committer 2020-06-13 14:44:27 UTC
hs-cabal-install has the problem too:

===>   hs-cabal-install-3.0.2.0 depends on shared library: libffi.so.6 - not found
Comment 5 Niclas Zeising freebsd_committer 2020-06-13 15:27:03 UTC
I'll look into the Haskell situation.  Based on Gleb's comments it might be worth looking into keeping the old ffi, at least the library, somewhere.
Comment 6 Niclas Zeising freebsd_committer 2020-06-14 08:49:52 UTC
I updated the patch in the phab review to fix the fallout caused by hard-coded libffi.so.6 in makefiles.
I don't know if this warrants another exp-run.  I've tried to build as many ports as possible that use libffi, but I unfortunately can't cover all of them.
Comment 9 Niclas Zeising freebsd_committer 2020-06-15 16:57:00 UTC
I've updated the diff in phabricator, fixing both fallouts.
lang/polyml was easy to fix, just a simple patch
lang/ecl required an update of the entire port to fix.
Comment 10 Antoine Brodin freebsd_committer 2020-06-16 08:01:50 UTC
Exp-run looks fine.
Don't forget to bump PORTREVISIONs for shlib change.
Comment 11 Antoine Brodin freebsd_committer 2020-06-19 08:38:05 UTC
I noticed an additional failure due to ecl update:

http://package18.nyi.freebsd.org/data/121amd64-default-PR244494/2020-06-18_06h02m01s/logs/errors/maxima-5.43.2_5.log
Comment 12 Niclas Zeising freebsd_committer 2020-06-19 08:54:10 UTC
(In reply to Antoine Brodin from comment #11)

Thank you.
It is fixed as part of updating maxima: https://reviews.freebsd.org/D25303
Comment 13 commit-hook freebsd_committer 2020-07-04 18:09:57 UTC
A commit references this bug:

Author: zeising
Date: Sat Jul  4 18:09:40 UTC 2020
New revision: 541231
URL: https://svnweb.freebsd.org/changeset/ports/541231

Log:
  devel/libffi: Update to 3.3.0

  Update devel/libffi to 3.3.0
  This adds support for RISC-V
  Changelog:
  https://github.com/libffi/libffi/releases/tag/v3.3

  PR:		247028 (exp-run)
  Reviewed by:	kp, linimon, arrowd
  exp-run by:	antoine
  Differential Revision:	https://reviews.freebsd.org/D25163

Changes:
  head/devel/libffi/Makefile
  head/devel/libffi/distinfo
  head/devel/libffi/files/patch-Makefile.in
  head/devel/libffi/files/patch-b5ade2
  head/devel/libffi/files/patch-configure
  head/devel/libffi/files/patch-configure.host
  head/devel/libffi/files/patch-src__arm__ffi.c
  head/devel/libffi/files/patch-src_arm_sysv.S
  head/devel/libffi/pkg-descr
  head/devel/libffi/pkg-plist
Comment 14 commit-hook freebsd_committer 2020-07-04 18:12:58 UTC
A commit references this bug:

Author: zeising
Date: Sat Jul  4 18:12:04 UTC 2020
New revision: 541232
URL: https://svnweb.freebsd.org/changeset/ports/541232

Log:
  Chanse update of devel/libffi

  Chase the devel/libffi update
  Bump portrevision of all dependent ports to chace shard library version bump
  in libffi.
  Update LIB_DEPENDS lines where needed to not require a specific version of
  libffi.so.

  PR:		247028 (for tracking)

Changes:
  head/Mk/Uses/cabal.mk
  head/Mk/bsd.ruby.mk
  head/biology/abyss/Makefile
  head/cad/yosys/Makefile
  head/converters/hs-aeson-pretty/Makefile
  head/deskutils/hs-arbtt/Makefile
  head/devel/ctypes.sh/Makefile
  head/devel/elm-format/Makefile
  head/devel/g-wrap/Makefile
  head/devel/glib20/Makefile
  head/devel/gobject-introspection/Makefile
  head/devel/hs-ShellCheck/Makefile
  head/devel/hs-alex/Makefile
  head/devel/hs-c2hs/Makefile
  head/devel/hs-cabal-install/Makefile
  head/devel/hs-cpphs/Makefile
  head/devel/hs-darcs/Makefile
  head/devel/hs-ghc-events/Makefile
  head/devel/hs-ghcprofview/Makefile
  head/devel/hs-git-annex/Makefile
  head/devel/hs-haddock/Makefile
  head/devel/hs-happy/Makefile
  head/devel/hs-hasktags/Makefile
  head/devel/hs-hlint/Makefile
  head/devel/hs-hoogle/Makefile
  head/devel/hs-hpack/Makefile
  head/devel/hs-hspec-discover/Makefile
  head/devel/hs-mueval/Makefile
  head/devel/hs-profiteur/Makefile
  head/devel/hs-shake/Makefile
  head/devel/hs-spago/Makefile
  head/devel/hs-threadscope/Makefile
  head/devel/p5-FFI-Platypus/Makefile
  head/devel/p5-Glib-Object-Introspection/Makefile
  head/devel/py-cffi/Makefile
  head/devel/py-gobject/Makefile
  head/devel/pygobject3-common/Makefile
  head/devel/rubygem-ffi/Makefile
  head/devel/rubygem-ffi110/Makefile
  head/devel/stack/Makefile
  head/games/hedgewars-server/Makefile
  head/games/hs-scroll/Makefile
  head/graphics/openfx-arena/Makefile
  head/graphics/wayland/Makefile
  head/java/bootstrap-openjdk8/Makefile
  head/java/openjdk8/Makefile
  head/java/sablevm/Makefile
  head/lang/ecl/Makefile
  head/lang/elm/Makefile
  head/lang/gforth/Makefile
  head/lang/ghc/Makefile
  head/lang/gjs/Makefile
  head/lang/gnustep-base/Makefile
  head/lang/guile2/Makefile
  head/lang/hs-brainfuck/Makefile
  head/lang/hs-unlambda/Makefile
  head/lang/librep/Makefile
  head/lang/micropython/Makefile
  head/lang/newlisp/Makefile
  head/lang/polyml/Makefile
  head/lang/purescript/Makefile
  head/lang/pypy/bsd.pypy.mk
  head/lang/python27/Makefile
  head/lang/python35/Makefile
  head/lang/python36/Makefile
  head/lang/python37/Makefile
  head/lang/python38/Makefile
  head/lang/racket/Makefile
  head/lang/racket-minimal/Makefile
  head/lang/sagittarius-scheme/Makefile
  head/lang/smalltalk/Makefile
  head/lang/spidermonkey52/Makefile
  head/lang/spidermonkey60/Makefile
  head/lang/squeak/Makefile
  head/lang/yabasic/Makefile
  head/mail/thunderbird/Makefile
  head/math/hs-Agda/Makefile
  head/math/hs-penrose/Makefile
  head/math/maxima/Makefile
  head/math/sage/Makefile
  head/misc/adios2/Makefile
  head/net-im/matterhorn/Makefile
  head/print/hs-hscolour/Makefile
  head/science/paraview/Makefile
  head/security/hs-cryptol/Makefile
  head/security/p11-kit/Makefile
  head/security/yubioath-desktop/Makefile
  head/sysutils/hs-cputype/Makefile
  head/textproc/cgrep/Makefile
  head/textproc/hs-lhs2tex/Makefile
  head/textproc/hs-pandoc/Makefile
  head/textproc/hs-pandoc-citeproc/Makefile
  head/textproc/hs-pandoc-crossref/Makefile
  head/textproc/hs-yaml/Makefile
  head/www/firefox/Makefile
  head/www/firefox-esr/Makefile
  head/www/hs-DAV/Makefile
  head/www/hs-hjsmin/Makefile
  head/www/hs-postgrest/Makefile
  head/www/hs-wai-app-static/Makefile
  head/www/hs-yesod-bin/Makefile
  head/x11/conlecterm/Makefile
  head/x11/hs-xmobar/Makefile
  head/x11-toolkits/gtkada3/Makefile
  head/x11-wm/hs-xmonad/Makefile
Comment 15 Niclas Zeising freebsd_committer 2020-07-04 18:14:04 UTC
libffi updated.
Keep this PR open for a bit in case there is fallout.
Comment 16 commit-hook freebsd_committer 2020-07-04 21:37:23 UTC
A commit references this bug:

Author: zeising
Date: Sat Jul  4 21:37:19 UTC 2020
New revision: 541237
URL: https://svnweb.freebsd.org/changeset/ports/541237

Log:
  lang/ghc: Don't hardcode libffi shlib version

  Don't hardcode the libffi shared library version in lang/ghc makefile.
  This fixes the build after devel/libffi was updated.
  This was missed in r541232

  PR:		247028 (for tracking)

Changes:
  head/lang/ghc/Makefile
Comment 17 commit-hook freebsd_committer 2020-07-04 21:39:25 UTC
A commit references this bug:

Author: zeising
Date: Sat Jul  4 21:38:31 UTC 2020
New revision: 541238
URL: https://svnweb.freebsd.org/changeset/ports/541238

Log:
  lang/polyml: Fix build after libffi update

  Add a patch to fix the build of lang/polyml after devel/libffi update.
  This was missed in r541232.

  PR:		247028 (for tracking)

Changes:
  head/lang/polyml/files/patch-libpolyml_polyffi.cpp
Comment 18 Gleb Popov freebsd_committer 2020-07-05 07:14:46 UTC
(In reply to commit-hook from comment #16)
The comment says

> # The version number is needed as lang/gcc installs a different version

However, lang/gcc9 doesn't seem to install libffi anymore. I guess, I'll just remove that comment.
Comment 19 commit-hook freebsd_committer 2020-07-05 08:43:34 UTC
A commit references this bug:

Author: zeising
Date: Sun Jul  5 08:42:38 UTC 2020
New revision: 541258
URL: https://svnweb.freebsd.org/changeset/ports/541258

Log:
  lang/ghc: Remove stale comment

  Remove stale comment from lang/ghc about gcc shipping a libffi.so of its
  own, this is no longer the case.  This should have been part of r541237 and
  r541232.

  PR:		247028 (for tracking)
  Reported by:	arrowd, danfe

Changes:
  head/lang/ghc/Makefile
Comment 20 commit-hook freebsd_committer 2020-07-06 19:04:24 UTC
A commit references this bug:

Author: zeising
Date: Mon Jul  6 19:03:53 UTC 2020
New revision: 541359
URL: https://svnweb.freebsd.org/changeset/ports/541359

Log:
  add new port devel/libffi321

  Add a new port, devel/libffi321, which is a stripped down version of libffi
  3.2.1.  This version only brings in the shared library from libffi 3.2.1
  (the libffi 3.3.0 update bumped the version number of the shlib) for binary
  consumers that can't easily be recompiled and updated against the new
  version of libffi.
  This version is not meant to be linked against, and you should not depend on
  it to bring libffi in, unless you explicitly need the binary compat.
  Libraries are installed in ${LOCALBASE}/lib/compat.

  PR:		247028 (for tracking)
  Requested by:	arrowd
  Tested by:	arrowd

Changes:
  head/devel/Makefile
  head/devel/libffi321/
  head/devel/libffi321/Makefile
  head/devel/libffi321/files/patch-Makefile.in
  head/devel/libffi321/pkg-descr
  head/devel/libffi321/pkg-plist
Comment 21 commit-hook freebsd_committer 2020-07-07 10:07:10 UTC
A commit references this bug:

Author: zeising
Date: Tue Jul  7 10:06:17 UTC 2020
New revision: 541399
URL: https://svnweb.freebsd.org/changeset/ports/541399

Log:
  devel/stack: Add runtime dep on libffi321

  Add a runtime dependency on libffi321 to devel/stack.
  stack can be used to pull in haskell modules that are precompiled against
  the old libffi shared library.

  PR:		247028 (for tracking)
  Reguested by:	arrowd

Changes:
  head/devel/stack/Makefile
Comment 22 Niclas Zeising freebsd_committer 2020-07-15 07:47:46 UTC
It's been over a week with no reports of regressions, closing this.