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

net-libs/nodejs: remove gcc dependency #33141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

svmhdvn
Copy link
Contributor

@svmhdvn svmhdvn commented Sep 30, 2023

Previously, libgcc was needed for __atomic_is_lock_free, which was originally not implemented in LLVM's compiler-rt. With this LLVM upstream commit[0] being merged, gcc is now unnecessary. This commit reverts 7dc748f for all nodejs ebuilds.

[0] llvm/llvm-project@00530de

Bug: https://bugs.gentoo.org/869992
Closes: https://bugs.gentoo.org/911340

Previously, libgcc was needed for `__atomic_is_lock_free`, which was
originally not implemented in LLVM's compiler-rt. With this LLVM
upstream commit[0] being merged, gcc is now unnecessary. This commit
reverts 7dc748f for all nodejs ebuilds.

[0] llvm/llvm-project@00530de

Bug: https://bugs.gentoo.org/869992
Closes: https://bugs.gentoo.org/911340
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
@gentoo-bot
Copy link

Pull Request assignment

Submitter: @svmhdvn
Areas affected: ebuilds
Packages affected: net-libs/nodejs

net-libs/nodejs: williamh

At least one of the listed packages is maintained entirely by non-GitHub developers!

Linked bugs

Bugs linked: 869992, 911340


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 need assignment It was impossible to assign the PR correctly. Please assign it manually. bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Sep 30, 2023
@svmhdvn
Copy link
Contributor Author

svmhdvn commented Sep 30, 2023

@williamh assigning to you. Not sure why the bot has your name crossed out.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-09-30 19:25 UTC
Newest commit scanned: f54e5eb
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/887bef74f4/output.html

@thesamesam
Copy link
Member

thesamesam commented Oct 1, 2023

I don't think this adds up, though. The LLVM commit cited was already in the versions in the linked bugs.

Maybe the issue was a combination of whatever was passing -latomic (was it nodejs?) and the symbols missing, but the timeline still doesn't seem right.

@svmhdvn
Copy link
Contributor Author

svmhdvn commented Oct 1, 2023

Even if the explanation isn't quite correct and the timeline isn't right, is it ok to go through with this PR? I have tested this build locally with the musl+clang Gentoo system profile and things seem to be working fine without gcc.

I can change the commit message to simply say it's an unnecessary dependency now.

@thesamesam
Copy link
Member

thesamesam commented Oct 1, 2023

I think you need to inspect the build system to at least make sure it doesn't try to pass -latomic by itself on any architecture when using compiler-rt.

Skimming, I see https://github.com/nodejs/node/blob/092fb9f541ce8cc07289b5a69eb93892445739f5/tools/v8_gypfiles/v8.gyp#L1076 still which implies this remains broken on arm at least.

Would probably be worth trying on i586 (a chroot on amd64 is fine) too.

@svmhdvn
Copy link
Contributor Author

svmhdvn commented Oct 2, 2023

Thanks for the help. I tried to test these builds using sys-devel/crossdev, but there's a bug[0] I found on the musl+clang profile that isn't allowing me to build the required cross toolchains. Without using a cross build environment, it might take a while for me to spin up the required VMs to test this on a few arches.

In the meantime, if anyone wants to continue this PR, please feel free.

[0] https://bugs.gentoo.org/915048

@calebstein1
Copy link

I was able to build node on musl+clang using the patch from the Chimera Linux repo here which is similar to the patch in this pr but also removes the section referenced above and so should build on arm and other architectures as well. I've got an arm machine that I'd be happy to test on this week, would love to see this pr merged if possible!

@@ -41,8 +41,7 @@ RDEPEND=">=app-arch/brotli-1.0.9:=
sys-libs/zlib
corepack? ( !sys-apps/yarn )
system-icu? ( >=dev-libs/icu-67:= )
system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
sys-devel/gcc:*"
system-ssl? ( >=dev-libs/openssl-1.1.1:0= )"
BDEPEND="${PYTHON_DEPS}
dev-util/ninja
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be changed to

Suggested change
dev-util/ninja
app-alternatives/ninja

I guess a rebase would solve it.

@svmhdvn
Copy link
Contributor Author

svmhdvn commented Feb 15, 2024

I don't have access to a Gentoo system anymore. I'd like to see this PR be merged though, so it would be nice if someone could take over this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug linked Bug/Closes found in footer, and cross-linked with the PR. need assignment It was impossible to assign the PR correctly. Please assign it manually.
Projects
None yet
6 participants