-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add running cicd 32bit #3119
Add running cicd 32bit #3119
Conversation
d9a1a2b
to
478f9d7
Compare
dejagnu installed but not found |
Do you have the logs for this ? I've seen this before but I can't remember how I fixed it, seing the logs might help me. |
hi Pierre! yes this happens directly in the build log, in the run test section
The CI will see green probably because we don't check for the return status yet |
I believe it is because runtest is in the dejagnu package but not symlinked to local bin directory or something along this. We don't want to symlink it ourselve because it'll probably break on next update. Does ubuntu provide any alternative dejagnu package ? |
You could try installing it from source ? RUN mkdir -p /tmp/dejagnu && cd /tmp/dejagnu && \
wget https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.2.tar.gz && \
tar xf dejagnu-1.6.2.tar.gz && cd dejagnu-1.6.2 && \
./configure && make && make install && \
cd /tmp && rm -rf dejagnu
|
sounds good i'll try, alpine gh actions also supply alpine.sh but i'm actually not sure if it makes any difference
|
I'm only following this from far away, but IIUC, everything is executed within the alpine chroot, so installing anything on ubuntu host should be useless. Don't you need to install dejagnu in the alpine chroot, using |
Yes you're right, in fact it's even worse as I have been looking at the commented file. |
9bbdacf
to
f6a5d28
Compare
ah yes i mistook it the first time around :) |
got some linking error around libc, not sure how to handle this
|
where does your /usr/lib/libc.so comes from ? |
tbh i'm not so sure, the build step is run with the alpine shell and before that I added the packages for alpine to be able to run on 32bit:
|
Ill use 'file' to inspect it soon, might be that we have to install some layer of glibc for alpine |
How did you configure gcc? That's usually the message you get when you're missing required lib for a particular multilib (x86_64-linux-gcc trying to build for x86-linux without the 32-bits lib: gcc finds the 64-bits and emits the message "skipping incompatible...."). Beware that Alpine is not GNU based. You'll also test against the musl libc (it has some difference compared with glibc). Not sure installing glibc on top on musl will just work®. I would really try to make it work with the regular setup of Alpine instead. |
Introducing musl here feels like asking for trouble -- having musl in CI is worth doing, but I wouldn't mix that up with the general issue of 32-bit testing. You should be able to get a 32-bit toolchain via multilib on Ubuntu using the GH worker. Do you need help with doing that? I can spend a bit of time on it if so. Note that musl does not do multilib and configure is also finding a tuple with Broadly, there's two options for any env:
Option 1 is going to be easier, and it'll be easier still with just using Ubuntu's multilib. |
i'm configuring gcc like this, disabling multilib since alpine doesn't handle multilib
|
i think i can just get the 32 bit toolchain via |
f6a5d28
to
cadb3ca
Compare
If you are running things inside Alpine, you need to use I don't see why you're using Alpine if you already installed the 32-bit toolchain via Ubuntu... |
So, next, it's the same error (https://github.com/Rust-GCC/gccrs/actions/runs/10357507543/job/28669671025?pr=3119#step:8:19755). Try passing |
ah ok i see what you're talking about now. I didn't know configure allows the options of --host and --build and --target. Can I also ask you some questions:
|
cadb3ca
to
c926d8e
Compare
@thesamesam :) hi Sam your tip with building with --host, --build and --target works |
codebase related new warnings?! not sure if i should fix these warnings or let it break ci and fix it in another patch?
|
Really glad it worked @badumbatish! And yes btw, I think your understanding in #3119 (comment) was right for that question, but no need for it now. |
re #3119 (comment): I am not sure how the CI setup here works, but they should be okay to ignore (somehow, I don't know how to mark it as such). Those are noisy middle-end warnings and those shouldn't be coming from the Rust frontend. |
the warnings before i think is logged by me building the CI on ubuntu. It is logged into a file called |
Thanks for explaining! IMO, they can be safely ignored, but let's see what @dkm and others say about what to do next. |
Thanks @thesamesam for giving us a hand here 👍 @badumbatish, you would need to check that nothing comes from the Rust frontend in your error log and save this file as the baseline + add corresponding comparison after each build (i.e. do the same as we have with the |
fff732a
to
9ec14e5
Compare
ChangeLog: * .github/alpine_32bit_log_warnings: New file. * .github/workflows/ccpp32alpine.yml: New file. gcc/rust/ChangeLog: * resolve/rust-ast-resolve.cc (NameResolution::go): Fix warnings from const auto& to const auto
9ec14e5
to
5a75111
Compare
../../gcc/text-art/style.cc:160:25: warning: spurious leading punctuation sequence ';' in format [-Wformat-diag] | ||
../../gcc/text-art/table.cc:981:62: warning: unquoted keyword 'char' in format [-Wformat-diag] | ||
../../gcc/text-art/table.cc:981:69: warning: spurious trailing punctuation sequence '])' in format [-Wformat-diag] | ||
/usr/include/c++/13.2.1/bits/new_allocator.h:172:33: warning: '*(std::_Vector_base<unsigned int, std::allocator<unsigned int> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_impl.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl::<anonymous>.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl_data::_M_start' may be used uninitialized [-Wmaybe-uninitialized] |
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.
there are a couple of warnings like this one which seem to spruce from our code even though the warning seems to come form a std header. we should either fix them now or open up an issue and take care of them later
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 think i'd opt to open up an issue for it to be fixed later. although i thought our code is only from gcc/rust and gcc/testsuite, is text-art/ also involved?
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.
@badumbatish Note that the list here is, I think, from grep warning:
, which means it misses the context lines GCC shows. It might be that e.g. there's a template in text-art
which gcc/rust
instantiates (just guessing but trying to say how it might be misleading).
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'll dig up the build log but it's just complaining about formatting issues, quite weird. In one instance it's giving a warning about a comment
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.
text-art/style.cc:160
2024-08-16T10:34:27.2120743Z make[2]: Entering directory '/home/runner/work/gccrs/gccrs/gccrs-build/gcc'
2024-08-16T10:34:27.2129865Z i586-alpine-linux-musl-g++ -fno-PIE -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -fno-common -DHAVE_CONFIG_H -fno-PIE -I. -Itext-art -I../../gcc -I../../gcc/text-art -I../../gcc/../include -I ./../gettext/intl -I../../gcc/../libcpp/include -I../../gcc/../libcody -I/home/runner/work/gccrs/gccrs/gccrs-build/./gmp -I/home/runner/work/gccrs/gccrs/gmp -I/home/runner/work/gccrs/gccrs/gccrs-build/./mpfr/src -I/home/runner/work/gccrs/gccrs/mpfr/src -I/home/runner/work/gccrs/gccrs/mpc/src -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -I/home/runner/work/gccrs/gccrs/gccrs-build/./isl/include -I/home/runner/work/gccrs/gccrs/isl/include -o text-art/style.o -MT text-art/style.o -MMD -MP -MF text-art/.deps/style.TPo ../../gcc/text-art/style.cc
2024-08-16T10:34:27.2138466Z ../../gcc/text-art/style.cc: In member function 'void text_art::style::color::print_sgr(pretty_printer*, bool, bool&) const':
2024-08-16T10:34:27.2140554Z ../../gcc/text-art/style.cc:150:25: warning: spurious leading punctuation sequence ';' in format [-Wformat-diag]
2024-08-16T10:34:27.2145045Z 150 | pp_printf (pp, ";5;%i", (int)u.m_8bit);
2024-08-16T10:34:27.2146093Z | ^
2024-08-16T10:34:27.2147619Z ../../gcc/text-art/style.cc:160:25: warning: spurious leading punctuation sequence ';' in format [-Wformat-diag]
2024-08-16T10:34:27.2149088Z 160 | pp_printf (pp, ";2;%i;%i;%i",
2024-08-16T10:34:27.2149894Z | ^
2024-08-16T10:34:27.2151028Z make[2]: Leaving directory '/home/runner/work/gccrs/gccrs/gccrs-build/gcc'
text-art/table.cc:981
2024-08-16T10:34:31.2073593Z make[2]: Entering directory '/home/runner/work/gccrs/gccrs/gccrs-build/gcc'
2024-08-16T10:34:31.2083000Z i586-alpine-linux-musl-g++ -fno-PIE -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -fno-common -DHAVE_CONFIG_H -fno-PIE -I. -Itext-art -I../../gcc -I../../gcc/text-art -I../../gcc/../include -I ./../gettext/intl -I../../gcc/../libcpp/include -I../../gcc/../libcody -I/home/runner/work/gccrs/gccrs/gccrs-build/./gmp -I/home/runner/work/gccrs/gccrs/gmp -I/home/runner/work/gccrs/gccrs/gccrs-build/./mpfr/src -I/home/runner/work/gccrs/gccrs/mpfr/src -I/home/runner/work/gccrs/gccrs/mpc/src -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -I/home/runner/work/gccrs/gccrs/gccrs-build/./isl/include -I/home/runner/work/gccrs/gccrs/isl/include -o text-art/table.o -MT text-art/table.o -MMD -MP -MF text-art/.deps/table.TPo ../../gcc/text-art/table.cc
2024-08-16T10:34:31.2091207Z ../../gcc/text-art/table.cc: In function 'void selftest::test_spans_3()':
2024-08-16T10:34:31.2092701Z ../../gcc/text-art/table.cc:981:62: warning: unquoted keyword 'char' in format [-Wformat-diag]
2024-08-16T10:34:31.2094222Z 981 | "'buf' (char[%i])",
2024-08-16T10:34:31.2094941Z | ^~~~
2024-08-16T10:34:31.2096219Z ../../gcc/text-art/table.cc:981:69: warning: spurious trailing punctuation sequence '])' in format [-Wformat-diag]
2024-08-16T10:34:31.2097501Z 981 | "'buf' (char[%i])",
2024-08-16T10:34:31.2098198Z | ^~
2024-08-16T10:34:31.2099178Z make[2]: Leaving directory '/home/runner/work/gccrs/gccrs/gccrs-build/gcc'
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.
@badumbatish I was talking about this line specifically:
warning: '*(std::_Vector_base<unsigned int, std::allocator<unsigned int> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_impl.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl::<anonymous>.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl_data::_M_start' may be used uninitialized [-Wmaybe-uninitialized]
that's a gccrs type, that we are using wrong I guess? I agree with you that it can be fixed separately though
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.
if it's ok with you i'll resolve the issue Arthur :)
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.
but i'm not sure if i should remove the warnings from the expected file or is the current state ok?
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.
If you manage to fix the warning you should delete the warning from the expected file, we want to keep warning count as low as possible
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.
yes, as @P-E-P said. so keep that PR in its current state but when you fix the warning make sure to remove it from the file 👍 good work!
Macbook can't make use of https://github.com/nektos/act so i'm trying this out on PRs, sorry :)