Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stuck with gcc-4.9 - all emerge's fail
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
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Thu Apr 19, 2018 10:39 am    Post subject: Stuck with gcc-4.9 - all emerge's fail Reply with quote

I figured I would try to update a gentoo / mysql / apache / php / owncloud server I had sitting around. It's been untouched since august 2016.
I wanted to try this just for the purpose of getting the experience of using portage to do a major version update of owncloud. So I ran
Code:

emerge --sync
emerge -a owncloud


This pulled a lot of other updates - like mysql, php,... As this server has no other value to me than the ability to learn how to update an old server, I let the update run.

The problem was that I got these messages:
Code:

!!! Invalid news item: /usr/portage/metadata/news/2017-08-19-hardened-sources-removal/2017-08-19-hardened-sources-removal.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2018-04-08-radicale-2-requires-pre-install-migration/2018-04-08-radicale-2-requires-pre-install-migration.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-10-10-perl-5_26-update/2017-10-10-perl-5_26-update.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-12-26-experimental-amd64-17-1-profiles/2017-12-26-experimental-amd64-17-1-profiles.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2018-01-23-systemd-blocker/2018-01-23-systemd-blocker.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2018-01-30-portage-rsync-verification/2018-01-30-portage-rsync-verification.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-11-30-new-17-profiles/2017-11-30-new-17-profiles.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-10-04-gentoolkit-dev-deprecation/2017-10-04-gentoolkit-dev-deprecation.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2018-01-14-gnucash/2018-01-14-gnucash.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-04-10-split-and-slotted-wine/2017-04-10-split-and-slotted-wine.en.txt
!!!   line 6: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-11-21-old-wine-versions-moving-to-overlay/2017-11-21-old-wine-versions-moving-to-overlay.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2018-03-13-portage-rsync-verification-unstable/2018-03-13-portage-rsync-verification-unstable.en.txt
!!!   line 5: News-Item-Format: 2.0
!!! Invalid news item: /usr/portage/metadata/news/2017-07-16-systemd-rootprefix/2017-07-16-systemd-rootprefix.en.txt
!!!   line 5: News-Item-Format: 2.0

 * IMPORTANT: 15 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


Searches for "Invalid news items" led me to forum threads telling to run
Code:
emerge -a --update --deep --newuse @world


That led me to this result
Code:

