[SOLVED] Can I build a 64-bit kernel while in 32-bit?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I run 32-bit. I changed .config to built 64-bit. It errors out complaining about stackprotector support. Can I do this or must I download a built kernel?
multilib and using -m64 is what I found on the question, compiling 64bit on a 32bit platform.
I don't understand this answer. Those are gcc switches. I suspect that building in 64-bit may require 64-bit libraries to build with, perhaps other 64-bit support.
I don't understand this answer. Those are gcc switches. I suspect that building in 64-bit may require 64-bit libraries to build with, perhaps other 64-bit support.
let me check real quick, yep this is a Linux Forum, Linux default compiler is gcc. so yes, you need multilib and directive to tell it to compile for 64bit hence
What are multilib? Your lack in understanding basic terminology is the programming arena does cast a shadow on your ability to grasp basic things relating to programming in general. Research what is multilib, or what does a multilib system consists of? Not the kernel specifically.
You can't build the Linux kernel without a specific toolchain for the target system. The README file in the top level source directory will point you to the build requirements. Although it is technically possible to build on a 32-bit system, I think it will be much easier to boot a 64-bit live distro and do it from there.
I run 32-bit. I changed .config to built 64-bit. It errors out complaining about stackprotector support. Can I do this or must I download a built kernel?
there's a "stack canary" option you could try turning off
(i first saw that in win95 visual c++ 6.0 release. it's from microsoft. i wouldn't use it if you paid me. it's "speculative" and prevents this: a C program calling Pascal library routiines) (speculative: it checks the return and guesses if the value would be correct. it only is if programs are not allowed to load cross compatible libraries)
how it got in linux in the 2000's, is anyone's guess
HOWEVER - if your building using LFS (copies ubuntu setup kinda), ubuntu or other major distros: you might not get around it. there are many sidewinder "dependancies" built in to those things.
SUMMARY: try the option once if it doesn't work maybe you should get the pre-built one
Last edited by X-LFS-2010; 06-03-2018 at 09:18 PM.
You can't build the Linux kernel without a specific toolchain for the target system. The README file in the top level source directory will point you to the build requirements.
What exactly is in a toolchain? I assume gcc and its buddies, but what else? Do I need the 64-bit gcc & pals? The README in the kernel source does not point me to the build requirements.
Quote:
Originally Posted by smallpond
Although it is technically possible to build on a 32-bit system, I think it will be much easier to boot a 64-bit live distro and do it from there.
Hmmm... I just booted into 64-bit and get the same stackprotector error.
take a look into tutorials regarding "cross-compilation", that will most likely cover your issue too. But as written it might be easier to create a live-distro on a USB-stick and boot into a real 64bit system. Such a live-distro might come in handy later on (to chroot into the original system in case that anything goes wrong with the new kernel).
A toolchain, as the name implies, is a set of tools used in specific order (chain). For compilation, you need more than one tool like gcc and make and so on. The wording "toolchain" is used in every industry, and does not only mean "software".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.