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

fix: s390x for build-images/rust-bullseye-stable-1-s390x #63

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

Conversation

SivakaviKavitha
Copy link

Updated code for s390x version of build-images/rust-bullseye-stable-1-s390x

Fixes: #62

@c-nixon c-nixon force-pushed the main branch 2 times, most recently from 7b9df78 to 3122543 Compare June 13, 2023 12:40
@SivakaviKavitha SivakaviKavitha force-pushed the s390x-logdna-kavithasivakavi branch 2 times, most recently from 4aee2a0 to 68e31f1 Compare June 14, 2023 06:10
@SivakaviKavitha
Copy link
Author

Hi @dkhokhlov ,
Could you please review/approve the code changes from PR.

@c-nixon
Copy link
Collaborator

c-nixon commented Jun 14, 2023

@logdnabot test this please

@SivakaviKavitha SivakaviKavitha force-pushed the s390x-logdna-kavithasivakavi branch 3 times, most recently from 619a94b to 9d3eb66 Compare June 14, 2023 10:12
@SivakaviKavitha
Copy link
Author

@dkhokhlov , @c-nixon , @logdnabot
could you please review/approve the code changes from PR again.
Thank you

@c-nixon
Copy link
Collaborator

c-nixon commented Jun 14, 2023

@logdnabot test this again please :)

Jenkinsfile Outdated
parameterizedCron(
env.BRANCH_NAME ==~ 'main' ? 'H 8 * * 7 % PUBLISH_GCR_IMAGE=true;PUBLISH_ICR_IMAGE=true' : ''
)
}
environment {
DOCKER_BUILDKIT='1'
SCCACHE_BUCKET='logdna-sccache-us-east-1'
SCCACHE_REGION='us-east-1'
SCCACHE_BUCKET='logdna-sccache-us-east-2'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be us-east-1, we don't have infrastructure in us-east-2 so this just disables caching.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @c-nixon ,
I have updated the code SCCACHE_BUCKET='logdna-sccache-us-east-2 to SCCACHE_BUCKET='logdna-sccache-us-east-1 and commits the changes ,
could you please approve the PR again.

Thank you

@c-nixon
Copy link
Collaborator

c-nixon commented Jun 14, 2023

We're encountering an internal error on our CI, we're looking into it

@dkhokhlov
Copy link
Contributor

dkhokhlov commented Jun 15, 2023

@SivakaviKavitha
I tried to build your PR with:

diff --git a/scripts/mk.debian b/scripts/mk.debian
index 903eb88..a223425 100755
--- a/scripts/mk.debian
+++ b/scripts/mk.debian
@@ -8,12 +8,13 @@ export DOCKER_BUILDKIT=1
 #
 #   linux/amd64       x86_64
 #   linux/arm64       aarch64
-declare -A platforms=( ["x86_64"]="linux/amd64" ["aarch64"]="linux/arm64")
+#   linux/s390x       s390x
+declare -A platforms=( ["x86_64"]="linux/amd64" ["aarch64"]="linux/arm64" ["s390x"]="linux/s390x")

 # Default to the host ARCH
 HOST_ARCH="$(uname -m)"

-SUPPORTED_TARGETS="aarch64 x86_64"
+SUPPORTED_TARGETS="aarch64 x86_64 s390x"
 DEFAULT_VARIANT="bullseye"

 CROSS_COMPILER_TARGET_ARCHS="${CROSS_COMPILER_TARGET_ARCHS:-$HOST_ARCH}"

and

./scripts/mk.debian -t s390x

getting build error. do you see the same?

@SivakaviKavitha
Copy link
Author

Hi @dkhokhlov ,

  1. As per suggesstion, we modified the mk.debian code.
  2. We tried to build the image in Z-VSI using ./scripts/mk.debian -t s390x
  3. We encountered the following package dependency error
#11 3.062 Building dependency tree...
#11 3.131 Reading state information...
#11 3.170 Some packages could not be installed. This may mean that you have
#11 3.170 requested an impossible situation or if you are using the unstable
#11 3.170 distribution that some required packages have not yet been created
#11 3.170 or been moved out of Incoming.
#11 3.170 The following information may help to resolve the situation:
#11 3.170 
#11 3.170 The following packages have unmet dependencies:
#11 3.214  wine : Depends: wine64 (>= 5.0.3-3) but it is not installable or
#11 3.215                  wine32 (>= 5.0.3-3) but it is not installable
#11 3.215         Depends: wine64 (< 5.0.3-3.1~) but it is not installable or
#11 3.215                  wine32 (< 5.0.3-3.1~) but it is not installable
#11 3.224 E: Unable to correct problems, you have held broken packages.
#11 ERROR: executor failed running [/bin/bash -c if [[ "${VARIANT_VERSION}" != "buster" ]] ; then  
  1. Also we tried to install wind64 package for s390x from official Release page, It seems s390x version for wine64 package is unavailable

Could you please suggest how to proceed on this.
Thank you

@dkhokhlov
Copy link
Contributor

@SivakaviKavitha
Let's make wine64 parts conditional. Wine is needed in x86 images.

@c-nixon
Copy link
Collaborator

c-nixon commented Jun 20, 2023

Could you please suggest how to proceed on this. Thank you

As @dkhokhlov said you could make this part conditional, the easiest place to do that would be to extend the conditional here to also check that the CROSS_COMPILER_TARGET_ARCH is not "s390x"

@sudharshanibm3
Copy link

sudharshanibm3 commented Jun 21, 2023

Thanks @c-nixon
Bypassed the wine package dependency by adding condition for s390x
Now, we are hitting the following error

#5 [build  2/10] RUN rustup target add "${!TARGETARCH}-unknown-linux-musl"
#5 sha256:70ea675dbcd0249e05d1d16d5047d94752499d44148e90b1433b331c5b5a725f
#5 0.315 error: toolchain 'stable-s390x-unknown-linux-gnu' does not contain component 'rust-std' for target 's390x-unknown-linux-musl'
#5 0.315 note: not all platforms have the standard library pre-compiled: https://doc.rust-lang.org/nightly/rustc/platform-support.html
#5 ERROR: executor failed running [/bin/bash -c rustup target add "${!TARGETARCH}-unknown-linux-musl"]: exit code: 1
------
 > [build  2/10] RUN rustup target add "${!TARGETARCH}-unknown-linux-musl":
------
executor failed running [/bin/bash -c rustup target add "${!TARGETARCH}-unknown-linux-musl"]: exit code: 1 

As per this Release page, stable-s390x-unknown-linux-gnu contains rust-std for target s390x-unknown-linux-musl

But still it fails to fetch the package.

Screenshot 2023-06-21 at 12 02 24 PM

@SivakaviKavitha
Copy link
Author

Hi @dkhokhlov
Could you please check on the updated code.

@dkhokhlov
Copy link
Contributor

dkhokhlov commented Aug 25, 2023

@SivakaviKavitha
How did you build it locally? I am getting build errors. I am using:

./scripts/mk.debian -t s390x

I am building head:

commit b4ed292741e9fe4e2e667b4ebe07ccc1d3d910e3 (HEAD -> s390x-logdna-kavithasivakavi, origin/s390x-logdna-kavithasivakavi)
Author: Kavitha Sivakavi <[email protected]>
Date:   Tue Jun 13 15:37:49 2023 +0530

     fix: s390x for build-images/rust-bullseye-stable-1-s390x

    Fixes: #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s390x image support for logdna/build-image/rust-bullseye-stable-1.
4 participants