Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] dev-lang/nim: add 2.0.0 #32880

Closed
wants to merge 1 commit into from
Closed

Conversation

listout
Copy link
Contributor

@listout listout commented Sep 17, 2023

Closes: https://bugs.gentoo.org/913623
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
@listout listout changed the title dev-lang/nim: add 2.0.0 [wip] dev-lang/nim: add 2.0.0 Sep 17, 2023
@gentoo-bot
Copy link

Pull Request assignment

Submitter: @listout
Areas affected: ebuilds
Packages affected: dev-lang/nim

dev-lang/nim: @xgqt, @gentoo/nim

Linked bugs

Bugs linked: 913623


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Sep 17, 2023
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-09-17 13:55 UTC
Newest commit scanned: 53fa304
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/fb8f567764/output.html

@xgqt
Copy link
Member

xgqt commented Oct 1, 2023

@listout

Experimental patches do not apply anymore (USE=experimental).

Either way it fails to install for me:

Hint:  [Link]
Hint: mm: refc; threads: on; opt: speed; options: -d:release
113221 lines; 20.950s; 258.816MiB peakmem; proj: /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/nimble/src/nimble.nim; out: /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/bin/nimble [SuccessX]
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal.nim(53)            sysFatal
Error: unhandled exception: deps.nim(19, 3) `ok` git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas [AssertionDefect]
 * ERROR: dev-lang/nim-2.0.0::gentoo failed (compile phase):
 *   Failed to run command: ./koch tools
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 1372:  Called edo './koch' 'tools'
 *   environment, line  678:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "Failed to run command: $@"
 * 

@xgqt
Copy link
Member

xgqt commented Oct 1, 2023

Those are the files in dist directory:

/var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/
├── checksums/
│   ├── README.md
│   ├── checksums.nimble
│   ├── src/
│   └── tests/
└── nimble/
    ├── changelog.markdown
    ├── ci/
    ├── config.nims
    ├── dist/
    ├── license.txt
    ├── nimble.bash-completion
    ├── nimble.nimble
    ├── nimble.zsh-completion
    ├── readme.markdown
    ├── src/
    ├── tests/
    └── todo.markdown

@listout
Copy link
Contributor Author

listout commented Oct 1, 2023

Either way it fails to install for me:

Do you mean install or compile? Cause it compiles fine for me https://0x0.st/HW-t.log and the install error is most probably due to not using sudo.

Those are the files in dist directory:

Seems like mine is a bit different. https://0x0.st/HW-v.txt

@xgqt
Copy link
Member

xgqt commented Oct 1, 2023

If you are adding info please add a comment do not edit the last one.

and the install error is most probably due to not using sudo.

That is correct for src_install since dobin requires root privs.

Try turning off ALL network connectivity (net interfaces) on your machine for time of emerging nim and see if you can get same error. If you have no net, then git clone should fail.

@listout
Copy link
Contributor Author

listout commented Oct 1, 2023

Aha ... got it to reproduce

Hint:  [Link]
Hint: mm: refc; threads: on; opt: speed; options: -d:release
113221 lines; 6.653s; 258.785MiB peakmem; proj: /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/nimble/src/nimble.nim; out: /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/bin/nimble [SuccessX]
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal: unable to access 'https://github.com/nim-lang/atlas.git/': Could not resolve host: github.com
failed command: 'git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas', status: 128
fatal.nim(53)            sysFatal
Error: unhandled exception: deps.nim(19, 3) `ok` git clone -q https://github.com/nim-lang/atlas.git /var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0/dist/atlas [AssertionDefect]
 * ERROR: dev-lang/nim-2.0.0::gentoo failed (compile phase):
 *   Failed to run command: ./koch tools
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 1286:  Called edo './koch' 'tools'
 *   environment, line  592:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "Failed to run command: $@"
 *
 * If you need support, post the output of `emerge --info '=dev-lang/nim-2.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/nim-2.0.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/vbslogs/build/dev-lang/nim-2.0.0:20231001-175136.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-lang/nim-2.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/nim-2.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0'
 * S: '/var/tmp/portage/dev-lang/nim-2.0.0/work/nim-2.0.0'

@xgqt
Copy link
Member

xgqt commented Oct 1, 2023

@listout

Now you see this is not unique :)

You will have to adjust your portage settings since this somehow passed via emerge for you.

@listout
Copy link
Contributor Author

listout commented Oct 1, 2023

Just adding this here for better tracking nim-lang/Nim#22590

@listout
Copy link
Contributor Author

listout commented Oct 1, 2023

@xgqt did you see what the void devs did in void-linux/void-packages@40a8658. Perhaps we could do something similar?

@xgqt
Copy link
Member

xgqt commented Oct 1, 2023

@xgqt did you see what the void devs did in void-linux/void-packages@40a8658. Perhaps we could do something similar?

We do similar thing in few pkgs already - record git sha sums and then prevent the fetching.

You can base off of https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/clojure/clojure-1.11.1.ebuild in addition to Void's approach.

@CyberTailor
Copy link
Contributor

Experimental patches do not apply anymore

It's safe to drop it.

@CyberTailor
Copy link
Contributor

I think we can just patch out "cloneDependency" calls from koch.nim

@CyberTailor
Copy link
Contributor

I just looked and "boot()" function from "koch.nim" is just a few calls that could be inlined in the ebuild.

@CyberTailor
Copy link
Contributor

If not ebuild, a new "nim-build.eclass" could be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR.
Projects
None yet
5 participants