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

chore: Bump libc crate #9001

Merged
merged 2 commits into from
Jun 5, 2024
Merged

chore: Bump libc crate #9001

merged 2 commits into from
Jun 5, 2024

Conversation

huajingyun01
Copy link
Contributor

Upgrade libc to v0.2.155 to support LoongArch64.

Libc release notes : https://github.com/rust-lang/libc/releases
The relevant change: rust-lang/libc#3606

Resolve the following errors:

help: if you import `c_char`, refer to it directly
    |
219 - pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int {
219 + pub unsafe extern "C" fn stat64(pathname: *const c_char, statbuf: *mut ::stat64) -> ::c_int {
    |

error[E0573]: expected type, found function `stat64`
   --> /home/alpine/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/linux_like/linux/musl/lfs64.rs:219:74
    |
219 | pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int {
    |                                                                          ^^^^^^^^ not a type

error[E0412]: cannot find type `c_char` in the crate root
   --> /home/alpine/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/linux_like/linux/musl/lfs64.rs:224:54
    |
224 | pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int {
    |                                                      ^^^^^^
    |
   ::: /home/alpine/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/mod.rs:6:1

Thanks.

@huajingyun01 huajingyun01 requested a review from a team as a code owner May 30, 2024 12:02
@CLAassistant
Copy link

CLAassistant commented May 30, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Preventing merging for now. I'm not sure what's the point of this PR.

@kdy1
Copy link
Member

kdy1 commented May 30, 2024

Do you want to contribute to SWC but you use LoongArch64? Otherwise, you don't need to modify Cargo.lock of SWC

@huajingyun01
Copy link
Contributor Author

Do you want to contribute to SWC but you use LoongArch64? Otherwise, you don't need to modify Cargo.lock of SWC

@kdy1 yes, I can build and run swc on LoongArch64 using this change. I also submitted this patch to alpine

If it is possible to upgrade libc from upstream, it will be very friendly for package swc for alpine.

Thanks.

@kdy1
Copy link
Member

kdy1 commented May 31, 2024

Why do you build swc from there? SWC provides a prebuilt binary for arm linux

@huajingyun01
Copy link
Contributor Author

Why do you build swc from there? SWC provides a prebuilt binary for arm linux

I am working on the Alpine Linux LoongArch64 port.
During this process, I found that a large number of software failed to compile due to low libc versions(loongarch64 architecture support is not added to src/unix/linux_like/linux/musl). swc is one of them.

@kdy1
Copy link
Member

kdy1 commented Jun 2, 2024

Can you sign the CLA?

@huajingyun01
Copy link
Contributor Author

Can you sign the CLA?

Have done, thanks.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • dbg-swc

@kdy1 kdy1 enabled auto-merge (squash) June 5, 2024 05:45
@kdy1 kdy1 changed the title chore: Bump libc crate chore: Bump libc crate Jun 5, 2024
@kdy1 kdy1 added this to the Planned milestone Jun 5, 2024
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit 7f08b03 into swc-project:main Jun 5, 2024
147 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.5.26 Jun 10, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants