Bug 246224 - lang/ghc: bad distinfo for powerpc64 elfv2 bootstrap
Summary: lang/ghc: bad distinfo for powerpc64 elfv2 bootstrap
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 14:18 UTC by Piotr Kubaj
Modified: 2020-05-06 07:09 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (haskell)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2020-05-05 14:18:23 UTC
=>> Status   lang/ghc | ghc-8.8.3: fetch
=======================<phase: fetch          >============================
===>  License BSD3CLAUSE accepted by the user
===>   ghc-8.8.3 depends on file: /usr/local/sbin/pkg - found
=> ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz doesn't seem to exist in /portdistfiles/.
=> Attempting to fetch http://distcache.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
fetch: http://distcache.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz: size mismatch: expected 112469852, actual 113782560
=> Attempting to fetch http://distcache.us-east.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
fetch: http://distcache.us-east.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz: size mismatch: expected 112469852, actual 113782560
=> Attempting to fetch http://distcache.eu.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
fetch: http://distcache.eu.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz: size mismatch: expected 112469852, actual 113782560
=> Attempting to fetch http://distcache.us-west.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
fetch: http://distcache.us-west.FreeBSD.org/local-distfiles/arrowd/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz: size mismatch: expected 112469852, actual 113782560
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
fetch: http://distcache.FreeBSD.org/ports-distfiles/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz: Not Found
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2020-05-05 19:59:01 UTC
I didn't touch this bootstrap. Do you want me to adjust distinfo for a current bootstrap, or you have a bootstrap that matches current distinfo?
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2020-05-05 20:52:15 UTC
This is strange. It looks like it was changed in https://svnweb.freebsd.org/ports/head/lang/ghc/distinfo?r1=529204&r2=529205&, which was when you commited my patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245057 I can confirm that the bootstrap I uploaded to freefall (I didn't remove it) is the same you used and it looks like the file wasn't changed, it's still the same I uploaded:
pkubaj@freefall:/home/arrowd/public_distfiles % ls -l ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
-rw-r--r--  1 arrowd  devel  113782560 Mar 13 16:03 ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
pkubaj@freefall:/home/arrowd/public_distfiles % ls -l ~/public_html/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz
-rw-r--r--  1 pkubaj  devel  113782560 Mar 13 15:17 /home/pkubaj/public_html/ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz

I guess that would suggest a problem in my patch, although I don't really get how it happened.

I'm doing poudriere testport now with proper updated distinfo.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2020-05-05 21:01:18 UTC
I guess the patch was ok, but I probably uploaded the wrong bootstrap.
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2020-05-05 21:38:50 UTC
I tried compiling lang/ghc with the currently posted bootstrap, it fails at:
Linking utils/ghc-cabal/dist/build/tmp/ghc-cabal ...
ld: error: /wrkdirs/usr/ports/lang/ghc/work/ghc-8.6.5-boot/lib/ghc-8.6.5/template-haskell-2.14.0.0/libHStemplate-haskell-2.14.0.0.a(Syntax.o): SHT_SYMTAB_SHNDX has 65534 entries, but the symbol table associated has 48956
cc: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)

But that could be related to some 8.8.3 bug.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2020-05-06 00:58:52 UTC
I successfully built GHC 8.6.5 with the following patch:
Index: distinfo
===================================================================
--- distinfo    (revision 533932)
+++ distinfo    (working copy)
@@ -25,8 +25,8 @@
 SIZE (ghc-8.6.5-boot-armv6-freebsd.tar.xz) = 136889664
 SHA256 (ghc-8.6.5-boot-armv7-freebsd.tar.xz) = ce4bc7fd20bb420963081171e483beb7387f9704323f7c03e36bbf3bf68a00ea
 SIZE (ghc-8.6.5-boot-armv7-freebsd.tar.xz) = 135237856
-SHA256 (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 58eb128409a69b1b19f92b3c4090b6a023fd22f539b8b8013a7b6bf4b264d916
-SIZE (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 112469852
+SHA256 (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 89dfbfab84aef489ca9d0ff6fdf97152cff2412f6a8b9b1e57025b2019908318
+SIZE (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 113782560
 SHA256 (ghc-8.6.3-boot-powerpc64-freebsd-elfv1.tar.xz) = fb9bd4bad3a54722b7012c0a531cbdfe71b3b20a0b92cbd52195a526dc5ccde4
 SIZE (ghc-8.6.3-boot-powerpc64-freebsd-elfv1.tar.xz) = 112652192
 SHA256 (hscolour-1.24.4.tar.gz) = 243332b082294117f37b2c2c68079fa61af68b36223b3fc07594f245e0e5321d

That means the bootstrap is ok, can you commit it?
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-05-06 07:08:17 UTC
A commit references this bug:

Author: arrowd
Date: Wed May  6 07:08:03 UTC 2020
New revision: 534150
URL: https://svnweb.freebsd.org/changeset/ports/534150

Log:
  lang/ghc: Correct distinfo entry for ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz file

  PR:		246224
  Submitted by:	pkubaj

Changes:
  head/lang/ghc/distinfo
Comment 7 Gleb Popov freebsd_committer freebsd_triage 2020-05-06 07:09:59 UTC
Thanks.

In future, you can commit such changes yourself (that is, simple and non-x86 related).