LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 06-05-2007, 03:23 AM   #1
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Rep: Reputation: 0
Compiling questions


Is there a faq, readme, website, or book that anyone might recommend to help someone learn about compiling programs?

When I have searched in the past for info, I find little bitty pieces of info that say type this and type that and it should work. For the mainstream programs (which I already have working fine in Windows) that usually works, but so many programs I'm interested in won't compile with just a few steps. I want to get an understanding of what I'm really doing when I'm going through the steps of compiling a program. I'm hoping it doesn't mean that I have to learn c++: It's so foreboding. (Yeah, I can say that yet have no problem modding games, go figure)

I've learned that programs that have been compiled with ICC run much better on my machine than GCC. I learned this well with Mame32Plus! on Windows before they stopped releasing ICC compiled binaries. The problem is, I have no idea how to make something compile using those standards (I know, my terminology is totally wrong on that). The main thing that drives me to use linux is the ability to have programs that run as efficiently as possible on my machine. That is not a real option in Windows, especially considering that I have a 64bit processor--unless I want to run a DRM Spyware machine, Vista, which I hope I never do--but even then, the programs would have to be compiled in windows then, and the amount one needs to go through in windows to do that is really not worth one's time--and why? LOL run something compiled efficiently on an OS that's the definition of inefficient (Vista)?

So--again, if anyone can steer me in the right direction, that would be great.
 
Old 06-05-2007, 03:34 AM   #2
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
Linux distros have lots of documentation, and inside every source package there is some README, NEWS and INSTALL files to read, and once unpacked and you have a terminal or root shell open within that directory of source you want to compile always run ./configure --help to gather any other pertinent information...

and if you must spend money on books about the topic...
http://www.oreilly.com/
 
Old 06-05-2007, 03:49 AM   #3
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Rep: Reputation: 31
Learning LFS = Learning to compile
Goto http://www.linuxfromscratch.org
 
Old 06-05-2007, 04:12 AM   #4
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Okie
Linux distros have lots of documentation, and inside every source package there is some README, NEWS and INSTALL files to read, and once unpacked and you have a terminal or root shell open within that directory of source you want to compile always run ./configure --help to gather any other pertinent information...

and if you must spend money on books about the topic...
http://www.oreilly.com/
When it comes to ./configure, the information that --help gives me has never helped me. It's just always made me more confused about the whole thing. If I recall correctly, it gives me this HUGE list of options that I have no idea how to use--I can try to follow the whole USAGE guidelines, but compiling takes several steps. I sure don't remember it telling me the steps, I had to search for that on websites--the --help just says how to use ./configure. I'm looking for something that goes into detailed explanations.

What would I search for in the documentation?

What book in particular would you recommend? Oreilly has a lot of books available.

Oh no, I'm already getting frustrated and overwhelmed again and I don't even have it installed yet. Why do I stress over this so much?

Quote:
ghostdev85 Learning LFS = Learning to compile
Goto http://www.linuxfromscratch.org
I cannot find a chapter on compiling programs. I'm not reading a whole book just to find something that's on a couple pages, or, with the luck I've had in the past, just a couple sentences. This is the problem I normally run across when trying to get this kind of info.

I'm ONLY looking for information about compiling. I am not a step by step learn everything about an OS via book kind of guy--I need to find info about the things that I'm interested in. I have a really short attention span, so if it takes me everywhere other than the info I'm looking for, I might as well be reading the same text line over and over again, because once my mind is paying attention to one thing, I can't concentrate on something unrelated.
 
Old 06-05-2007, 04:20 AM   #5
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ghostdev85
Learning LFS = Learning to compile
Goto http://www.linuxfromscratch.org
Actually, I need to ask--don't you think that's a little strange? I was asking about compiling and you send me to a generalized book that goes into almost every aspect of linux. Do you understand my confusion in your decision to guide me in this direction?

I appreciate help, but this is not helping me. This has almost made me give up again before I've even installed it. Here, tell me this isn't overwhelming:

Quote:
Table of Contents

