Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gcc won't merge after switching to profile 23.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
frank0x01
n00b
n00b


Joined: 06 Apr 2023
Posts: 8

PostPosted: Mon Aug 19, 2024 4:32 pm    Post subject: Gcc won't merge after switching to profile 23.0 Reply with quote

Hello,

I remember having some issues when I needed to switch to profile 23.0 from 17.0 and now gcc will not compile. I think I changed the CHOST and later changed it back.

Quote:
Linux DC1 5.4.150-bpi-r2+ #10 SMP Tue May 9 20:51:46 CEST 2023 armv7l ARMv7 Processor rev 3 (v7l) Mediatek Cortex-A7 (Device Tree) GNU/Linux



make.conf:
Quote:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.
CHOST="armv7a-unknown-linux-gnueabihf"
# NOTE: This stage was built with the bindist Use flag enabled

#PYTHON_TARGETS="python3_9"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
USE="-X acl bluetooth"
ACCEPT_LICENSE="@FREE"


Installing GCC gives the following error
Quote:
make[1]: *** [Makefile:24550: stage1-bubble] Error 2
which seems to indicate that GCC is not properly installed.

Code:
gcc-config -l


Quote:
* gcc-config: No gcc profile is active!
/usr/bin/gcc-config: line 104: /etc/env.d/gcc/config-armv7a-unknown-linux-gnueabihf: No such file or directory


After switching the profile I did a complete recompile of the system with emerge -E and saw GCC fail together with docker and decided it was a problem for future me.

I tried to reinstall the currently install GCC (13.2.1_p20240210) but it gives the same stage1-bubble error. What steps can I take to resolve this issue?

Thank you,
Frank.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1223
Location: Richmond Hill, Canada

PostPosted: Mon Aug 19, 2024 5:42 pm    Post subject: Reply with quote

frank0x01,

Quote:
COMMON_FLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"


Indicate you want to use soft-float,

Quote:
CHOST="armv7a-unknown-linux-gnueabihf"


Indicate your build server is hard-float.

As far as I know, this will require cross compile. The default will not work.
Back to top
View user's profile Send private message
frank0x01
n00b
n00b


Joined: 06 Apr 2023
Posts: 8

PostPosted: Mon Aug 19, 2024 5:50 pm    Post subject: Reply with quote

pingtoo

That makes sense as I was using cross-compile before. Any idea how I can resolve this? I don't want to use distcc anymore. Do I need to change the chost or the common flags?
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1223
Location: Richmond Hill, Canada

PostPosted: Mon Aug 19, 2024 11:42 pm    Post subject: Reply with quote

frank0x01,

If you want to have working gcc, then check /usr/armv7a-unknown-linux-XXXX.

your CHOST should match that.

Once you have working gcc, then if you still want a soft-float toolchain, you need cross-dev and may be setup chroot to build new rootfs.
Back to top
View user's profile Send private message
frank0x01
n00b
n00b


Joined: 06 Apr 2023
Posts: 8

PostPosted: Tue Sep 03, 2024 6:37 pm    Post subject: Reply with quote

To follow up on this issue, what I eventually did was to remove the softfloat references and to comment out the CHOST variable:


Quote:

COMMON_FLAGS="-O2 -pipe -march=armv7-a" # -mfpu=vfpv3-d16 -mfloat-abi=softfp"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.

#CHOST="armv7a-unknown-linux-gnueabihf"

# NOTE: This stage was built with the bindist Use flag enabled

#PYTHON_TARGETS="python3_9"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
#MAKEOPTS="-j25 -l4"
USE="-X acl bluetooth"
ACCEPT_LICENSE="@FREE"


After this it successfully merged gcc.

Quote:

gcc-config -l
[1] armv7a-softfp-linux-gnueabi-13 *
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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