....
make[3]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/build/gcc'
make[2]: *** [Makefile:4386: all-stage1-gcc] Error 2
make[2]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/build'
make[1]: *** [Makefile:18830: stage1-bubble] Error 2
make[1]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/build'
make: *** [Makefile:19162: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-6.4.0-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-6.4.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-6.4.0-r1::gentoo'`.
 * The complete build log is located at '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/temp/environment'.
 * Working directory: '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/build'
 * S: '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/gcc-6.4.0'
 *
 * Please include /temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/gcc-build-logs.tar.bz2 in your bug report.
 *

>>> Failed to emerge sys-devel/gcc-6.4.0-r1, Log file:

>>>  '/temps/var/tmp/portage/sys-devel/gcc-6.4.0-r1/temp/build.log'


Now I'm stuck, cause EVERY emerge command I now aborts with the message:
Code:

!!! The following installed packages are masked:
- sys-devel/gcc-4.9.3::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# MichaŠGórny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
# Matthias Maier <tamiko@gentoo.org> (21 May 2017)
# These old versions of toolchain packages (binutils, gcc, glibc) are no
# longer officially supported and are not suitable for general use. Using
# these packages can result in build failures (and possible breakage) for
# many packages, and may leave your system vulnerable to known security
# exploits.
# If you still use one of these old toolchain packages, please upgrade (and
# switch the compiler / the binutils) ASAP. If you need them for a specific
# (isolated) use case, feel free to unmask them on your system.
# (updated 27 Dec 2017 with gcc < 5.4)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


Where do I go from here?
Should I just conclude that I've learned never to touch a gentoo install that has been untouched for a while?

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Apr 19, 2018 11:11 am    Post subject: Reply with quote

petterg ...

you would need to updated sys-devel/gcc incrementally, because you would have to follow '2015-10-22 GCC 5 Defaults to the New C++11 ABI' for 5.4.0-r4 (also masked), and then '2017-11-30 New 17.0 profiles in the Gentoo repository' (see 'eselect news' for both of those news items).

You can use /etc/portage/package.unmask to unmask 5.4.0-r4, and possibly sys-devel/binutils will need the same treatment. Basically, focus on the tool chain, and once you're on the 0.17 profile you should be able to update the rest resolving any blocks as you go ... I'd suggest you do an '--emptytree --keep-going' rebuild of @system first (on 0.17), rather than the @world, as @world will more likely include the blockers. Any blockers ("B') will need resolved, and so you will need to workout what packages are blocking the upgrade path, you can then 'emerge --oneshot --ask foo bar' and hopefully resolve them as you go.

HTH & good luck ... khay
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Thu Apr 19, 2018 1:02 pm    Post subject: Reply with quote

Thanks
All though
Code:
emerge -av1 =sys-devel/gcc-5.4.0-r4

failed as well

Code:
xg++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
make[3]: *** [Makefile:1076: insn-recog.o] Error 4
make[3]: *** Waiting for unfinished jobs....
rm gcc.pod
make[3]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/build/gcc'
make[2]: *** [Makefile:4407: all-stage2-gcc] Error 2
make[2]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/build'
make[1]: *** [Makefile:18870: stage2-bubble] Error 2
make[1]: Leaving directory '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/build'
make: *** [Makefile:19085: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-5.4.0-r4::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-5.4.0-r4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-5.4.0-r4::gentoo'`.
 * The complete build log is located at '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/temp/build.log'.
 * The ebuild environment file is located at '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/temp/environment'.
 * Working directory: '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/build'
 * S: '/temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/gcc-5.4.0'
 *
 * Please include /temps/var/tmp/portage/sys-devel/gcc-5.4.0-r4/work/gcc-build-logs.tar.bz2 in your bug report.
 *

>>> Failed to emerge sys-devel/gcc-5.4.0-r4, Log file:



Is there any point in filing bugreport on this old stuff?

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Apr 19, 2018 1:38 pm    Post subject: Reply with quote

not really, but there's a point in submit the log file here if you want help. xg++ has been killed, probably out of memory, but it's error 4, so previous errors could had lead to this ; only the log will tell us.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Thu Apr 19, 2018 5:28 pm    Post subject: Reply with quote

petterg,

Code:
xg++: internal compiler error: Killed (program cc1plus)
That usually indicates you ran out of RAM+swap.
The build log and dmesg will tell more.

C++ is a memory hog. You need to allow 1G RAM per C++ thread.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Thu Apr 19, 2018 7:16 pm    Post subject: Reply with quote

Seems like a out of memory issue. Thanks
I gave it 4GB extra ram. It's now compiling
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Sun Apr 22, 2018 6:39 am    Post subject: Reply with quote

Gcc 5.4.0-r4 finished successfully.

I then ran
Code:

gcc-config --list-profiles
gcc-config 6
. /etc/profile
env-update && source /etc/profile

emerge -a1 sys-devel/binutils
emerge @preserved-rebuild


Do I need to do a system or world update before installing gcc 6.x?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30916
Location: here

PostPosted: Sun Apr 22, 2018 6:50 am    Post subject: Reply with quote

petterg wrote:
Do I need to do a system or world update before installing gcc 6.x?

No if you followed gcc5 news item, on gcc 6 there isn't abi change.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Sun Apr 22, 2018 8:30 am    Post subject: Reply with quote

If anyone run into the issue of invalid news items, I'd like to add that that issue went away after running, after installing gcc 5.4.0-r4

Code:

revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Sun Apr 22, 2018 2:53 pm    Post subject: Reply with quote

gcc-6.4.0-r1 is in. System is still running. Errors when running emerge is gone. This seems to have worked out well.
Currently running
Code:

emerge -a --update --deep --newuse @world

just to see how it goes.

Thanks for all your help
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Apr 22, 2018 3:13 pm    Post subject: Reply with quote

petterg wrote:
Currently running

Code:
emerge -a --update --deep --newuse @world

just to see how it goes.

petterg ... as I mentioned @system might have been a better target when updating after such a hiatus. You didn't mention changing to the 0.17 profile, which you'll probably want to do now you have gcc-6.4.0-r1.

Also, '--keep-going' is a good idea when you're doing '--empty-tree' (as advised for the 17.0 profile change), or any major update, as any non-critical build failures wouldn't then stop the update process.

best ... khay
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