LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install gcc and glibc? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-gcc-and-glibc-4175623892/)

Unturned3 02-17-2018 12:44 AM

How to install gcc and glibc?
 
Hello,
I am trying to install glibc and gcc onto my custom minimal Linux system (4.x kernel + busybox). Here's the problem that I ran into:

- installing glibc and gcc requires make to be installed
- but when I tried to install make, the installer script complained that no compiler is available on the current system in order to build make.
How can I install these onto my system? I am quite new to dealing with shared libraries, cross compiling, and these stuff.

Thanks in advance! Any help would be appreciated.
-- Richard

EDIT: I confused make with cmake xD

hazel 02-17-2018 02:10 AM

You certainly do not need cmake to use make or to create gcc. However you do need gcc to create gcc! I assume you have a host system which you used to build your kernel and busybox. You need to use that host to build a set of compilation tools to go with them.

I suggest that you start by creating a vanilla Linux From Scratch, following the book exactly, to give you a grounding on how this kind of thing is done. Then you can try a more customised version, using busybox instead of bash+coreutils. I know that some LFS regulars do use busybox, so you ought to be able to find help on their mailing list.

AwesomeMachine 02-17-2018 02:46 AM

Well, you need make to use cmake, not the other way around. Exact error messages might be nice. Compiling gcc and glibc from source shouldn't involve cmake at all. How are you installing these packages?

sundialsvcs 02-18-2018 08:30 AM

The Linux-From-Scratch instructions show you exactly how to do this, and they're one of the few who do.

Since the process "from scratch" is quite time-consuming, if you simply want a newer version and can get it from a pre-built package, by all means do so. glibc is very fundamental to the operation of the entire system: "hose that, and you'll be hosed for a good long while." :tisk:

Unturned3 02-19-2018 09:14 AM

Sorry I confused "cmake" with "make" :p
Yes I definitely should look into Linux From Scratch in detail, especially the bit about compiling things from scratch and the libc part.
Just wondering, is there a precompiled gcc package available for x86_64 somewhere?

Thanks for helping guys!

hazel 02-19-2018 10:42 AM

Quote:

Originally Posted by Unturned3 (Post 5821591)
Sorry I confused "cmake" with "make" :p
Yes I definitely should look into Linux From Scratch in detail, especially the bit about compiling things from scratch and the libc part.
Just wondering, is there a precompiled gcc package available for x86_64 somewhere?

Lots and lots of them! The problem is that they all belong to various distros and the build has been carefully crafted to run in that environment. gcc is one of the most configurable programs in the whole of Linux.


All times are GMT -5. The time now is 11:22 PM.