Bug 248265 - lang/crystal: update to 0.35.1
Summary: lang/crystal: update to 0.35.1
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: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-25 16:34 UTC by Mohamed Akram
Modified: 2020-10-05 11:18 UTC (History)
4 users (show)

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


Attachments
crystal0351.patch (18.57 KB, patch)
2020-07-30 13:42 UTC, Val Packett
val: maintainer-approval-
Details | Diff
crystal0351.patch v2 (19.16 KB, patch)
2020-07-30 18:11 UTC, Val Packett
val: maintainer-approval+
Details | Diff
crystal0351.patch v3 (52.13 KB, patch)
2020-07-30 20:36 UTC, Val Packett
no flags Details | Diff
crystal0351.patch v4 (52.40 KB, patch)
2020-07-31 10:07 UTC, Val Packett
val: maintainer-approval+
Details | Diff
poudriere log for 12.1 amd64 (18.81 KB, text/plain)
2020-09-30 05:43 UTC, Fernando Apesteguía
no flags Details
crystal0351.patch v5 (52.62 KB, patch)
2020-10-02 18:28 UTC, Val Packett
val: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Akram 2020-07-25 16:34:38 UTC

    
Comment 1 Val Packett 2020-07-30 13:42:38 UTC
Created attachment 216882 [details]
crystal0351.patch

here
Comment 2 Val Packett 2020-07-30 18:11:27 UTC
Created attachment 216886 [details]
crystal0351.patch v2

let's bootstrap with 0.34 already
Comment 3 Val Packett 2020-07-30 20:36:16 UTC
Created attachment 216891 [details]
crystal0351.patch v3

and let's update the ${LLVM_VERSION:C…} thing to be compatible with llvm10
Comment 4 Val Packett 2020-07-31 10:07:18 UTC
Created attachment 216905 [details]
crystal0351.patch v4

And, finally, add https://github.com/crystal-lang/crystal/pull/9401 patch to fix build issues on aarch64 (the compiler couldn't build devel/shards in non-release mode, for example)
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2020-08-14 11:38:20 UTC
Hi there,
IIUC it should build there, right?

