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

Build s390x binaries using musl libc #2144

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

Building using musl until NixOS/nixpkgs#306473 is resolved.

Which issue(s) this PR fixes:

Refers to cri-o/cri-o#7911

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Fixed s390x build using musl libc.

Copy link
Contributor

openshift-ci bot commented Apr 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

Merging #2144 (ef35ef8) into main (4e0f474) will increase coverage by 0.07%.
Report is 317 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2144      +/-   ##
==========================================
+ Coverage   37.53%   37.61%   +0.07%     
==========================================
  Files          15       15              
  Lines        1268     1268              
  Branches      414      412       -2     
==========================================
+ Hits          476      477       +1     
+ Misses        526      525       -1     
  Partials      266      266              

@saschagrunert
Copy link
Member Author

This will not work due to a s390x build failure:

error[E0428]: the name `fs_type_t` is defined multiple times
  --> /build/cargo-vendor-dir/nix-0.27.1/src/sys/statfs.rs:68:1
   |
66 | type fs_type_t = libc::c_uint;
   | ------------------------------ previous definition of the type `fs_type_t` here
67 | #[cfg(all(target_os = "linux", target_env = "musl"))]
68 | type fs_type_t = libc::c_ulong;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fs_type_t` redefined here
   |
   = note: `fs_type_t` must be defined only once in the type namespace of this module

   Compiling rand v0.8.5
   Compiling proc-macro-error v1.0.4
   Compiling lazy_static v1.4.0
   Compiling overload v0.1.1
   Compiling rustix v0.38.34
   Compiling is_debug v1.0.1
   Compiling base64 v0.21.7
   Compiling const_format v0.2.32
   Compiling anstyle v1.0.2
   Compiling capnpc v0.19.0
error[E0592]: duplicate definitions with name `optimal_transfer_size`
   --> /build/cargo-vendor-dir/nix-0.27.1/src/sys/statfs.rs:348:5
    |
338 |     pub fn optimal_transfer_size(&self) -> u32 {
    |     ------------------------------------------ other definition for `optimal_transfer_size`
...
348 |     pub fn optimal_transfer_size(&self) -> libc::c_ulong {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `optimal_transfer_size`

error[E0592]: duplicate definitions with name `block_size`
   --> /build/cargo-vendor-dir/nix-0.27.1/src/sys/statfs.rs:406:5
    |
398 |     pub fn block_size(&self) -> u32 {
    |     ------------------------------- other definition for `block_size`
...
406 |     pub fn block_size(&self) -> libc::c_ulong {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `block_size`

error[E0592]: duplicate definitions with name `maximum_name_length`
   --> /build/cargo-vendor-dir/nix-0.27.1/src/sys/statfs.rs:497:5
    |
490 |     pub fn maximum_name_length(&self) -> u32 {
    |     ---------------------------------------- other definition for `maximum_name_length`
...
497 |     pub fn maximum_name_length(&self) -> libc::c_ulong {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `maximum_name_length`

Some errors have detailed explanations: E0428, E0592.
For more information about an error, try `rustc --explain E0428`.
error: could not compile `nix` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...

/hold

Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

/unhold

@saschagrunert
Copy link
Member Author

@haircommander PTAL.

@haircommander
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 24, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 65763db into containers:main Apr 24, 2024
36 checks passed
@saschagrunert saschagrunert deleted the s390x-musl branch August 1, 2024 10:12
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.

3 participants