*
Preface
o Foreword
o Audience
o Prerequisites
o Host System Requirements
o Typography
o Structure
o Errata
*
I. Introduction
o
1. Introduction
+ How to Build an LFS System
+ What's new since the last release
+ Changelog
+ Resources
+ Help
*
II. Preparing for the Build
o
2. Preparing a New Partition
+ Introduction
+ Creating a New Partition
+ Creating a File System on the Partition
+ Mounting the New Partition
o
3. Packages and Patches
+ Introduction
+ All Packages
+ Needed Patches
o
4. Final Preparations
+ About $LFS
+ Creating the $LFS/tools Directory
+ Adding the LFS User
+ Setting Up the Environment
+ About SBUs
+ About the Test Suites
o
5. Constructing a Temporary System
+ Introduction
+ Toolchain Technical Notes
+ Binutils-2.16.1 - Pass 1
+ GCC-4.0.3 - Pass 1
+ Linux-Libc-Headers-2.6.12.0
+ Glibc-2.3.6
+ Adjusting the Toolchain
+ Tcl-8.4.13
+ Expect-5.43.0
+ DejaGNU-1.4.4
+ GCC-4.0.3 - Pass 2
+ Binutils-2.16.1 - Pass 2
+ Ncurses-5.5
+ Bash-3.1
+ Bzip2-1.0.3
+ Coreutils-5.96
+ Diffutils-2.8.1
+ Findutils-4.2.27
+ Gawk-3.1.5
+ Gettext-0.14.5
+ Grep-2.5.1a
+ Gzip-1.3.5
+ M4-1.4.4
+ Make-3.80
+ Patch-2.5.4
+ Perl-5.8.8
+ Sed-4.1.5
+ Tar-1.15.1
+ Texinfo-4.8
+ Util-linux-2.12r
+ Stripping
+ Changing Ownership
*
III. Building the LFS System
o
6. Installing Basic System Software
+ Introduction
+ Preparing Virtual Kernel File Systems
+ Package Management
+ Entering the Chroot Environment
+ Creating Directories
+ Creating Essential Files and Symlinks
+ Linux-Libc-Headers-2.6.12.0
+ Man-pages-2.34
+ Glibc-2.3.6
+ Re-adjusting the Toolchain
+ Binutils-2.16.1
+ GCC-4.0.3
+ Berkeley DB-4.4.20
+ Coreutils-5.96
+ Iana-Etc-2.10
+ M4-1.4.4
+ Bison-2.2
+ Ncurses-5.5
+ Procps-3.2.6
+ Sed-4.1.5
+ Libtool-1.5.22
+ Perl-5.8.8
+ Readline-5.1
+ Zlib-1.2.3
+ Autoconf-2.59
+ Automake-1.9.6
+ Bash-3.1
+ Bzip2-1.0.3
+ Diffutils-2.8.1
+ E2fsprogs-1.39
+ File-4.17
+ Findutils-4.2.27
+ Flex-2.5.33
+ GRUB-0.97
+ Gawk-3.1.5
+ Gettext-0.14.5
+ Grep-2.5.1a
+ Groff-1.18.1.1
+ Gzip-1.3.5
+ Inetutils-1.4.2
+ IPRoute2-2.6.16-060323
+ Kbd-1.12
+ Less-394
+ Make-3.80
+ Man-DB-2.4.3
+ Mktemp-1.5
+ Module-Init-Tools-3.2.2
+ Patch-2.5.4
+ Psmisc-22.2
+ Shadow-4.0.15
+ Sysklogd-1.4.1
+ Sysvinit-2.86
+ Tar-1.15.1
+ Texinfo-4.8
+ Udev-096
+ Util-linux-2.12r
+ Vim-7.0
+ About Debugging Symbols
+ Stripping Again
+ Cleaning Up
o
7. Setting Up System Bootscripts
+ Introduction
+ LFS-Bootscripts-6.2
+ How Do These Bootscripts Work?
+ Device and Module Handling on an LFS System
+ Configuring the setclock Script
+ Configuring the Linux Console
+ Configuring the sysklogd script
+ Creating the /etc/inputrc File
+ The Bash Shell Startup Files
+ Configuring the localnet Script
+ Customizing the /etc/hosts File
+ Creating custom symlinks to devices
+ Configuring the network Script
o
8. Making the LFS System Bootable
+ Introduction
+ Creating the /etc/fstab File
+ Linux-2.6.16.27
+ Making the LFS System Bootable
o
9. The End
+ The End
+ Get Counted
+ Rebooting the System
+ What Now?
*
IV. Appendices
o A. Acronyms and Terms
o B. Acknowledgments
o C. Dependencies
*
Index

* Next

Preface
I was asking about compiling. Not all this.

Again, I appreciate the gesture of help.

Last edited by Kizzume; 06-05-2007 at 04:41 AM.
 
Old 06-05-2007, 04:37 AM   #6
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Rep: Reputation: 31
I never said that its gonna be easy... But that is by far the best source I feel that would teach the ./configure stuffs...
 
Old 06-05-2007, 04:46 AM   #7
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ghostdev85
I never said that its gonna be easy... But that is by far the best source I feel that would teach the ./configure stuffs...
But that's a source for everything, not compiling. It's all separated--even Make is separated from everything else.

