Summary: | lang/nim: Update to 1.4.0 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Neal Nelson <ports> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Loïc Bartoletti <lbartoletti> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | lbartoletti, pkubaj | ||||||||||||
Priority: | --- | Keywords: | buildisok | ||||||||||||
Version: | Latest | Flags: | ports:
maintainer-feedback+
|
||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
URL: | https://nim-lang.org/blog/2020/10/16/version-140-released.html | ||||||||||||||
Attachments: |
|
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/204600791 Hello, I noticed that the doc is not generated in html. I saw some upstream changes. It seems to require a `koch doc` to generate it. Can you confirm this? (In reply to Loïc Bartoletti from comment #2) You're quite right. I had hoped to have an updated patch today, but koch doc is doing something quite naughty which poudriere does not like, so I'm having to track it down. (In reply to Neal Nelson from comment #3) > but koch doc is doing something quite naughty which poudriere does not like same problem here... Piotr, can you review the patch for powerpc arch? I fixed some arch upstream and add "powerpc" arch (https://github.com/nim-lang/Nim/blob/devel/compiler/installer.ini#L12) So maybe the patch is to be deleted or rewrited? Created attachment 219006 [details]
Diffs to upgrade port, with docs.
I finally managed to get the docs building within poudriere.
(In reply to Loïc Bartoletti from comment #5) Well, this port doesn't build on powerpc due to: cd /wrkdirs/usr/ports/lang/nim/work/nim-1.4.0 && /usr/bin/env CC="cc" LINKER="cc" COMP_FLAGS=" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing " LINK_FLAGS=" -fstack-protector-strong " /bin/sh build.sh # OS: freebsd # CPU: powerpc clang -w '-fmax-errors=3' -O3 -fno-strict-aliasing -fno-ident -m64 -Ic_code -c c_code/1_1/stdlib_assertions.nim.c -o c_code/1_1/stdlib_assertions.nim.o In file included from c_code/1_1/stdlib_assertions.nim.c:8: c_code/nimbase.h:542:1: error: static_assert failed due to requirement 'sizeof(int) == sizeof(void *) && 32 == sizeof(int) * 8' "" NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, ""); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c_code/nimbase.h:271:35: note: expanded from macro 'NIM_STATIC_ASSERT' #define NIM_STATIC_ASSERT(x, msg) _Static_assert((x), msg) ^ ~ 1 error generated. *** Error code 1 Do you mean powerpc64? On powerpc64, it builds both with the version in ports and when 1.4.0 is used, apart from that pkg-plist issue on 1.4.0: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: lib/nim/fusion/btreetables.nim Error: Orphaned: lib/nim/fusion/compat.nim Error: Orphaned: lib/nim/fusion/filepermissions.nim Error: Orphaned: lib/nim/fusion/htmlparser.nim Error: Orphaned: lib/nim/fusion/htmlparser/parsexml.nim Error: Orphaned: lib/nim/fusion/htmlparser/xmltree.nim Error: Orphaned: lib/nim/fusion/pools.nim (In reply to Neal Nelson from comment #6) Nice! Please, can you remove or fix the path in file config/nim.cfg: `gcc.options.linker = "/usr/home/nealie/ports/lang/nim/work/nimcache"` Thanks (In reply to Piotr Kubaj from comment #7) > Well, this port doesn't build on powerpc due to: > cd /wrkdirs/usr/ports/lang/nim/work/nim-1.4.0 && /usr/bin/env CC="cc" LINKER="cc" COMP_FLAGS=" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing >" LINK_FLAGS=" -fstack-protector-strong " /bin/sh build.sh ># OS: freebsd ># CPU: powerpc OK, so, there is an issue in buildsh.nimf upstream. I'll take a look in qemu later. Thanks > On powerpc64, it builds both with the version in ports and when 1.4.0 is used, apart from that pkg-plist issue on 1.4.0: Fusion is not (yet) packaged by Neal, since it requires to fetch this repository: https://github.com/nim-lang/fusion Indeed, outside of poudriere, nim will clone the repository and try to add fusion. Maybe it should be included in the package, Neal? Created attachment 219053 [details]
Patch for upgrade
Sorry about the remnants in the last patch. Such are the joys of the two step patching that is required.
Created attachment 219204 [details]
lang/nim: Update to 1.4.O
Minor changes:
- remove portrevision
- fix nimcache hack for docs (nim doesn't found or use an incorrect cache directory if we don't remove the lines in the config files)
- don't build fusion for now
Is it ok for you? Can you retry it please? Thanks.
Comment on attachment 219204 [details]
lang/nim: Update to 1.4.O
I seem to be having problems setting this flag. Hopefully this works.
(In reply to Neal Nelson from comment #12) Ah, maybe it was lucky I was unable to set the maintainer approval flag, as I hadn't realised that patch was modified from my own. - The nimcache settings are needed, otherwise the docs do not build in poudriere. It took me three days to track that one down, so don't blame me if it no longer works. Have you tried building your patched version in poudriere? I tried running the latest patch through poudriere and it still fails as I think that the cache setting is not being propagated, so I stand by my last submitted patch. (In reply to Neal Nelson from comment #13) > - The nimcache settings are needed, otherwise the docs do not build in poudriere. It took me three days to track that one down, so don't blame me if it no longer works. Thank you for finding this solution, this is exactlay what it needs for the port to be built in poudriere. I just modified this one because when using nim via the poudriere package, the nimcache was in /wrkdirs/usr/ports/lang/nim and it's not usable. So nim must be forced to use a folder defined when building it, but for the release of the package, this variable must be removed for correct use. I've also added a constraint not to build fusion (otherwise you'll have problems on the plist as a piotr raise) > Have you tried building your patched version in poudriere? Yes, I tested with poudriere and in a jail. Thank you very much for your contributions. Created attachment 219300 [details]
Fixed version of the fixed patch.
The last patch still fails a poudriere testrun, but I have added in the necessary switch to stop the runnable examples being run, which fails. This all seems to work for me now.
A commit references this bug: Author: lbartoletti Date: Tue Nov 3 12:18:04 UTC 2020 New revision: 553979 URL: https://svnweb.freebsd.org/changeset/ports/553979 Log: lang/nim: Update to 1.4.0 - Update to 1.4.0 - Add a workaround to build doc in poudriere - Remove patch-compiler_docgen.nim (fixed upstream) - Add patch-koch.nim to disable Fusion build Release notes: - https://nim-lang.org/blog/2020/10/16/version-140-released.html PR: 250458 Submitted by: Neal Nelson (maintainer) Changes: head/lang/nim/Makefile head/lang/nim/distinfo head/lang/nim/files/patch-compiler_docgen.nim head/lang/nim/files/patch-config-nim.cfg head/lang/nim/files/patch-koch.nim head/lang/nim/pkg-plist Committed. Thanks a lot! |
Created attachment 218884 [details] Diffs to upgrade port. Update the lang/nim port to the latest 1.4.0.