Skip to content

musl fixes and musl+riscv32 fixes - #3191

Closed
kraj wants to merge 5 commits into
rust-lang:mainfrom
kraj:kraj/musl-fixes
Closed

musl fixes and musl+riscv32 fixes#3191
kraj wants to merge 5 commits into
rust-lang:mainfrom
kraj:kraj/musl-fixes

Conversation

@kraj

@krajkraj commented Apr 8, 2023

Copy link
Copy Markdown
Contributor

No description provided.

kraj added 4 commits April 8, 2023 09:37
F_SETLK and F_SETLKW were not defined therefore define them
and F_GETLK value was not matching the musl port hence fixed
These defines are not architecture specific in musl [1] therefore move them
to be common
[1] https://git.musl-libc.org/cgit/musl/tree/include/fcntl.h#n48
@rustbot

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

(rustbot has picked a reviewer for you, use r? to override)

@krajkraj changed the title Kraj/musl fixesmusl fixes and musl+riscv32 fixesApr 8, 2023
@kraj

kraj commented Apr 8, 2023

Copy link
Copy Markdown
ContributorAuthor

cd libc-test && cargo test fails on my archlinux without my changes as well

OPT_LEVEL = Some("0")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-D_GNU_SOURCE" "-D__GLIBC_USE_DEPRECATED_SCANF" "-o" "/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/627d083e0321a21f-main.o" "-c" "/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c"
cargo:warning=/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c: In function ‘__test_roundtrip_inotify_event’:
cargo:warning=/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c:23146:13: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
cargo:warning=23146 | ) {
cargo:warning= | ^
cargo:warning=/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c: In function ‘__test_fsize_af_alg_iv_iv’:
cargo:warning=/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c:25568:34: error: invalid application of ‘sizeof’ to incomplete type ‘__u8[]’ {aka ‘unsigned char[]’}
cargo:warning=25568 | return sizeof(foo->iv);
cargo:warning= | ^
cargo:warning=/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c:25569:17: error: control reaches end of non-void function [-Werror=return-type]
cargo:warning=25569 | }
cargo:warning= | ^
cargo:warning=At top level:
cargo:warning=cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cargo:warning=cc1: all warnings being treated as errors
exit status: 1
--- stderr
rust version: 1.68.2
error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-D_GNU_SOURCE" "-D__GLIBC_USE_DEPRECATED_SCANF" "-o" "/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/627d083e0321a21f-main.o" "-c" "/home/kraj/work/libc/target/debug/build/libc-test-04f83ede874c351b/out/main.c" with args "cc" did not execute successfully (status code exit status: 1).

@kraj

kraj commented Apr 8, 2023

Copy link
Copy Markdown
ContributorAuthor

nightly x86_64-unknown-freebsd-13 failure is build host related as well.

This define is not architecture specific in musl [1]
[1] https://git.musl-libc.org/cgit/musl/tree/include/sys/socket.h#n90
Signed-off-by: Khem Raj <raj.khem@gmail.com>
@JohnTitor

Copy link
Copy Markdown
Member

Thanks! @bors r+

@bors

bors commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

📌 Commit be7fd28 has been approved by JohnTitor

It is now in the queue for this repository.

@bors

bors commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit be7fd28 with merge 9beae5d...

bors added a commit that referenced this pull request Apr 12, 2023
@bors

bors commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

💔 Test failed - checks-actions

@JohnTitor

Copy link
Copy Markdown
Member

Seems some consts are declared twice, @rustbot author

@akiernan

akiernan commented Jul 14, 2023

Copy link
Copy Markdown

Rebased in #3302

bors added a commit that referenced this pull request Aug 20, 2023
musl fixes and musl+riscv32 fixes
https://github.com/kraj/libc/tree/kraj/musl-fixes rebased onto main with the duplicate symbols fixed up (though the logs from the previous run have expired so I might have missed something).
Closes#3191
@borsbors closed this in 5e32df0Oct 27, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@kraj@rustbot@JohnTitor@bors@akiernan