Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing glibc-2.26-r6 inside chroot fails
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
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sat Feb 17, 2018 8:39 pm    Post subject: Installing glibc-2.26-r6 inside chroot fails Reply with quote

It fails with kernel too old coming from toochain-glibc.eclass because my host is running kernel 2.6.32. OK, I modify that eclass to not die, but then the glibc install fails because sln is not able to create symlinks: sln fails with "FATAL : kernel too old".

I pass --enable-kernel=2.6.32 to the configure and glibc still fails to install with the same error.

My running kernel for the gentoo install would be 4.9.x when it boots up on a VM. Its just that I don't have control over the kernel of the host where I am doing chroot into. That kernel is fixed to 2.6.32.

Anybody know how to build glibc with older kernels? Why did someone put this dumb check at build time anyway? It should only be dying at run time if the running kernel is old.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sat Feb 17, 2018 11:19 pm    Post subject: Reply with quote

Once you build glibc, you will install it. If the installed glibc is broken, you will no longer be able to use that system root. That encourages the glibc maintainers to take a very cautious view toward known glibc breakage.

Why not build an appropriately old glibc now, finish the install, and reboot into the modern kernel, then upgrade glibc from there?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Feb 17, 2018 11:42 pm    Post subject: Reply with quote

I understand you are installing Gentoo? Will it boot up with stage3 unpacked and your own kernel? Then you do not chroot for upgrade.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Feb 18, 2018 12:55 am    Post subject: Reply with quote

Let me describe the setup. I have a beefy host given by our IT to build a gentoo system as our distro for the product. The built gentoo system eventually boots inside a VM using 4.9.x kernel. The VM has no capabilities (2 vCPUs, 256MB of RAM) to build or update the packages. The rootfs is a read-only squashfs image.

The beefy host is a redhat system with 2.6.32 kernel. I have no control on this setup, and I can not update the kernel. I get into a chroot and build my gentoo there. Once built, I build a squashfs image and move it to the VM to boot the newly created image.

It is during the update that portage wants to update glibc from 2.25 to 2.26 and this kernel check is coming in the way.

Note that the running kernel for the built gentoo system is 4.9.x and hence not old. So, this check for kernel should have been for runtime, and not build time.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Feb 18, 2018 2:03 am    Post subject: Reply with quote

You've got a few options. Avoid glibc 2.26 entirely, fix glibc by hand to work on a ten year old kernel, create a build VM to do the job, find another physical box that isn't hopelessly out of date...

...or point out to your management that RHEL 6 is going to start costing them serious money unless they start taking action now for the approaching EOL. 30 months isn't a long time in the enterprise world.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Feb 18, 2018 3:49 am    Post subject: Reply with quote

Ant P. wrote:
fix glibc by hand to work on a ten year old kernel
like I said, glibc will be working on a 4.9.x kernel and not 2.6.32 kernel. Its only building there. I think there is a difference between building and running. What does glibc need from running kernel during build that can only be gotten using new kernel?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Feb 18, 2018 5:16 am    Post subject: Reply with quote

I think your first post addressed that question, at least indirectly. You are not only building glibc. You are also running it. If you were not running parts of it, the sln program would not fail on you during the install phase, because you would not be running the sln from the new glibc. While it might be possible to use the ancient kernel during the build, your existing failure shows it is not possible without patching glibc. You can update your kernel or you can patch sln (and possibly other things) not to require a new kernel.

I concur with Ant P. Your best practical bet is to mask >=sys-libs/glibc-2.26 until such time as IT provides a sane build environment.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Feb 18, 2018 8:58 am    Post subject: Reply with quote

Hu wrote:
I think your first post addressed that question, at least indirectly. You are not only building glibc. You are also running it. If you were not running parts of it, the sln program would not fail on you during the install phase, because you would not be running the sln from the new glibc. While it might be possible to use the ancient kernel during the build, your existing failure shows it is not possible without patching glibc. You can update your kernel or you can patch sln (and possibly other things) not to require a new kernel.

I concur with Ant P. Your best practical bet is to mask >=sys-libs/glibc-2.26 until such time as IT provides a sane build environment.
Masking is not an option, rest of the system is forcing it:

Code:
[blocks B      ] <sys-libs/glibc-2.26 ("<sys-libs/glibc-2.26" is blocking net-libs/rpcsvc-proto-1.3)                                                                           
...
 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.                 

  (net-libs/rpcsvc-proto-1.3:0/0::gentoo, ebuild scheduled for merge) pulled in by
    net-libs/rpcsvc-proto required by (app-emulation/open-vm-tools-10.1.15:0/0::gentoo, ebuild scheduled for merge)
    net-libs/rpcsvc-proto required by (net-fs/autofs-5.1.4:0/0::gentoo, ebuild scheduled for merge)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Feb 18, 2018 4:42 pm    Post subject: Reply with quote

Masking only sys-libs/glibc may not be an option. You might get somewhere if you mask more. (Yes, I am aware of the irony that I am actively advocating masking out new versions of multiple packages, which is in almost all cases the wrong solution on Gentoo. I think it is the wrong solution here, but since you cannot fix your kernel, it is the least bad option in my opinion.) For the output shown, you only need net-libs/rpcsvc-proto for the specific versions and flags picked elsewhere. Older app-emulation/open-vm-tools does not require it. Older autofs requires it conditionally, and can be disabled via USE flag.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 18, 2018 7:28 pm    Post subject: Reply with quote

devsk,

This is for a product. The IT department is supposed to be there to support products, not get in the way.
File a ticket and make a lot of noise. Someone will listen.

The downside is, you will get known to all the right people for all the wrong reasons.

Having said all that, set yourself up a target root, much like crossdev does.
You can run Gentoo on that out of date kernel and build things but not install them in the chroot, so you don't actually run them.
Portage is quite happy to install arm64 binaries on my amd64 box that way.
The target root will only contain the things than will be moved to the product.

FEATURES=buildpkgonly might be an option 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
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Feb 18, 2018 7:40 pm    Post subject: Reply with quote

@NeddySeagoon: This turned out to be harder than I initially thought but yeah, I am not going to fight the windmills any longer...:-) glibc folks have decided to move on, we should move on as well. I have put in a request for a brand new build env with newer kernel. Let's see how that goes.
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