views:

20

answers:

2

Sometimes I want to build Python or GCC from scratch just for fun, but I can't parse the errors I get, or don't understand statements like "libtool link error # XYZ". What are some tricks that unix/systems gurus use to compile software of this size from scratch?

Of course I already do things like read config.log (if there is one), google around, and post in newsgroups. I'm looking for things that either

  • make the process go smoother or
  • get me more information about the error to help me understand and fix it.

It's a little tough to get this information sometimes, because some compile bugs can be quite obscure. What can I do at that point?

+2  A: 

My 5 cents:

  1. The only way to have things as smooth as possible is to read whatever the INSTALL/README/other instructions say and follow them as closely as possible. Try the default options first. No other silver bullets, really.
  2. If things don't go smooth, bluntly copy-paste the last error message into google. With high probability you are not the first one to get it and you'll easily find the fix.
  3. If you are the first one to get it, re-read INSTALL/README and think twice on what might be the peculiarity of your particular system config. If you don't know of any, prepare for longer battles. Whenever possible, I would avoid dealing with software that gets me to this point.
  4. An exception to the above rule is a linker error. Those are usually easy to understand and most often mean that your system libraries don't match the ones expected by the software. Re-read documentation, fetch the correct libraries, recompile. On some distributions this might be a lot of pain, though.
  5. My personal experience shows that whenever I get a compilation error which I can't resolve easily, going into the code and looking at the specific line which caused the error helps more than anything else.

Excuse me if that's all obvious stuff.

KT
A: 
  • Understand what are the steps in general/particular build process (feature checks, dependency checks, generation of derived sources, compilation, linking, installation, etc.)
  • Understand the tools used for the above (automake might be an exception here :)
  • Check the prerequisites (OS and libraries versions, additional packages, etc.)
  • Have a clean build environment - installing everything with all possible features on the same system will sure get you into dependency conflicts sooner or later.

Hope this helps.

Nikolai N Fetissov