-
Notifications
You must be signed in to change notification settings - Fork 13.3k
build dist for x86_64-pc-solaris and sparcv9-sun-solaris #138699
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
base: master
Are you sure you want to change the base?
Conversation
r? @marcoieni rustbot has assigned @marcoieni. Use |
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
3b9fbda
to
0deec39
Compare
This comment has been minimized.
This comment has been minimized.
(That being said, thank you for investigating fixes for the Solaris CI) |
☔ The latest upstream changes (presumably #139826) made this pull request unmergeable. Please resolve the merge conflicts. |
0deec39
to
f556156
Compare
Is this ready for review? 👀 |
…cola update libc This is needed for rust-lang#138699 (comment)
Rollup merge of rust-lang#139969 - psumbera:libc-rust-analyzer, r=lnicola update libc This is needed for rust-lang#138699 (comment)
update libc This is needed for rust-lang/rust#138699 (comment)
f556156
to
7152b36
Compare
update libc This is needed for rust-lang/rust#138699 (comment)
BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/$BINUTILS_TAR" | ||
|
||
|
||
download_file() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this function is duplicated from illuminos-toolchain.sh
Can you move it to a shared script file or similar and source the file? so that we avoid having duplicate code.
Same is true for other parts of the scripts which are very similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this function is duplicated from illuminos-toolchain.sh Can you move it to a shared script file or similar and source the file? so that we avoid having duplicate code.
I have moved it into shared.sh
.
Same is true for other parts of the scripts which are very similar
There are no other common functions. While the structure looks similiar I don't think it's good to connect these two more.
Sorry for the wait, I'm having a look now. I'm familiar with the Rust CI in general but not with solaris specifically, so please don't assume I'm familiar with the scripts you edited 👍 From what I can see you are extracting the build of x86_64-solaris and sparcv9-solaris from the The second question is: the dockerfile of Also can you explain how this PR fixes the issue you linked? |
7152b36
to
d5925a8
Compare
I have updated change to use
I was asked in #126025 to do clean up. I decided to clean it up by compleltely removing all Solaris related stuff from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments.
@Kobzol can you have a look at this PR as well?
FROM ubuntu:22.04 | ||
|
||
# Enable source repositories, which are disabled by default on Ubuntu >= 18.04 | ||
RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed for ubuntu 22?
Same comment for the other dockerfile
COPY scripts/cross-apt-packages.sh /tmp/ | ||
RUN bash /tmp/cross-apt-packages.sh | ||
|
||
# Required for cross-build gcc, and we install python3 to test general compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required for cross-build gcc
What's required for cross-build among the packages we install?
and we install python3 to test general compatibility.
What do you mean?
Same comment for the other dockerfile
|
||
# | ||
# The illumos and the Solaris build both use the same GCC-level host triple, | ||
# though different versions of GCC are used and with different configure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# though different versions of GCC are used and with different configure | |
# though different versions of GCC are used and with different configuration |
I'm not native english speaker, so correct me if I'm wrong
SYSROOT_VER='2025-02-21' | ||
SYSROOT_SUM='e82b78c14464cc2dc71f3cdab312df3dd63441d7c23eeeaf34d41d8b947688d3' | ||
SYSROOT_TAR="solaris-11.4.42.111.0-i386-sysroot-v$SYSROOT_VER.tar.bz2" | ||
SYSROOT_URL="https://github.com/psumbera/solaris-sysroot/releases/download/v$SYSROOT_VER/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variables SYSROOT_VER and SYSROOT_URL can be moved outside of the if, because they are the same for both branches.
SYSROOT_VER='2025-02-21' | ||
SYSROOT_SUM='e249a7ef781b9b3297419bd014fa0574800703981d84e113d6af3a897a8b4ffc' | ||
SYSROOT_TAR="solaris-11.4.42.111.0-sparc-sysroot-v$SYSROOT_VER.tar.bz2" | ||
SYSROOT_URL="https://github.com/psumbera/solaris-sysroot/releases/download/v$SYSROOT_VER/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for security and availability reasons, we probably prefer to download artifacts from our ci-mirrors.
Can you add this to https://github.com/rust-lang/ci-mirrors/tree/main/files ?
BINUTILS_SUM='f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a' | ||
BINUTILS_BASE="binutils-$BINUTILS_VERSION" | ||
BINUTILS_TAR="$BINUTILS_BASE.tar.bz2" | ||
BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/$BINUTILS_TAR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for security and availability reasons, we probably prefer to download artifacts from our ci-mirrors.
Can you add this to https://github.com/rust-lang/ci-mirrors/tree/main/files ?
download_file "/tmp/$GCC_TAR" "$GCC_URL" "$GCC_SUM" | ||
mkdir -p /ws/src/gcc | ||
cd /ws/src/gcc | ||
tar -xJf "/tmp/$GCC_TAR" | ||
rm -f "/tmp/$GCC_TAR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this pattern is duplicated at line 78 and 86, can we extract it into a function?
mkdir -p "$PREFIX" | ||
make install | ||
|
||
cd / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd / | |
cd - |
Why do you cd
into root? Is going to the previous directory more correct in your opinion?
Same at line 171
<<: *job-linux-4c | ||
|
||
- name: dist-sparcv9-solaris | ||
<<: *job-linux-4c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you run [at]bors try
?
Otherwise I can do it for you to test this PR 👍
EOF | ||
expand -t 4 binutils-2.44/bfd/elflink.c > binutils-2.44/bfd/elflink.c.exp | ||
mv binutils-2.44/bfd/elflink.c.exp binutils-2.44/bfd/elflink.c | ||
patch binutils-2.44/bfd/elflink.c < binutils.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.44 is duplicated in this file, I wonder if we can extract this version number into a variable?
To clarify, you are promoting Solaris targets from Tier 2 to Tier 2 with host tools? There should be an update to the platform support pages and a compiler MCP for the promotion (https://doc.rust-lang.org/nightly/rustc/target-tier-policy.html#tier-2-with-host-tools). |
Yeah, just wanted to post this, this seems like it moves the Solaris target between tiers, so it should go through an MCP. |
FIx for #126025
Note that this needs Nix with following commit:
nix-rust/nix@0f45593
Unfortunatelly there is no new release.
And for sparcv9 it needs also:
tov/libffi-rs#103
For now it therefore uses cargo patch infrastructure for these.