2

I have downloaded the top source code from the following location.

http://sourceforge.net/projects/unixtop/?source=dlp

After extracting the code, i run the following command:

./configure
 make

cc -DHAVE_CONFIG_H  -I. -I. -I /usr/src/linux-headers-3.5.0-19/arch/alpha  -g -O2 -Wall   -fno-strict-aliasing -o m_linux.o -c ./machine/m_linux.c
  ./machine/m_linux.c:71:44: fatal error: asm/page.h: No such file or directory
compilation terminated.

make: *** [m_linux.o] Error 1

Please help

1
  • top is already part of Ubuntu why compile it from a source that is almost two years old?
    – Meer Borg
    Mar 12, 2013 at 5:25

2 Answers 2

1

Install the necessary build tools first:

apt-get install build-essential automake

Tip: if you are interested in playing with the top source code, why not take the version included in your Ubuntu environment?

apt-get source procps

Then, to build just the binaries, go into the directory where it was unpacked and do:

debian/rules clean
debian/rules build
0

if you are just interested in compiling top, here is one thing I did:

I googled for top source code and found in

https://stackoverflow.com/questions/3371131/need-the-source-code-for-top-and-find-the-connection-between-top-and-proc-dire

http://www.linuxquestions.org/questions/programming-9/top-utility-source-code-385857/

that the The source and homepage for procps utilities can be found here

then I did:

    wget http://procps.sourceforge.net/procps-3.2.7.tar.gz
    tar xzf procps-3.2.7.tar.gz
    cd procps-3.2.7/
    make
    make SHARED=0 DESTDIR=$HOME install
    ./top

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .