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

musl fixes and musl+riscv32 fixes #3191

Closed
wants to merge 5 commits into from
Closed

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Apr 8, 2023

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
Collaborator

rustbot commented Apr 8, 2023

r? @JohnTitor

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

@kraj kraj changed the title Kraj/musl fixes musl fixes and musl+riscv32 fixes Apr 8, 2023
@kraj
Copy link
Contributor Author

kraj commented Apr 8, 2023

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
Copy link
Contributor Author

kraj commented Apr 8, 2023

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
Member

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Apr 12, 2023

📌 Commit be7fd28 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 12, 2023

⌛ Testing commit be7fd28 with merge 9beae5d...

bors added a commit that referenced this pull request Apr 12, 2023
musl fixes and musl+riscv32 fixes
@bors
Copy link
Contributor

bors commented Apr 12, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

Seems some consts are declared twice, @rustbot author

@akiernan
Copy link

akiernan commented Jul 14, 2023

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
@bors bors closed this in 5e32df0 Oct 27, 2023
Sign up for free to 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.

None yet

5 participants