Re: build: Use of cargo not yet supported here in Canadian cross configurations
Hi Thomas, On 4/15/24 14:44, Thomas Schwinge wrote: Hi! On 2024-04-15T13:14:42+0200, I wrote: On 2024-04-08T18:33:38+0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some of it's components, In GCC upstream still: 's%requires%is going to require'. ;-) it's presence was not checked during configuration. After confirming the desired semantics/diagnostics, I've now pushed this to trunk branch in commit 3e1e73fc99584440e5967577f2049573eeaf4596 "build: Check for cargo when building rust language". On top of that, OK to push the attached "build: Use of cargo not yet supported here in Canadian cross configurations"? Patch looks good, thanks :) Do you want me to propagate the change to our development repo or would you like to open a pull-request yourself? Best, Arthur Grüße Thomas
Re: [gcc r14-7544] gccrs: libproc_macro: Build statically
Morning Thomas, On 4/15/24 13:07, Thomas Schwinge wrote: Hi! On 2024-01-16T17:43:10+, Arthur Cohen via Gcc-cvs wrote: https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 Author: Pierre-Emmanuel Patry Date: Wed Apr 26 10:31:35 2023 +0200 gccrs: libproc_macro: Build statically We do not need dynamic linking, all use case of this library cover can be done statically hence the change. gcc/rust/ChangeLog: * Make-lang.in: Link against the static libproc_macro. --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -182,11 +182,14 @@ RUST_ALL_OBJS = $(GRS_OBJS) $(RUST_TARGET_OBJS) rust_OBJS = $(RUST_ALL_OBJS) rust/rustspec.o +RUST_LDFLAGS = $(LDFLAGS) -L./../libgrust/libproc_macro +RUST_LIBDEPS = $(LIBDEPS) ../libgrust/libproc_macro/libproc_macro.a + # The compiler itself is called crab1 -crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(rust.prev) +crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(RUST_LIBDEPS) $(rust.prev) @$(call LINK_PROGRESS,$(INDEX.rust),start) - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ - $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) + +$(LLINKER) $(ALL_LINKERFLAGS) $(RUST_LDFLAGS) -o $@ \ + $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) ../libgrust/libproc_macro/libproc_macro.a $(BACKENDLIBS) @$(call LINK_PROGRESS,$(INDEX.rust),end) The 'crab1' compiler is (at least potentially) just one of several executables that 'gcc/rust/Make-lang.in' may build, which may all have different library dependencies, etc. Instead of via generic 'RUST_[...]' variables, those dependencies etc. should therefore be specified as they are individually necessary. I've pushed to trunk branch the following clean-up commits, see attached: - commit cb70a49b30f0a22ec7a1b7df29c3ab370d603f90 "Remove 'libgrust/libproc_macro_internal' from 'gcc/rust/Make-lang.in:RUST_LDFLAGS'" - commit f7c8fa7280c85cbdea45be9c09f36123ff16a78a "Inline 'gcc/rust/Make-lang.in:RUST_LDFLAGS' into single user" - commit 24d92f65f9ed9b3c730c59f700ce2f5c038c8207 "Add 'gcc/rust/Make-lang.in:LIBPROC_MACRO_INTERNAL'" - commit e3fda76af4f342ad1ba8bd901a72d811e8357e99 "Inline 'gcc/rust/Make-lang.in:RUST_LIBDEPS' into single user" Thanks, that looks good :) Same question as on the other thread: do you want me to open a PR for these on github or do you want to do it yourself? Kindly, Arthur Grüße Thomas
☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)
A new failure has been detected on builder gccrust-fedora-x86_64 while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788 Build state: failed compile (failure) Revision: 9dda7062e0bddcfe08e08f6a4efd8dd544f89463 Worker: bb1-2 Build Reason: (unknown) Blamelist: 0xn4utilus , Aldy Hernandez , Alex Coplan , Alexander Westbrooks , Alexandre Oliva , Andre Simoes Dias Vieira , Andre Vieira , Andreas Schwab , Andrew Carlotti , Andrew Pinski , Andrew Stubbs , Antoni Boucher , Arthur Cohen , Bernhard Reutner-Fischer , Brian Inglis , Christoph Müllner , Christophe Lyon , Chung-Lin Tang , Cupertino Miranda , Daniel Cederman , David Faust , David Malcolm , Dimitar Dimitrov , Edwin Lu , Eric Bo tcazou , Fangrui Song , Fangrui Song , Filip Kastl , Francois-Xavier Coudert , François Dumont , GCC Administrator , Gaius Mulley , Georg-Johann Lay , Gerald Pfeifer , Greg McGary , H.J. Lu <(no_default)>, H.J. Lu , Hans-Peter Nilsson , Hans-Peter Nilsson , Haochen Gui , Haochen Jiang , Harald Anlauf , Huanghui Nie , Iain Buclaw , Iain Sandoe , Ian Lance Taylor , Ilya Leoshkevich , Jakub Dupak , Jakub Jelinek , Jan Dubiec , Jan Hubicka , Jason Merrill , Jeevitha , Jeff Law , Jerry DeLisle , Jiahao Xu , Jin Ma , John David Anglin , Jonathan Wakely , Jonathan Yong <10wa...@gmail.com>, Jose E. Marchesi , Joseph Myers , Juergen Christ , Jun Sha (Joshua) , Juzhe-Zhong , Ken Matsui , Kewen Lin , Khem Raj , Kito Cheng , Kuan-Lin Chen , Kushal Pal , Kwok Cheung Yeung , Kwok Cheung Yeung , Lehua Ding , Lewis Hyatt , Li Wei , Lulu Cheng , M V V S Manoj Kumar , Maciej W. Rozycki , Maciej W. Rozycki < ma...@orcam.me.uk>, Manos Anagnostakis , Marc Poulhiès , Marc Poulhiès , Marek Polacek , Mark Wielaard , Martin Jambor , Martin Uecker , Mary Bennett , Matteo Italia , Matthieu Longo , Maxim Kuvyrkov , Mikael Morin , Mikael Pettersson , Monk Chiang , Nathaniel Shead , Nirmal Patel , Nobel Singh , Oleg Endo , Owen Avery , Palmer Dabbelt , Pan Li , Patrick O'Neill , Patrick Palka , Paul Keir , Peter Bergner , Peter Hill , Ph ilip Herron , Pierre-Emmanuel Patry , Prathamesh Kulkarni , Raiki Tamura , Rainer Orth , Richard Ball , Richard Biener , Richard Earnshaw , Richard Sandiford , Robert Goss , Robin Dapp , Robin Dapp , Roger Sayle , Ronan Desplanques , Sahil Yeole , Sam James , Sandra Loosemore , Sandra Loosemore , Saurabh Jha , Stam Markianos-Wright , Steve Kargl , Szabolcs Nagy , Takayuki 'January June' Suwa , Tamar Christina , Tejas Belagod , Thomas Schwinge , Tobias Burnus , Tom Tromey , Torbjörn SVENSSON , Uros Bizjak , Victor Do Nascimento , Vineet Gupta , Vladimir N. Makarov , Wilco Dijkstra , Will Hawkins , Xi Ruoyao , Yang Yujie , Yanzhang Wang , YunQiang Su , YunQiang Su , Zac Walker , chenguoqi , chenxiaolong , demin.han , liuhongt , waffl3x , xuli Steps: - 0: worker_preparation ( success ) - 1: git checkout ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/1/logs/stdio - 2: rm -rf gccrs-build ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/2/logs/stdio - 3: configure ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/3/logs/stdio - config.log: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/3/logs/config_log - 4: make ( failure ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/4/logs/stdio - warnings (5): https://builder.sourceware.org/buildbot/#/builders/16/builds/2788/steps/4/logs/warnings__5_ A new failure has been detected on builder gccrust-debian-i386 while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/27/builds/2195 Build state: failed compile (failure) Revision: 9dda7062e0bddcfe08e08f6a4efd8dd544f89463 Worker: debian-i386 Build Reason: (unknown) Blamelist: 0xn4utilus , Aldy Hernandez , Alex Coplan , Alexander Westbrooks , Alexandre Oliva , Andre Simoes Dias Vieira , Andre Vieira , Andreas Schwab , Andrew Carlotti , Andrew Pinski , Andrew Stubbs , Antoni Boucher , Arthur Cohen , Bernhard Reutner-Fischer , Brian Inglis , Charalampos Mitrodimas , Christoph Müllner , Christophe Lyon , Chung-Lin Tang , Cupertino Miranda , Daniel Cederman , Dave Evans , David Faust , David Malcolm , Dimitar Dimitrov , Edwin Lu , Emanuele Micheletti , Eric Botcazou , Fangrui Song , Fangrui Song , Filip Kastl , Francois-Xavier Coudert , François Dumont , GCC Administrator , Gaius Mulley , Georg-Johann Lay , Gerald Pfeifer , Greg McGary , Guillaume Gomez , H.J. Lu <(no_default)>, H.J. Lu , Hans-Peter Nilsson , Hans-Peter Nilsson , Haochen Gui , Haochen Jiang , Harald Anlauf , Huanghui Nie , Iain Buclaw , Iain Sandoe , Ian Lance Taylo
☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)
A new failure has been detected on builder gccrust-fedora-ppc64le while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889 Build state: failed compile (failure) Revision: fb9ff2f1550c3317628e4d8c9602f8b65c527865 Worker: fedora-ppc64le Build Reason: (unknown) Blamelist: 0xn4utilus , Aldy Hernandez , Alex Coplan , Alexander Westbrooks , Alexandre Oliva , Andre Simoes Dias Vieira , Andre Vieira , Andreas Schwab , Andrew Carlotti , Andrew Pinski , Andrew Stubbs , Antoni Boucher , Arthur Cohen , Bernhard Reutner-Fischer , Brian Inglis , Christoph Müllner , Christophe Lyon , Chung-Lin Tang , Cupertino Miranda , Daniel Cederman , David Faust , David Malcolm , Dimitar Dimitrov , Edwin Lu , Eric Bo tcazou , Fangrui Song , Fangrui Song , Filip Kastl , Francois-Xavier Coudert , François Dumont , GCC Administrator , Gaius Mulley , Georg-Johann Lay , Gerald Pfeifer , Greg McGary , H.J. Lu <(no_default)>, H.J. Lu , Hans-Peter Nilsson , Hans-Peter Nilsson , Haochen Gui , Haochen Jiang , Harald Anlauf , Huanghui Nie , Iain Buclaw , Iain Sandoe , Ian Lance Taylor , Ilya Leoshkevich , Jakub Dupak , Jakub Jelinek , Jan Dubiec , Jan Hubicka , Jason Merrill , Jeevitha , Jeff Law , Jerry DeLisle , Jiahao Xu , Jin Ma , John David Anglin , Jonathan Wakely , Jonathan Yong <10wa...@gmail.com>, Jose E. Marchesi , Joseph Myers , Juergen Christ , Jun Sha (Joshua) , Juzhe-Zhong , Ken Matsui , Kewen Lin , Khem Raj , Kito Cheng , Kuan-Lin Chen , Kushal Pal , Kwok Cheung Yeung , Kwok Cheung Yeung , Lehua Ding , Lewis Hyatt , Li Wei , Lulu Cheng , M V V S Manoj Kumar , Maciej W. Rozycki , Maciej W. Rozycki < ma...@orcam.me.uk>, Manos Anagnostakis , Marc Poulhiès , Marc Poulhiès , Marek Polacek , Mark Wielaard , Martin Jambor , Martin Uecker , Mary Bennett , Matteo Italia , Matthieu Longo , Maxim Kuvyrkov , Mikael Morin , Mikael Pettersson , Monk Chiang , Nathaniel Shead , Nirmal Patel , Nobel Singh , Oleg Endo , Owen Avery , Palmer Dabbelt , Pan Li , Patrick O'Neill , Patrick Palka , Paul Keir , Peter Bergner , Peter Hill , Ph ilip Herron , Pierre-Emmanuel Patry , Prathamesh Kulkarni , Raiki Tamura , Rainer Orth , Richard Ball , Richard Biener , Richard Earnshaw , Richard Sandiford , Robert Goss , Robin Dapp , Robin Dapp , Roger Sayle , Ronan Desplanques , Sahil Yeole , Sam James , Sandra Loosemore , Sandra Loosemore , Saurabh Jha , Stam Markianos-Wright , Steve Kargl , Szabolcs Nagy , Takayuki 'January June' Suwa , Tamar Christina , Tejas Belagod , Thomas Schwinge , Tobias Burnus , Tom Tromey , Torbjörn SVENSSON , Uros Bizjak , Victor Do Nascimento , Vineet Gupta , Vladimir N. Makarov , Wilco Dijkstra , Will Hawkins , Xi Ruoyao , Yang Yujie , Yanzhang Wang , YunQiang Su , YunQiang Su , Zac Walker , chenguoqi , chenxiaolong , demin.han , liuhongt , waffl3x , xuli Steps: - 0: worker_preparation ( success ) - 1: git checkout ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/1/logs/stdio - 2: rm -rf gccrs-build ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/2/logs/stdio - 3: configure ( success ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/3/logs/stdio - config.log: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/3/logs/config_log - 4: make ( failure ) Logs: - stdio: https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/4/logs/stdio - warnings (8): https://builder.sourceware.org/buildbot/#/builders/19/builds/1889/steps/4/logs/warnings__8_
Re: [PATCH] build: Check for cargo when building rust language
On Mon, Apr 8, 2024 at 9:39 AM wrote: > > From: Pierre-Emmanuel Patry > > Hello, > > The rust frontend requires cargo to build some of it's components, > it's presence was not checked during configuration. WHY did this go in right before the release of GCC 14? I don't get why this is considered temporary and it goes in right before a release. That seems broken to me. Thanks, Andrew > > Best regards, > Pierre-Emmanuel > > -- > > Prevent rust language from building when cargo is > missing. > > config/ChangeLog: > > * acx.m4: Add a macro to check for rust > components. > > ChangeLog: > > * configure: Regenerate. > * configure.ac: Emit an error message when cargo > is missing. > > Signed-off-by: Pierre-Emmanuel Patry > --- > config/acx.m4 | 11 + > configure | 117 ++ > configure.ac | 18 > 3 files changed, 146 insertions(+) > > diff --git a/config/acx.m4 b/config/acx.m4 > index 7efe98aaf96..3c5fe67342e 100644 > --- a/config/acx.m4 > +++ b/config/acx.m4 > @@ -424,6 +424,17 @@ else > fi > ]) > > +# Test for Rust > +# We require cargo and rustc for some parts of the rust compiler. > +AC_DEFUN([ACX_PROG_CARGO], > +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) > +AC_CHECK_TOOL(CARGO, cargo, no) > +if test "x$CARGO" != xno; then > + have_cargo=yes > +else > + have_cargo=no > +fi]) > + > # Test for D. > AC_DEFUN([ACX_PROG_GDC], > [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) > diff --git a/configure b/configure > index 874966fb9f0..46e66e20197 100755 > --- a/configure > +++ b/configure > @@ -714,6 +714,7 @@ PGO_BUILD_GEN_CFLAGS > HAVE_CXX11_FOR_BUILD > HAVE_CXX11 > do_compare > +CARGO > GDC > GNATMAKE > GNATBIND > @@ -5786,6 +5787,104 @@ else >have_gdc=no > fi > > + > +if test -n "$ac_tool_prefix"; then > + # Extract the first word of "${ac_tool_prefix}cargo", so it can be a > program name with args. > +set dummy ${ac_tool_prefix}cargo; ac_word=$2 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > +$as_echo_n "checking for $ac_word... " >&6; } > +if ${ac_cv_prog_CARGO+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test -n "$CARGO"; then > + ac_cv_prog_CARGO="$CARGO" # Let the user override the test. > +else > +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > +for as_dir in $PATH > +do > + IFS=$as_save_IFS > + test -z "$as_dir" && as_dir=. > +for ac_exec_ext in '' $ac_executable_extensions; do > + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > +ac_cv_prog_CARGO="${ac_tool_prefix}cargo" > +$as_echo "$as_me:${as_lineno-$LINENO}: found > $as_dir/$ac_word$ac_exec_ext" >&5 > +break 2 > + fi > +done > + done > +IFS=$as_save_IFS > + > +fi > +fi > +CARGO=$ac_cv_prog_CARGO > +if test -n "$CARGO"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CARGO" >&5 > +$as_echo "$CARGO" >&6; } > +else > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > +$as_echo "no" >&6; } > +fi > + > + > +fi > +if test -z "$ac_cv_prog_CARGO"; then > + ac_ct_CARGO=$CARGO > + # Extract the first word of "cargo", so it can be a program name with args. > +set dummy cargo; ac_word=$2 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > +$as_echo_n "checking for $ac_word... " >&6; } > +if ${ac_cv_prog_ac_ct_CARGO+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test -n "$ac_ct_CARGO"; then > + ac_cv_prog_ac_ct_CARGO="$ac_ct_CARGO" # Let the user override the test. > +else > +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > +for as_dir in $PATH > +do > + IFS=$as_save_IFS > + test -z "$as_dir" && as_dir=. > +for ac_exec_ext in '' $ac_executable_extensions; do > + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > +ac_cv_prog_ac_ct_CARGO="cargo" > +$as_echo "$as_me:${as_lineno-$LINENO}: found > $as_dir/$ac_word$ac_exec_ext" >&5 > +break 2 > + fi > +done > + done > +IFS=$as_save_IFS > + > +fi > +fi > +ac_ct_CARGO=$ac_cv_prog_ac_ct_CARGO > +if test -n "$ac_ct_CARGO"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CARGO" >&5 > +$as_echo "$ac_ct_CARGO" >&6; } > +else > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > +$as_echo "no" >&6; } > +fi > + > + if test "x$ac_ct_CARGO" = x; then > +CARGO="no" > + else > +case $cross_compiling:$ac_tool_warned in > +yes:) > +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not > prefixed with host triplet" >&5 > +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" > >&2;} > +ac_tool_warned=yes ;; > +esac > +CARGO=$ac_ct_CARGO > + fi > +else > + CARGO="$ac_cv_prog_CARGO" > +fi > + > +if test "x$CARGO" != xno; then > + have_cargo=yes > +else > + have_cargo=no > +fi > { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compare > bootstrapped objects" >&5 > $as_echo_n "checking how to compare bootstrapped objects... " >&6; } > if ${gcc_cv_prog_cmp_skip+:}