Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Can't merge cross-avr/gcc-14.3.0::crossdev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 481
Location: Rosario, Argentina

PostPosted: Sat Jun 07, 2025 1:21 am    Post subject: [Solved] Can't merge cross-avr/gcc-14.3.0::crossdev Reply with quote

emerge -pqv '=cross-avr/gcc-14.3.0::crossdev' | wgetpaste -

emerge --info '=cross-avr/gcc-14.3.0::crossdev' | wgetpaste -

cat /var/tmp/portage/cross-avr/gcc-14.3.0/temp/build.log | wgetpaste -s 0x0 -


Thanks in advance.


Last edited by Fitap on Sun Jun 08, 2025 1:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2371

PostPosted: Sat Jun 07, 2025 2:16 am    Post subject: Reply with quote

Huh. I've pushed a workaround to crossdev.git but I'm a bit surprised by this (another workaround is to disable openmp in package.use for avr, by the way).

But toolchain.eclass has:
Code:

        if in_iuse openmp ; then
                # Make sure target has pthreads support: bug #326757, bug #335883
                # There shouldn't be a chicken & egg problem here as openmp won't
                # build without a C library, and you can't build that w/o
                # already having a compiler...
                if ! is_crosscompile || \
                   $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
                then
                        confgcc+=( $(use_enable openmp libgomp) )
                else
                        # Force disable as the configure script can be dumb, bug #359855
                        confgcc+=( --disable-libgomp )
                fi
        else
                # For gcc variants where we don't want openmp (e.g. kgcc)
                confgcc+=( --disable-libgomp )
        fi


That pthread.h test should fail for you when building an AVR cross-compiler. Would you be so kind to edit toolchain.eclass to replace that block with:
Code:

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 418ca888f14b1..b76cf9e421399 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1717,14 +1717,16 @@ toolchain_src_configure() {
       # There shouldn't be a chicken & egg problem here as openmp won't
       # build without a C library, and you can't build that w/o
       # already having a compiler...
+      set -x
       if ! is_crosscompile || \
-         $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
+         $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>"
       then
          confgcc+=( $(use_enable openmp libgomp) )
       else
          # Force disable as the configure script can be dumb, bug #359855
          confgcc+=( --disable-libgomp )
       fi
+      set +x
    else
       # For gcc variants where we don't want openmp (e.g. kgcc)
       confgcc+=( --disable-libgomp )

and show me the new build.log?
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 481
Location: Rosario, Argentina

PostPosted: Sat Jun 07, 2025 4:06 pm    Post subject: Reply with quote

Thanks sir sam_ for you reply.

I hope this is the log you are looking for.

cat cross-avr:gcc-14.3.0:20250607-153828.log | wgetpaste -s 0x0 -
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2371

PostPosted: Sat Jun 07, 2025 8:28 pm    Post subject: Reply with quote

Fitap wrote:
Thanks sir sam_ for you reply.

I hope this is the log you are looking for.

cat cross-avr:gcc-14.3.0:20250607-153828.log | wgetpaste -s 0x0 -


Thank you! It looks like it succeeded this time.. did you switch to crossdev-9999, or did we get lucky or I perhaps accidentally fixed it with the tracing toolchain.eclass patch somehow?
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 481
Location: Rosario, Argentina

PostPosted: Sun Jun 08, 2025 1:52 pm    Post subject: Reply with quote

Both the approach of disabling USE=-openmp and the patch to toolchain.eclass worked well.
I decided to go with the patch this time.

Code:
[ebuild   R    ] cross-avr/gcc-14.3.0:14::crossdev  USE="cet cxx lto (multilib) nls openmp -ada -custom-cflags -d -debug -default-stack-clash-protection -default-znow -doc -fixed-point -fortran -go -graphite (-hardened) -ieee-long-double -jit -libssp -modula2 -objc -objc++ -objc-gc (-pch) -pgo (-pie) -rust -sanitize (-ssp) -systemtap -test (-time64) -valgrind -vanilla -vtv -zstd"


Thank you!
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2371

PostPosted: Mon Jun 09, 2025 7:02 am    Post subject: Reply with quote

The eclass patch wasn't supposed to make anything work, just give me more useful output to debug it with. Are you sure it fails if you revert it?
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 481
Location: Rosario, Argentina

PostPosted: Mon Jun 09, 2025 8:20 pm    Post subject: Reply with quote

Sir, I am using toolchain.eclass without patch and the cross-avr/gcc package recompiled perfectly.
Honestly, I don't know what happened.
Sorry.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



OSZAR »