View previous topic :: View next topic |
Author |
Message |
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Mon Jan 08, 2018 3:59 pm Post subject: Intel N3540 [solved] baytrail patch and careful with revdep |
|
|
[Moderator note: this post and its first three responses were originally attached to the five year dead thread Correct / safe cflags for core i5 3450, but had no apparent reason to be there. This post had no title of its own, but all threads require a title, so this one was arbitrarily named after the poster's CPU. -Hu]
..carefull with revdep-rebuild.
If you found that thread through your favorite search engine and have some kind of issue i posted here. Jump to Post of that threat from Mi Jan 10, 2018 7:49 pm to get a summary what caused the trouble. And hopefully the links discussed here will save you some time or some trespasses.
So i crashed my System Yesterday.
Intel CPU-Spezifikation N3540 (german link).
Not sure WHAT i did which caused the problem.
Steps i did:
1. I emerged gcc 6.x
1a Switch gcc to 6.4.
1b. I emerged Libtool
1c. revdep-rebuild --library 'libstdc\+\+.so.6' -- --exclude gcc
But that had nothing to do (i hoped i did miss spell the command cause i tipped it Manual via Keyboard instead of copy it.).
2. I switched to profile 17.x
3. I installt Kernel 4.14.11, because of Meltdown (just in case did not checked if the CPU is affected).
4. Reboot
So at that point everything seems to be fine.
5. Try emerge -u system. But got a Block about keyutils and man-pages, so i removed:
- emerge -C sandbox
- emerge -C sys-apps/keyutils
- emerge -C mit-krb5
I noticed that sandbox was in the block too, not sure why on my other systems that was not the case during that update. I think it was because i updated the Notebook a long time ago (three or four Month?).
6. emerge -u man-pages
At this Point something run through too and keyutils got emerged too.
7. Because the news told me i removed the other gcc-Versions.
8. Because (glsa-check -p $(glsa-check -t all) told me that webkit-gtk 2.x was insecure, i removed it with emerge -C.
At this Point my issues start! I think i has to do with removing the old gcc-Versions..
9. At the Try to install net-libs/webkit-gtk-2.18.4, i got errors about ld missing libsandbox.so and a wrong ELFCLASS32.
10. Try to rebuild emerge -e system. At that Time the errors with PRELOAD and libsandbox missing and wrong ELFCLASS did not fix and the System got fully broaken. Emerge was gone and portage was gone and i try to fix Portage but the Howto did not work.
In the End i shut down the running system because i had no more time (need sleep!) and the errors seems to went just worth. The Fixing broken portage Wiki, seems to be not up to date with the profile 17.x.
Especially the Step where i delete portage maybe was another next fail-step. # rm -rf /usr/lib/portage/*.
Known Errors on my side:
In /etc/portage/make.conf
Quote: | +PYTHON_SINGLE_TARGET[color="red"]S[/color]="python3_4" |
I misspell PYTHON_SINGLE_TARGET in my make.conf.
Right now The System do not boot because the Kernel Crash (Kernel Panic) at the point it handle over to start systemd.
Solution: I will reboot a Live-CD, mount my system and install a strage 3 and rebuild the System.
But i have a question. What kind of stage 3 ebuild should i use? Because this Processer is a arm one isn't it? Or should i use a normal amd64?
Suggestions are Wellcome!
And Maybe if someone could suggest what error i made.. i think that would be good for everyone running Gentoo on that CPU and maybe run to that possible Bug too?
Edit: Seems like a normal Intel 32 bit and 64 Bit Architecture, so i will use amd64.
By the Way,
Last edited by ChrisJumper on Wed Jan 10, 2018 8:30 pm; edited 2 times in total |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Mon Jan 08, 2018 6:54 pm Post subject: |
|
|
Hi, i tried the stage3 and chroot into the system to bring it back to life.
But this did not work. Seems like the tar Command did not overwrite the profile setting oder not existing files. However i used the follow Cflags:
Code: | CFLAGS="-march=atom -mtune=atom -fexcess-presicion=fast -O2 -pipe"
MAKEOPTS="-j3"
CHOST="x86_64-pc-linux-gnu" |
emerge-webrsync did not work because it could not find portageq.
gcc-config did not work:
Code: | # gcc-config
/usr/bin/gcc-config: line 19: /lib/gentoo/functions.sh: No such file or directory
gcc-config: Could not source /lib/gentoo/functions.sh! |
Code: | # eselect profile list
!!! Error: get_repos failed
!!! Error: Failed to get a list of valid profiles exiting |
Code: | # python -V
#
# python --version
#
(Nothing) |
Code: | eix python
eix: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory |
And now.. what should i do next?
Get Binary packages for the toolchain?
Or try to set my profile right (back to 2016?).
Or try to use stage3 ARM instead of AMD64?
Edit: Ok i tried tinderbox.dev.gentoo.org Packages of python. Since i have no working Version installed. I think amd64 are the wrong one because:
Code: | # emerge --help
/usr/bin/emerge: no supported Python implementation variant found! |
So i try arm64 and hope that will work.
Update: It does not. Seems like a /usr/lib/python bug i cant find a Version of python (tinderbox) that works with my System. arm64 tinderboxes seems to be the right decision, but something did not work. So my next try is to install a stage3 arm64 package. But the latest i found was from 20. Dezember 2016. Whish me good luck! :/
Update: Ok ARM64 did not work too. Chroot failed with: /bin/bash Exec Format error.
So i will give stage3 systemd amd64 from 3. january another shot.
And if that did not work, i backup my user files and some config. Delete nearly all other stuff and try like a fresh installation.. ;D
But that time i change chost to the CFLAGs suggested in this thread. |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Mon Jan 08, 2018 10:14 pm Post subject: |
|
|
Is it possible that there are some Browser-Advertice Attacs on Meltdown running and my Ubuntu Live CD is corrupt (linux 4.13.0.16 Ubuntu)?
Or that the Gentoo.org Cloud Servers or Cloud-Drives are unter Attac? Because i download with slow speed (150kb/sec) and the amd64 stage3 systemd tar.bz2 from 20180103 had twice the same missmatch in sha512.
Because i got twice the same i thought, ok maybe someone forgot to update the DIGEST File. Try to use the stage3 but the System...
OH NO!
I forgot that the N3450 need a Patch to Run without issues (!) using normal behaviour will cause in random junk produce by the CPU.*** Fuck You Intel! I thought all Live-CDs use that patch because its a known issue of that CPU. Here is the Patch PATCH.
*** I am not sure about that point, it could be just that the system freeze randomly. But my theories fits the case with the wrong checksums through the file download and extraction.
And i am wonder why i can't do a clean chroot or installation..
Update: Ok. After using that patch the Downloaded file stage3-amd64-systemd-20171228.tar.bz2 have the right checksum and extracts fine. Chroot works know again but emerge still did not work.
Code: | # emerge -av1 --usepkg portage --root /mnt/real_root
/usr/bin/emerge: line 11: from command not found
import: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory
/usr/bin/emerge: line 14: try:: command not found
/usr/bin/emerge: line 15: from: command not found
/usr/bin/emerge: line 16: except: command not found
/usr/bin/emerge: line 17: syntax error near unexpected token '('
/usr/bin/emerge: line 17: EPYTHON = os.path.basename(sys.executable)' |
Repairing this shit is a mess. All about /usr/lib and that it did not point to /usr/lib64. however python have still issues. I linked /usr/bin/python to /usr/lib64/python3.6m and copy some files /usr/lib64/gcc/ to /usr/lib64/. However emerge did not work because it cares for a DISPLAY (wtf?). So adjust /etc/env.d/gcc//x86_64-pc-linux-gnu-6.4.0 its LDPATH because it looks for /usr/lib/gcc but the files it was looking for are in /usr/lib64/gcc ....
And now. I delete /sbin /bin /usr/bin and try to get through that by extracting the stage3 again.. because i just want emerge working that i can emerge some stuff!
Deleting that and deleting /etc/profile and /etc/env.d that too and extract the stage3 again did the trick!
Edit2: Oh i hope that this system will not run in that error again.
First i did update portage to 2.3.13-r1 again and now it starts automagically to remove 147 packages. But hey, i did not touch the world file and maybe the system/stage3 did not update it and knows that some files on sbin and /usr/bin are missed.
However it runs fine...
Edit3: Until it finished its UNEMERGE! emerge portage in it stable Version 2.3.13-r1, seems to trigger an unemerge of /usr/bin/python-exec2c and crash the system.
So i will leave chroot. Delete /usr/portage and re-unzip the stage3 and then mask portage 2.3.13 and emerge 2.3.8.
I will report later... |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Tue Jan 09, 2018 3:29 am Post subject: |
|
|
Every emerge try to kill my system. Because auto-cleaning Packages start to remove many files after emerge some trival package.
Rebuild the World-File solve that..:
Code: |
cp -p /var/lib/portage/world{,.bak} && emaint --fix all |
However. I cant emerge python-exec due to some blocks right now. The system is still not up to date, so i think all my issues be solved soon. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Wed Jan 10, 2018 3:35 am Post subject: Re: Intel N3540 |
|
|
ChrisJumper wrote: | 5. Try emerge -u system. But got a Block about keyutils and man-pages, so i removed:
- emerge -C sandbox | This is almost always a bad idea. You should never unmerge sandbox. ChrisJumper wrote: | At this Point my issues start! I think i has to do with removing the old gcc-Versions.. | Based on the errors you paraphrased, it is more likely related to removing sandbox. ChrisJumper wrote: | i try to fix Portage but the Howto did not work. | In what way did it not work? What did you see that led you to that conclusion? ChrisJumper wrote: | In the End i shut down the running system because i had no more time (need sleep!) and the errors seems to went just worth. The Fixing broken portage Wiki, seems to be not up to date with the profile 17.x. | While possible, I think that a bit unlikely. If you provide specific error messages, we can evaluate that. ChrisJumper wrote: | Known Errors on my side:
In /etc/portage/make.conf
Quote: | +PYTHON_SINGLE_TARGET[color="red"]S[/color]="python3_4" |
I misspell PYTHON_SINGLE_TARGET in my make.conf. | Aside from rendering the setting ineffective, that should be harmless. ChrisJumper wrote: | Right now The System do not boot because the Kernel Crash (Kernel Panic) at the point it handle over to start systemd.
Solution: I will reboot a Live-CD, mount my system and install a strage 3 and rebuild the System. | Why not fix the specific problem, rather than reinstalling everything? ChrisJumper wrote: | But i have a question. What kind of stage 3 ebuild should i use? Because this Processer is a arm one isn't it? Or should i use a normal amd64? | I am not aware of any arm or arm64 CPUs from Intel. You most likely want an amd64 stage. ChrisJumper wrote: | Is it possible that there are some Browser-Advertice Attacs on Meltdown running and my Ubuntu Live CD is corrupt (linux 4.13.0.16 Ubuntu)? | Possible, but not likely. |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Wed Jan 10, 2018 7:49 pm Post subject: |
|
|
Thank you Hu for merging the Topic!
After hours of a fresh new-Installation i think i found the the source of the bug.
I switched the profile and gcc to gcc-6.4.0 and typed the follow revdep-rebuild command instead of copy and paste.
Code: | # revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc |
I am not sure if i missed it up with a false wiki-Version of that tutorial that used a Version with escape Sequences for the plus (# revdep-rebuild --library 'libstdc\+\+.so.6' -- --exclude gcc), or if i used the wrong quotation marks ' instead of '.
However. The wrong revdep-rebuild Command said "Nothing to do its all fine" and Autoclean started the next emerge to removed python-exec and some other 130 or more Packages.
Would be nice if someone could discern that kind of bug in autoclean or in revdep-rebuild. Just to put a Information string if the wrong command is used or if the libstdc++ is unknown. Or revdep-rebuild try to check an invalid library.
Normally emerge ask and put a warning if someone try to remove python-exec and in any case, autoclean should never take the system in a crash-state.
I am a little sad that i did not make a backup from that system or state and checked the logfiles to create a reproduce able bug-report. But i had at every step not the foresight to end up in an unboot able system!
Another possibility to resolve this kind of issue could be an automatism if you change the compiler to run the revedp-rebuild afterwards automatically. Or just ask if you want it... maybe just that emerge know if you have a long time-span between the rebuild of gcc (and a new version), instead of the first update of gcc. It should be trivial to handle that nearly automatic in the dependency.
However. I hope that i remember that issue long enough to avoid that issue the next time. But it would be really comfortable if other will never run into an issue like that!
However. This Topic is solved for me!
Just another question maybe: I installed from the tinderbox a dev-lang/portage Version 3.3, and have the remains now in my system. What is the best way to remove them?
An overlay an install an old python-3.3.X and just unemerge it later or is there something like python-updater that clean that old Version?
The thing is... python-3.3 is no longer in the official tree.
Hu wrote: | In what way did it not work? What did you see that led you to that conclusion? |
The question was why the portage-fixing howto did not help.
Something that did not help was about that part:
Code: | root #cd /root/portage-recover/portage-2.2.7
root #rm -rf /usr/lib/portage/*
root #cp -R pym bin /usr/lib/portage/ |
emerge did not work afterwards and python -v just did not work as suggested.
However at that point of check i did not know that the issue was an unemerged python-exec!
So i tried to use eselect python but it did not bring python back. The first time i tried tinderbox arm files. Which did not work! The CPU i got was an ATOM and not a ARM64. But i was not aware of it or of the differences. Intel says it just used amd64 Code, but in the first try amd64 tinderbox did not work too. Or i had no python-exec package and just try to use a type of dev-lang/python-3.
And even if there where the pym and bin files copied over in /usr/lib/portage the shell did not found the emerge command as usual. So that's why it did not work. Without python-exec thats no rocked science. Would be nice if the fixing portage wiki just ask to check if python-exec is missing. Using the tinderbox in the first place might be to rakish for that kind of tutorial. However would be nice if sometimes a binary version backup and "time machine" would be integrated into portage in the future by default. ;)
It should work if autoclean had not remove sandbox and other packages and leave my emerge unusable.
That was the point which i could not foreseen. Did not expect that emerge damage itself so easy and without further warnings.
I thought first that it was a fool protage.
The first reboot into chroot, protage did not work as expected after extract the stage3, that was because i used tinderbox (ARM!) portage Versions before i think, and the stage3 extraction did not overwrite all files or got a hickup with some library files that are for a wrong architecture. I used arm and an deprecated arm64 stage3 file from December 2016.
Just because i missed the tinderbox amd64 python-exec before, or it was not on the tinderbox server. OR the first time of stage3 extraction amd64, was bad because the check-sum was wrong, because of the baytrail-CPU Bug. Or a fool download anyway. But i done that twice and the download had the same checksum.
That was a bit wired. Could be a bad stage3 version on download.gentoo.org too.
And here too, i did not document that because the packages got lost after rebooting the live CD Today. I just need a better documentation by myself.
Thank you for your interest Hu and a happy new Year 2018. :)
Edit: By the Way, the solution to delete /sbin /usr/bin and /usr/lib/ was some kind of worsted, because portage have some packages in its database as "installed" but because they are missed now (because i deleted them directly), was really bad. Right now i have to reemerge them by Hand or a batter Way would have been to delete the installed Packages and World-File in the first place and create a fresh start of portage. But i missed that they are stored in /var/lib..
So the better step would be. Backup Home and the configuration files and delete and format the hard drive and do some normal installation with restore the home directory later. Or the best way: Have full disk Backups as insurance. Its some kind of curse to have chroot tool as possibility to rebuild everything. |
|
Back to top |
|
|
|
|
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
|
|