gmake[1]: Entering directory '/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1'
ESC[33mUsing /usr/local/bin/llvm-config90 [version=9.0.1]ESC[0m
./bin/crystal docs src/docs_main.cr  --project-name=Crystal --project-version=0.35.1 --source-refname=
./bin/crystal: crystal: not found
Using compiled compiler at .build/crystal
Unhandled exception: Crystal::Compiler#program cannot be nil (NilAssertionError)
  from __crystal_realloc
  from __crystal_sigfault_handler
  from __crystal_sigfault_handler
  from __crystal_main
  from main
  from _start
gmake[1]: *** [Makefile:96: docs] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1'
*** Error code 2
Comment 6 Mohamed Akram 2020-09-27 17:18:45 UTC
Any update on this?
Comment 7 rlwestlund 2020-09-27 18:34:40 UTC
I also have need of this.
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-27 20:15:44 UTC
Sorry, but the port does not build.

Current status is:

< 12: IGNORED

12: it is supposed to build in amd64 but it doesn't.
13-current: it doesn't build. Same error as in 12amd64:

gmake[1]: Entering directory '/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1'
Using /usr/local/bin/llvm-config90 [version=9.0.1]
./bin/crystal docs src/docs_main.cr  --project-name=Crystal --project-version=0.35.1 --source-refname=
./bin/crystal: crystal: not found
Using compiled compiler at .build/crystal
Unhandled exception: Crystal::Compiler#program cannot be nil (NilAssertionError)
  from __crystal_realloc
  from __crystal_sigfault_handler
  from __crystal_sigfault_handler
  from __crystal_main
  from main
gmake[1]: *** [Makefile:96: docs] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1'
*** Error code 2

Stop.
make: stopped in /usr/ports/lang/crystal
build of lang/crystal | crystal-0.35.1 ended at Sun Sep 27 23:26:49 CEST 2020
build time: 00:17:41
!!! build failure encountered !!!
[00:21:26] Error: Build failed in phase: build

Port is supposed to build in 12 aarch64 for example, but I don't have any machines in that architecture and I can not blindly commit this patch :)

So I would expect the maintainer to chime in.
Comment 9 Val Packett 2020-09-27 23:58:58 UTC
(In reply to Fernando Apesteguía from comment #8)

This is so weird. I cannot reproduce. Even rebuilt in poudriere just fine.
Comment 10 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-28 17:21:50 UTC
The problem is with DOCS:on

Do you have that enabled?

The command that fails can be boiled down to this:

root@12_1amd64-default:/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1 # ./bin/crystal docs ./src/docs_main.cr
./bin/crystal: crystal: not found
Using compiled compiler at .build/crystal
Unhandled exception: Crystal::Compiler#program cannot be nil (NilAssertionError)
  from __crystal_realloc
  from __crystal_sigfault_handler
  from __crystal_sigfault_handler
  from __crystal_main
  from main
  from _start

Cheers.
Comment 11 Val Packett 2020-09-29 20:11:11 UTC
(In reply to Fernando Apesteguía from comment #10)

Yes, DOCS is on.

Does the produced .build/crystal fail like this on other commands?
Comment 12 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-29 20:52:22 UTC
(In reply to Greg V from comment #11)
Can you specify any other commands to test?
Comment 13 Val Packett 2020-09-29 22:14:06 UTC
(In reply to Fernando Apesteguía from comment #12)

Try bin/crystal eval 'puts 1 + 2'
in the work/crystal-0.35.1 directory.

That assertion seems to be very early in the compiler, because for me bin/crystal docs ./src/docs_main.cr starts complaining about the project name/version flags.

Also could you upload the full poudriere log?
Comment 14 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 05:43:10 UTC
(In reply to Greg V from comment #13)
root@12_1amd64-default:~ # cd /wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1/
root@12_1amd64-default:/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1 # bin/crystal eval 'puts 1 + 2'
bin/crystal: crystal: not found
Using compiled compiler at .build/crystal
3
root@12_1amd64-default:/wrkdirs/usr/ports/lang/crystal/work/crystal-0.35.1 # bin/crystal docs src/docs_main.cr  --project-name=Crystal --project-version=0.35.1 --source-refname=
bin/crystal: crystal: not found
Using compiled compiler at .build/crystal
Unhandled exception: Crystal::Compiler#program cannot be nil (NilAssertionError)
  from __crystal_realloc
  from __crystal_sigfault_handler
  from __crystal_sigfault_handler
  from __crystal_main
  from main
  from _start
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 05:43:54 UTC
Created attachment 218429 [details]
poudriere log for 12.1 amd64
Comment 16 Val Packett 2020-10-02 14:13:54 UTC
Reproduced in a fresh 12.2-PRERELEASE jail.

Uh, wow, this is very silly.. seems like this error means "git is not installed" *facepalm*

Raised issue: https://github.com/crystal-lang/crystal/issues/9789

I'll add git to BUILD_DEPENDS, I guess I'll also try llvm 10 again while here.
Comment 17 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-02 16:23:42 UTC
(In reply to Greg V from comment #16)

Wow. Good catch. That error messages clearly needs some improvement :-)

I have a question. How is that that you could build it in poudriere?
Comment 18 Val Packett 2020-10-02 18:28:53 UTC
Created attachment 218472 [details]
crystal0351.patch v5

Okay, I think everything should be good now.

Notes for the commit:

- LLVM upgraded to 10
- bootstraps now have the llvm version in the filename
- added git to BUILD_DEPENDS due to https://github.com/crystal-lang/crystal/issues/9789
Comment 19 Val Packett 2020-10-02 18:31:22 UTC
> I have a question. How is that that you could build it in poudriere?

Oh. Just investigated the log.. I was turning DOCS off for everything via poudriere options *double facepalm*
Comment 21 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-03 17:31:43 UTC
Same here.
Comment 22 Val Packett 2020-10-04 18:22:27 UTC
Actually uploaded the new bootstraps. I knew I was forgetting *something* when publishing the update.. *facepalm* sorry for the trouble.
Comment 23 Mikael Urankar freebsd_committer freebsd_triage 2020-10-05 07:45:17 UTC
(In reply to Greg V from comment #22)
Thanks, it builds fine now.
Comment 24 commit-hook freebsd_committer freebsd_triage 2020-10-05 11:18:10 UTC
A commit references this bug:

Author: fernape
Date: Mon Oct  5 11:17:08 UTC 2020
New revision: 551486
URL: https://svnweb.freebsd.org/changeset/ports/551486

Log:
  lang/crystal: update to 0.35.1

  PR:	248265
  Submitted by:	greg@unrelenting.technology (maintainer)
  Reported by:	mohd.akram@outlook.com

Changes:
  head/lang/crystal/Makefile
  head/lang/crystal/distinfo
  head/lang/crystal/pkg-plist
Comment 25 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-05 11:18:46 UTC
Committed,

Thanks!