That's like giving a child a book on how to build a house when he's asking how to screw in a light bulb.

Again, I appreciate the gesture of help, but this is just plain silly.
 
Old 06-05-2007, 05:13 AM   #8
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
I already have 3 books on linux--about $150 total for the 3 of them. I haven't been able to get through them, not even 1/5 of the way through any of them. They give so much information on things I'm not ready to digest, and too little info about things I really want to know about. With one of them, about 30 pages in I threw it at the wall so hard it caused a large dent in the wall that I had to re-plaster later.

I don't learn things in the same order as most people. When I try, I become confused and frustrated. When I learn things in the order of my interest, I learn quicker than most people I know.

I'm obsessive compulsive and have ADHD. I just want to know about compiling.

Can anyone give me just information (or guide me to books or websites) about compiling? Pretty please?

Thanks.
 
Old 06-05-2007, 05:53 AM   #9
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
I'm getting the feeling you are a little bit overdemanding and at the same time underspecifying your problem.

You ask "please give me info on compiling". There's lots of info available, and different programs tend to be compiled differently. You have not specified which program you are trying to compile and why you are having difficulties.

When given a description on how to compile "everything", you are not happy. It is "too much". Yet you provide no clues on how to reduce the pile of info.

At the same time you ask us to work around your limitations ('short attention span') and adapt to your personal learning preferences. It seems like you're letting us do all the work ;-)

Also, your analogy is plain wrong. You're not asking to screw in a light bulb. You're saying: "On the subject of building a house, how do I do X", without properly specifying what X is. This is begging to get a manual to build the entire house with a comment "please flip to the chapter you like", and this is what you got.

Sorry for ranting, but posts like yours tend to get on my nerves, because they make helping you all the more difficult.

Groetjes,

Kees-Jan
 
Old 06-05-2007, 06:22 AM   #10
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Here's a specific list, with links to the exact files:

Vice c64 emulator
http://www.zimmers.net/anonftp/pub/c...ce-1.21.tar.gz

Frodo c64 emulator
http://frodo.cebix.net/downloads/FrodoV4_1b.Src.tar.gz

Mame32plus! This one may not even work in linux--I don't know yet. The other alternative is to get regular mame and get the separate gui.
http://www3.emu-zone.org/host/mamepl...u3-20061019.7z

CheeseTracker (I've never used it, I've wanted to try it)
http://sourceforge.net/project/downl...ar.gz&51887651

This is a small list of programs I'm interested in. Hopefully this gave specific enough of examples.

Thanks.
 
Old 06-05-2007, 06:23 AM   #11
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,477
Blog Entries: 7

Rep: Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575Reputation: 2575
Quote:
Originally Posted by Kizzume
With one of them, about 30 pages in I threw it at the wall so hard it caused a large dent in the wall that I had to re-plaster later.
Oh dear. Having read more than a few of your posts today, I don't think Linux is for you. You're not patient enough. You want it all to work from the GUI. You can't read instructions because they frustrate and confuse you.
Quote:
Originally Posted by Kizzume
I'm obsessive compulsive and have ADHD.
That being the case, why are you putting yourself through all this pain? Linux is what it is. It isn't going to change for you, no matter who you are or what you want. If you can't tolerate it for what it is, then you probably should steer clear for your own sanity and that of those around you.
Quote:
Originally Posted by Kizzume
Can anyone give me just information (or guide me to books or websites) about compiling?
GIYF: http://www.google.com.au/search?hl=e...G=Search&meta=

Patience is a virtue.
 
Old 06-05-2007, 06:35 AM   #12
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
compiling source code is always going to be a little different on different distributions...

running ./configure will set parameters in the Makefile, and if & when it encounters errors or dependency problems it will spit out this information at the end of its run, make will also spit out any errors or unmet dependencies, and if all goes well it will be successful and install & run perfectly...

compiling source code is sort of like flying by dead reckoning (as you do it just pay close attention to detail and be prepared to do deal with circumstances as they occur)...

Last edited by Okie; 06-05-2007 at 06:49 AM.
 
Old 06-05-2007, 06:37 AM   #13
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rkelsen
Oh dear. Having read more than a few of your posts today, I don't think Linux is for you. You're not patient enough. You want it all to work from the GUI. You can't read instructions because they frustrate and confuse you.
I can read instructions just fine if it's pertaining to what I'm looking for. If I have to read 100 pages of things that are unrelated to what I'm looking for, then yes, you're right, I do not have the patience.
Quote:
That being the case, why are you putting yourself through all this pain? Linux is what it is. It isn't going to change for you, no matter who you are or what you want. If you can't tolerate it for what it is, then you probably should steer clear for your own sanity and that of those around you.

