[Xastir] Compiler stuff

Curt Mills hacker at tc.fluke.com
Wed Nov 26 10:28:15 EST 2003


Some of you may not know this, to others it'll be old hat.  Here's
the command line I use to compile/install Xastir:


(make -j3 install-strip 2>&1) | tee make.log;chmod 4555 /usr/local/bin/xastir


Explanation:

-----------
First of all, this is BASH shell syntax.  If you're using C-Shell,
you'll need slightly different syntax.

The semicolon allows me to put multiple commands on the same line.
In this case, two commands, "make" and "chmod".

The parenthesis around the "make" portion cause it to be run in a
subshell.  This is important for the STDERR/STDOUT redirection (see
below).

-j3 allows three instances of the compiler to run at once.  This
makes it _look" like the compile is proceeding more quickly,
although in reality it slows you down slightly.  If you have more
memory, you can crank up the number.  Less, crank it down.  It has
the added side-effect of intermixing the error messages, but you can
still look at the start of each warning/error line and see which "c"
module the error came from.

"2>&1" causes STDERR (2) to be redirected to STDOUT (1).

Outside that subshell I then pipe STDOUT (which now includes STDERR)
to "tee", which allows me to both view the compilation results on
the xterm, and log everthing to the file "make.log.

The "install-strip" causes the debugging info to be stripped from
the executable, which makes it much smaller.  If you run a debugger
against Xastir, you want to "install" instead of "install-strip",
otherwise it doesn't matter to an end-user.

The "chmod" portion sets up the executable to be SUID root, because
I ran that command as root.  This lets me open AX.25 kernel
networking ports on Linux.  Without the chmod, I think I get "hard
failure" while trying to open them.

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list