Tags:
create new tag
, view all tags

Linux: Fear of Compiling

I've been on an almost 10 year sojourn into Linux land. I've made almost a complete break with (Microsoft) Windows--I have to scratch my head a lot when I try to work on my wife's Windows machine.

But, until recently, I was never comfortable with compiling anything in Linux. I did it occasionally, usually bringing out a set of instructions to follow. Having recently become much more comfortable, I thought I'd (as embarrassing as it may be) tell you why I was always uncomfortable compiling in Linux.

A few of the reasons were obvious (to me wink ) years ago--things like the strange magic incantations: ./autoconfigure, make, and make install (only the last as root).

But now I see that the really big one was the intimidating output you get when you compile something in Linux--here's a sample page (21 lines, one of 27+ such pages) from a recent "build" (another word I don't think I ever had to use in my pre-Linux days--oops, wait, I guess I'm wrong about that--I was a customer's project engineer on several large minicomputer based process control projects, and build was a word used there) of Scintilla on my Debian 5.0 system:

man-1   -DNDEBUG -Os -Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -DGTK
 -DSCI_LEXER -I ../include -I ../src  -c ../src/DocumentAccessor.cxx
g++ -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.
0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-
2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/
usr/include/pixman-1   -DNDEBUG -Os -Wall -Wno-missing-braces -Wno-char-subscripts -peda
ntic -DGTK -DSCI_LEXER -I ../include -I ../src  -c ../src/WindowAccessor.cxx
g++ -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.
0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-
2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/
usr/include/pixman-1   -DNDEBUG -Os -Wall -Wno-missing-braces -Wno-char-subscripts -peda
ntic -DGTK -DSCI_LEXER -I ../include -I ../src  -c ../src/KeyWords.cxx
g++ -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.
0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-
2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/
usr/include/pixman-1   -DNDEBUG -Os -Wall -Wno-missing-braces -Wno-char-subscripts -peda
ntic -DGTK -DSCI_LEXER -I ../include -I ../src  -c ../src/StyleContext.cxx
g++ -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.
0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-
2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/
usr/include/pix

(BTW, I cheated a little bit in the above--I didn't start with the first complete line of output, but instead captured something like you might find if you did make | less and copied one of the subsequent pages. I won't say it's too easy if you see the first line is g++, but, then again, when I saw this garbage streaming past me, I never took note of the first line anyway.)

Once you understand what you're looking at, it's no problem--there's not a single error present, it's just the (very long) command lines to the g++ compiler, for each of the umpteen .cxx files that comprise Scintilla.

But, I was intimidated for nearly 10 years. (I don't know if that says more about me or about Linux.) BTW, I'm getting rather old (29 on the Jack Benny scale), so I'm allowed to be intimidated by things that didn't bother me a bit when I was 45 or 50, and, I'm even allowed to say that I felt intimidated.

Compiling in Windows ((Turbo) Pascal, various database scripting languages, ...nothing at all like this. Is it a rite of passage? Should it be? Can I help? Does this article help? Should some of the beginners instructions on compiling say something like (at the make step)--"don't be overwhelmed by the output streaming at you--look at part of it carefully--quite often there are no errors or even warnings being presented, it is just the make script echoing the command lines to the compiler for each of the (many) object files that is being compiled".

Yes, I think that's a good idea.

Contributors

  • () RandyKramer - 2009-08-30
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Revision Comment

%SECTION{last_revision}%
  • %DATE% —

Page Ratings

Topic revision: r1 - 2009-08-30 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look