Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Deleted zstd and broke my system
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
vasettoo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Nov 2012
Posts: 99

PostPosted: Thu May 09, 2024 5:08 pm    Post subject: Deleted zstd and broke my system Reply with quote

Hi, everyone! As the topics says, I'm in trouble with my gentoo... I inadvertently unmerged app-arch/zstd from my system and now can't even boot into it. I have tried the steps from 'Fix my Gentoo' wiki to buld binpkg and install it into the broken system but portage gives me error that can't find C compiler and thеrefore cannot create executables. Is it possile to fix it or should I reinstall from scratch?
Best regards.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu May 09, 2024 5:30 pm    Post subject: Reply with quote

vasettoo,

Its always possible to fix your Gentoo.
Depending on what you have done, fixing it may take longer than reinstalling but fixing it will teach you things about Gentoo that you will learn no other way.

We need to discover what broke. It sounds like more that just zstd as that should not stop booting.

There are two tests. Can you boot some live media, mount everything, then get into the chroot?
That will confirm that a few basics work.

When in the chroot, what does
Code:
gcc-config -l
show?


The other test is what is the error when you try to boot?
Post it verbatim please. An image on igmur, or something like that works too.
_________________
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
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2732

PostPosted: Thu May 09, 2024 5:30 pm    Post subject: Reply with quote

That sounds odd, it should've preserved libzstd.so.* and not be *that* broken (just no zstd executable), or did you lose that as well?

If so, getting libzstd.so.* back in /usr/lib64 is all you need for things linked against it (like gcc with USE=zstd) to work again.

The binpkg can be manually unpacked over as well (they're just tar archives), albeit it's better to just emerge zstd if restoring the library is enough to make things work again given unpacking doesn't record files and run pkg_* phases (still mostly goes back to normal after re-emerging over after though).

...albeit I'm not quite sure where the compiler comes in if we're talking about a binpkg, doesn't sound like you were emerging the binpkg. If making a binpkg be sure not to use the default zstd compression for it too :)

Edit: albeit hard to say what's going on really, may be good to check the config.log for the real error, can you compile anything at all? e.g.
Code:
gcc -o /tmp/output -x c - <<<"int main(void) { return 0; }"
Back to top
View user's profile Send private message
vasettoo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Nov 2012
Posts: 99

PostPosted: Fri May 10, 2024 2:50 pm    Post subject: Reply with quote

Ionen wrote:
...albeit I'm not quite sure where the compiler comes in if we're talking about a binpkg, doesn't sound like you were emerging the binpkg. If making a binpkg be sure not to use the default zstd compression for it too :)
...

Stupid me - I've built it with the missing zstd library... After going back and setting BINPKG_COMPRESS="lz4" and chroot-ing into the broken install zstd is back!
But... initially my problem was building initramfs with genkernel which failed on error about missing libzstd - some linking went wrong I suppose. Now trying to build only kernel and modules... Hopefully it will boot.
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