MAKE, installing source packages, etc...can someone explain this or at least...
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
MAKE, installing source packages, etc...can someone explain this or at least...
lead me to a link that explains it?
Installing Linux wasn't that hard at all...it's when I started installing stuff on top of Linux that I really started getting lost. It seems like when I download these source packages, there's always a "configure" and a bunch of "make"s going on, but I have no understanding of what's going on behind the scenes.
I know that this is somehow looking at the "Makefile" in the package and compiling the source according to the specs, but I find myself asking questions like, "Did I unzip the .tar into the right directory before installing? Is this supposed to go here? Is MAKE going to put everything where it needs to go or do I need to move/link stuff? How does it know what libraries to search for this/that on my system? etc etc"
Can someone please break the whole open-source and make deal down for me? Or at least direct me to some documentation that describes it in layman's terms? I'm usually pretty quick with stuff like this, I've programmed before and understand the concept, but honestly, websites that package stuff like this usually just have a really simple install guide like:
"Unzip this file into the proper directory." Which is WHAT??
"Run ./configure" Which does what?
"Run make" Huh?? OK
"Run make install" OK uhh...am I 'done'? What now? And what did I just do?
I'm used to the Windows way of run the file, answer "Yes", and watch the scrollbar move. Even DOS programs installed simpler than this. But I DO want to learn...I just need a direction to look.
This is what most official Slack packages use and it keeps everything in a nice order on your filesystem. Not necessary but useful.
Also check out checkinstall. You run checkinstall instead of 'make install' and it will create a Slackware package and install it for you. This makes it easy to remove software later using pkgtool and makes a nice entry in /var/log/packages. checkinstall is in the extras/ directory on the Slackware CD.
squirrels; oh got depenedant on W, just like me but i,m letting go of all of
windows forever! like the challenge of learning linux and its whole open-source being. even programming and development. squirrels just give it up
come with us and linux.
The programming thing is a neat angle - I do a lot of development, and I find that once you understand the different parts of a program and how they're put together (compiling, linking, etc) you get a really good feel for what's going on in each stage.
Another really great reference is the manpages and info. Try "info make" and it'll show you how a makefile works. This is really good to know - sometimes you can edit makefiles to work better (though passing options to configure usually takes care of it nicely).
A source "tarball" is simply the collection of source code used to compile a program (including directory structure). They're typically named with an extension of ".tgz", ".tar.gz", or ".tar.bz2". The "gz" versions of the extensions means that the gzip utility was used to compress the file. The "bz2" means that the bzip2 utility was used for compression. When you unzip/untar the tarball you downloaded, the source code directory structure is created and the appropriate source code files are placed in each subdirectory. You then cd into the directory the tar command created to compile the source code.
The configure script is pretty much exactly what it sounds like. Keep in mind Linux runs on a wide variety of hardware including processors. When you run configure, essentially, the script analyzes your system to detect what is present or missing. There are explicit tests to find what the size of integers are (in bytes) or other computer-architecture-dependent things. That could make a difference on how the code should be compiled. Similarly, the script will test to make sure necessary libraries are installed to support the software you will compile. The configure script will croak if it encounters something it can't adjust for. It simply customizes the way the source code is compiled to make sure it will work with your system.
Running "make" is when you actually compile the software. The configure script modified the "Makefile" that you said you are familiar with. Essentially, a Makefile contains instructions regarding how to compile the software. It specifies the commands to run, the options for those commands, the files to include. Depending on the complexity of the software package, there may be a vast number of things that need compiling. When the make command finishes successfully, then you have a working executable, but it's not in the right place yet; it's not "installed" on the system.
Issuing the "make install" command is what will put the software you compiled into the proper place on your machine. Since a Makefile contains sequences of commands to execute, it can be used for things other than compiling. In this case, it's used to copy the executable, any man pages, libraries, or other files to the appropriate spot.. Once make install completes, the software has been installed on your machine. You should be able to run the new program just like any other.
One last thing to add... The configure script usually accepts a number of optional arguments. These arguments can specify anything from where to put the program when you run "make install" to completely disabling certain features in the source code. Each configure script can be different. So it's imperative to read any INSTALL file that omes with the tarball.
Now I have a question, how am I going to build a RPM package from source package? I need to do all the above steps and then build RPM or just can build directly RPM package from the source? What command should I use to build RPM package?
linmix; slow down impatience broods mistakes! patience is a virtue, practice
it. and you are right evetually you will run across any information either on cd or online even written. so slow down its there. welcome to linux we all
go through anxiousness but get through some how with patience!
Yeah, just go to www.mandrakelinux.com and click on the Doc link on the top - it's got a starter guide, a reference, and a command line link (plus you can get PDFs if you want).
Another really good reference is the alt.os.linux.* newsgroups, but be careful about what you post - there are some extremely knowledgeable Linux folks there, but there are also a lot of people who take pleasure in nitpicking. I'd strongly recommend just reading (lurking) for at least a week or two before you post. Make sure you find and read the FAQ for the groups as well - they've got some excellent answers to commonly asked questions, and the etiquette suggestions will avoid you getting flamed right out of the gate.