GIYF: http://www.google.com.au/search?hl=e...G=Search&meta=

Patience is a virtue.
Even though it was just a google search, it has brought up much more helpful results than the last time I tried searching in google for it. I found a very informative page on http://www.aboutdebian.com/compile.htm

I do not have very much money. It's probably going to be a long time before I do. I know the time will be coming soon when Vista-only programs will start to peek out of the woodwork and some of the programs I use will eventually no longer be available for XP. I won't touch vista with a 10 foot pole, and I certainly can't afford the price-gouged prices of macintosh hardware, so I am left with NO CHOICE but to continue trying linux. The emulators I use on a regular basis are available for windows, no problem, except the beta versions. I'm not willing to give those up to use linux, so, I HAVE to find out how to compile programs. I'm also looking for a music tracker program that handles midi input. They're not very common in linux. Renoise, the program I currently use, will eventually come out on linux, hopefully over the next year, and it should be available as binary. Nevertheless, I need to learn how to compile programs because I tend to use software that isn't very mainstream.

Last edited by Kizzume; 06-05-2007 at 06:39 AM.
 
Old 06-05-2007, 06:56 AM   #14
Kizzume
Member
 
Registered: Jun 2007
Location: Tacoma, WA USA
Distribution: Kubuntu Feisty
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Okie
compiling source code is always going to be a little different on different distributions...

running ./configure will set parameters in the Makefile, and if & when it encounters errors or dependency problems it will spit out this information at the end of its run, make will also spit out any errors or unmet dependencies, and all goes well it will be successful and install & run perfectly...

compiling source code is sort of like flying by dead reckoning (as you do it just pay close attention to detail and be prepared to do deal with circumstances as they occur)...
Thank you for this post. It has been the most informative post I've received since I first started asking about this in 2002. Thank you VERY VERY much.

Okay. So--what must I do when I do not have all the dependencies? If it's a library for instance--where do I put the library files once I've downloaded them and how do I make Linux recognize where I've put them--OR would I simply use the package manager to add those libraries?

If I run into a libsigc problem where the syntax no longer matches--can I edit the source files, using the replace option in a text editor to swap words around that currently are using the wrong syntax, or do I edit something else? OR--do I put an older version of that library somewhere and somehow force the compiler to use that library instead of the standard one? If so, what commands do I need to use to do that?

Dependencies is the biggest issue I have had when compiling, and in the past I just didn't know what to do. When I last tried ubuntu, I spent 5 hours setting the package manager to install every library and other package imaginable--stupid as thtat decision was--it took 24 hours to install everything, let me tell you, that drive had a lot of stuff on it LOL!! It did allow me to compile one program that I hadn't been able to previously though.

Again, thank you VERY much for the information and ability to understand something from someone as green at this as I am.

Last edited by Kizzume; 06-05-2007 at 07:01 AM.
 
Old 06-05-2007, 07:52 AM   #15
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
personally compiling source code on Debian and Debian based distros have always been annoying to me because of the way Debian and Debian based distros package their distro, they always strip the header & C files out of a package and package them up separately (dev packages) on a clean/fresh install of Debian or Ubuntu you will have to download LOTS of dev packages for example xorg-dev libpng-dev and so on & so forth, so i don't use Debian...

i prefer Slackware as Patrick Volkerding (the author of the Slackware distribution) does not do this and keeps packages intact & complete, so on a clean/fresh install of Slackware i can compile source code without the annoyances of installing many more packages first in order to start building any source code i need & prefer...

Slackware is my favorite, there is also Crux which requires more work to do an install such as soon as the distro is installed the user has to chroot in to the newly installed distro and compile the kernel, Crux uses the ports system for package management which downloads source code and builds packages, i have found a few broken ports that i had to fix myself so Crux can be a lot of work to get a complete system working...

if you are really determined to learn this i recommend Slackware. i wont use any other distro, there also is Vector and Zenwalk that are based on Slackware that are good too. all i can say is patience has its rewards so give Slackware, Vector & Zenwalk a spin and decide for yourself which suits you best...

Good luck and may the source code be with you...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling GNOME 2.6.2 questions mrsolo Linux - Software 3 09-10-2004 09:24 PM
compiling questions north49er Slackware 1 07-26-2004 07:26 PM
kernel compiling questions panzram Linux - General 1 06-26-2003 08:34 AM
Kernel compiling questions Mentecapto Linux - Newbie 1 09-26-2002 04:20 PM
Kernel compiling questions mistery Linux - Newbie 1 07-19-2002 07:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration